Quantcast
Channel: Active questions tagged mount+fstab - Ask Ubuntu
Viewing all articles
Browse latest Browse all 699

Why is my swapfile on btrfs suddenly not active?

$
0
0

I have created a swapfile /swap on / btrfs with:

touch /swapchattr +C /swapdd if=/dev/zero of=/swap bs=1M count=2048 mkswap /swap && chmod 600 /swap && swapon /swap

It works and mounts fine and all is good when I check with swapon -sIt's mounted in fstab. However, after a while the swapfile is no longer mounted and working when I do swapon -sand I have recreate the file to get it to work again. I do not know exactly when this happens since I do not notice that my system with lots of is needing swap. How can I find out when and what happens and possibly make sure the swapfile stays active and mounted?

My fstab:

# <file system> <mount point>   <type>  <options>       <dump>  <pass># / was on /dev/nvme0n1p2 during installationUUID=546fa6af-ca9c-419f-9883-ba182e35969d /               btrfs   ssd,space_cache,compress=zstd,noatime,defaults,subvol=@ 0       1# /boot/efi was on /dev/nvme0n1p1 during installationUUID=EAE2-20E2  /boot/efi       vfat    umask=0077      0       1# /home was on /dev/nvme0n1p2 during installationUUID=546fa6af-ca9c-419f-9883-ba182e35969d /home           btrfs   ssd,space_cache,compress=zstd,noatime,defaults,subvol=@home 0       2/swap                                       none            swap    sw              0       0

Viewing all articles
Browse latest Browse all 699

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>