Skip to content

Instantly share code, notes, and snippets.

@hongkongkiwi
Last active June 9, 2024 16:51
Show Gist options
  • Save hongkongkiwi/2223c0687851178d7a861bdbf61d415a to your computer and use it in GitHub Desktop.
Save hongkongkiwi/2223c0687851178d7a861bdbf61d415a to your computer and use it in GitHub Desktop.
Increase swap on BRTFS. The normal method causes a swapon failed: Invalid argument error, so below commands are required.
sudo truncate -s 0 /swap.img
sudo chattr +C /swap.img
sudo fallocate -l 64G /swap.img
sudo chmod 0600 /swap.img
sudo mkswap /swap.img
sudo swapon /swap.img
sudo swapon --show
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment