我总是在启动后手动激活交换文件。出了什么问题?这是我的/etc/fstab
:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/nvme0n1p3 during installation
UUID=65238893-d167-43fd-9c3d-489759c09f06 / btrfs defaults,subvol=@ 0 1
# /boot was on /dev/nvme0n1p2 during installation
UUID=4e5c83d5-a781-4af7-a205-f137974d998e /boot ext4 defaults 0 2
# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=68C0-029E /boot/efi vfat umask=0077 0 1
# /home was on /dev/nvme0n1p3 during installation
UUID=65238893-d167-43fd-9c3d-489759c09f06 /home btrfs defaults,subvol=@home 0 2
UUID=65238893-d167-43fd-9c3d-489759c09f06 /swap btrfs defaults,noatime,subvol=swap 0 0
/swap/swapfile none swap sw 0 0
以下是输出sudo btrfs sub list /; ls /swap
:
ID 256 gen 59227 top level 5 path home
ID 318 gen 62429 top level 5 path @
ID 319 gen 62429 top level 5 path @home
ID 330 gen 62180 top level 318 path swap
swapfile
答案1
我认为问题在于swap
您的子卷和挂载到的目录具有相同的名称。
我没有测试过,但mount
可能会抛出一个错误
UID=65238893-d167-43fd-9c3d-489759c09f06 /swap btrfs defaults,noatime,subvol=swap 0 0
那么下一行也没有被使用。
您的swapfile
不是在单独的子卷上创建的,而是在 上创建的@
。