You are not logged in.

#1 2021-12-18 16:48:46

happy4pizza
Member
Registered: 2021-12-12
Posts: 3

How can I check that I configured Swap Correctly?

I recently installed Arch with a Btrfs file system. I want to create snapshots using snapper so I had to create a new subvolume for swap. This is how I configured swap:

btrfs subvolume create /mnt/@swap
mkdir /mnt/swap
mount -t btrfs -o nodatacow, subvol=@swap -L ROOT /mnt/swap

# Activates swap
truncate -s  0 /swap/swapfile
chattr +C /swap/swapfile
btrfs property set /swap/swapfile compression none
dd if=/dev/zero of=/swap/swapfile bs=1M count=4096 status=progress
chmod 600 /swap/swapfile #set permissions.
mkswap /swap/swapfile
swapon /swap/swapfile
echo "/swap/swapfile none swap defualts 0 0" >> /etc/fstab


Is there I way to make sure that swap is working properly?

Offline

#2 2021-12-18 17:09:55

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: How can I check that I configured Swap Correctly?

happy4pizza wrote:

Is there I way to make sure that swap is working properly?

Check /proc/swaps and the output of free(1).


Jin, Jîyan, Azadî

Offline

Board footer

Powered by FluxBB