You are not logged in.
I have luks over lvm on 2 drive system.
Here is my cmdline:
rd.luks.name=7ecbcf9c-734e-4b7d-90ff-b18e5cffdad4=linuxroot root=/dev/mapper/linuxroot rootfstype=btrfs rootflags=subvol=/@ rw
Here is my fstab:
# /dev/mapper/linuxroot LABEL=linuxroot
UUID=254127e3-541c-47ec-95a4-e89e3eb6442e / btrfs rw,relatime,compress=zstd:3,ssd,space_cache=v2,commit=120,sub>
# /dev/mapper/linuxroot LABEL=linuxroot
UUID=254127e3-541c-47ec-95a4-e89e3eb6442e /home btrfs rw,nodev,relatime,compress=zstd:3,ssd,space_cache=v2,commit=1>
# /dev/mapper/linuxroot LABEL=linuxroot
UUID=254127e3-541c-47ec-95a4-e89e3eb6442e /var btrfs rw,nosuid,nodev,noexec,relatime,compress=zstd:3,ssd,space_cac>
# /dev/mapper/linuxroot LABEL=linuxroot
UUID=254127e3-541c-47ec-95a4-e89e3eb6442e /.snapshots btrfs rw,nosuid,nodev,noexec,relatime,compress=zstd:3,ssd,space_cac>
# /dev/mapper/linuxroot LABEL=linuxroot
UUID=254127e3-541c-47ec-95a4-e89e3eb6442e /.swap btrfs rw,nosuid,nodev,noexec,relatime,compress=zstd:3,ssd,space_cac>
/.swap/swapfile none swap defaults 0 0
# /dev/nvme0n1p1 LABEL=ESP
UUID=00EB-554E /efi vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,e>
swapon -show outupt:
Filename Type Size Used Priority
/.swap/swapfile file 524284 0 -2
so, I suppose its activated but lsblk -f dont display it. And... it doesnt work
Offline
You've read and followed https://wiki.archlinux.org/title/Btrfs#Swap_file ?
Please post the complete fstab and don't copy it out of a pager as the latter truncates li>
It's not a block device, what's the actual output of "lsblk -f" and what would you expect to see beyond that?
Also how do you determine that "it doesn't work"?
To be clear, you cannot "mount" swap devices in the traditional sense to begin with.
Edit: ie. like entering it like a directory and look at files inside or so.
Last edited by seth (2024-12-14 08:49:13)
Offline
Don't use a swap file with btrfs, it's a horrible hack.
Para todos todo, para nosotros nada
Online
fstab:
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/mapper/linuxroot LABEL=linuxroot
UUID=254127e3-541c-47ec-95a4-e89e3eb6442e / btrfs rw,relatime,compress=zstd:3,ssd,space_cache=v2,commit=120,subvol=/@ 0 0
# /dev/mapper/linuxroot LABEL=linuxroot
UUID=254127e3-541c-47ec-95a4-e89e3eb6442e /home btrfs rw,nodev,relatime,compress=zstd:3,ssd,space_cache=v2,commit=120,subvol=/@home 0 0
# /dev/mapper/linuxroot LABEL=linuxroot
UUID=254127e3-541c-47ec-95a4-e89e3eb6442e /var btrfs rw,nosuid,nodev,noexec,relatime,compress=zstd:3,ssd,space_cache=v2,commit=120,subvol=/@var 0 0
# /dev/mapper/linuxroot LABEL=linuxroot
UUID=254127e3-541c-47ec-95a4-e89e3eb6442e /.snapshots btrfs rw,nosuid,nodev,noexec,relatime,compress=zstd:3,ssd,space_cache=v2,commit=120,subvol=/@snapshots 0 0
# /dev/mapper/linuxroot LABEL=linuxroot
UUID=254127e3-541c-47ec-95a4-e89e3eb6442e /.swap btrfs rw,nosuid,nodev,noexec,relatime,compress=zstd:3,ssd,space_cache=v2,commit=120,subvol=/@swap 0 0
/.swap/swapfile none swap defaults 0 0
# /dev/nvme0n1p1 LABEL=ESP
UUID=00EB-554E /efi vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 2
lsblk -f:
lsblk -f
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
sda iso9660 Joliet Extension ARCH_202412 2024-12-01-05-48-32-00
├─sda1 iso9660 Joliet Extension ARCH_202412 2024-12-01-05-48-32-00
└─sda2 vfat FAT32 ARCHISO_EFI 674B-F8B0
nvme1n1
└─nvme1n1p1 LVM2_member LVM2 001 jLFgfS-cJhO-EBLb-l2QX-6vY6-Wz63-QwiE52
└─vg0-cryptroot crypto_LUKS 2 7ecbcf9c-734e-4b7d-90ff-b18e5cffdad4
└─linuxroot btrfs linuxroot 254127e3-541c-47ec-95a4-e89e3eb6442e 1.4T 0% /home
/var
/.swap
/.snapshots
/
nvme0n1
├─nvme0n1p1 vfat FAT32 ESP 00EB-554E 281.1M 45% /efi
└─nvme0n1p2 LVM2_member LVM2 001 hFtBoI-9fTg-VxEx-Sbfq-EKi9-Uhse-tMbA1k
└─vg0-cryptroot crypto_LUKS 2 7ecbcf9c-734e-4b7d-90ff-b18e5cffdad4
└─linuxroot btrfs linuxroot 254127e3-541c-47ec-95a4-e89e3eb6442e 1.4T 0% /home
/var
/.swap
/.snapshots
/
i want to see [SWAP] in lsblk
Offline
f*ck, i think its because of compression
Offline
i want to see [SWAP] in lsblk
It's not a block device
Idk about btrfs swapfiles, but you won't typically see them in lsblk for that reason.
Offline
yeap, i managed to hibernate from tty, but is so strange. Its flicking why hibernating and it doest asks password when I entering system. Hibernation from active compositor session doesnt work anyway
Offline
i think that using logical volume will be better idea, i use lvm anyway. Its looks more stable and straightforward. I will try lately
Offline
thank dude
Offline