Flaxplax

Personal documentation

Create Swapfile

To create a swapfile on btrfs filesystem.

Only works on kernel 5.0 or higher.

# truncate -s 0 /swapfile
# chattr +C /swapfile
# btrfs property set /swapfile compression none
# fallocate -l 512M /swapfile
# chmod 600 /swapfile
# mkswap /swapfile

Title: BTRFS

Author: Flaxplax

Publish Date: 21, Aug 2022

Last updated: 21, Aug 2022