3
edits
(Added discussion item for addition or correction on subject page.) |
(→Swapfile on BTRFS: - additions for disabling compression and subvolume not nested under root) |
||
Line 12: | Line 12: | ||
Disabling Copy-on-write and compression need to be done in one step on the freshly created file: | Disabling Copy-on-write and compression need to be done in one step on the freshly created file: | ||
' | '$ sudo chattr +C +m /@swapfile/swapfile | ||
If assigning these attributes in two steps, the second will be rejected. | If assigning these attributes in two steps, the second will be rejected. | ||
If creating the subvolume as described - $ sudo btrfs subvolume create /@swapfile - it becomes a sub-subvolume of the actually mounted root /@ - this can be shown by: $ sudo btrfs subvolume list -p / | |||
Today I was restoring a snapshot, TimeShift saved my actual system as a snapshot, and included the /@swapfile subvolume, because that was created as a child-subvolume of /@ - I found not quickly a way to move it out of the snapshot. | |||
After I succeeded in deleting the now useless swapfile subvolume (first learned the ID via $ sudo btrfs subvolume list / - then had it deleted by $ sudo btrfs subvolume delete -i {nnn} /) I created the subvolume as child of parent volume ID 5 by booting from the Manjaro installation media, then mounted my root filesystem in the file manager (XFCE - thunar), where it listed the subvolumes @ @home @cache @log | |||
Then I created the subvolume in that path shown in the file manager's address line | |||
'$ sudo btrfs subvolume create /run/media/{user}/{mnt-dir}/@swapfile | |||
And I added actually two lines to /etc/fstab - first one copied from the /@ entry with option compression=no | |||
'UUID=nnn-nnn-nnn-nnn-nnn /@swapfile btrfs subvol=/@swapfile,defaults,discard=async,ssd,compress=no 0 0 | |||
and a second for /@swapfile/swapfile as described here in the wiki. | |||
Then I followed the described creation procedure for /@swapfile/swapfile once more. |
edits