3
edits
(→Swapfile on BTRFS: - additions for disabling compression and subvolume not nested under root) |
(→Swapfile on BTRFS: - practical experience details to add) |
||
Line 19: | Line 19: | ||
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 / | 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. | 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. Addition: When booted externally from Manjaro installation boot media, I could move a subvolume from /run/media/{user}/{mnt-dir}/timeshift.../@/@bsvtest upwards to /run/media/{user}/{mnt-dir}/@bsvtest using root permissions. Yet since the original filesystem root, parent to /@, becomes inaccessible when /@ is mounted to "/", the @swapfile subvolume must be mounted to a directory via /etc/fstab - I named it /@swapfile - see below. The option compress=no is ignored (perhaps because /@ is already mounted with compress=zstd), so chattr +C +m is mandatory. | ||
Before I found the way to move it, I had deleted the swapfile subvolume in .../timeshift.../@/@swapfile (first learned the ID via $ sudo btrfs subvolume list / - then had it deleted by $ sudo btrfs subvolume delete -i {nnn} /) and created the subvolume again as child of parent volume ID 5 - booted from the Manjaro installation media, then mounted my root filesystem in the file manager (XFCE - thunar), where it listed the subvolumes @ @home @cache @log | |||
- There 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 | '$ sudo btrfs subvolume create /run/media/{user}/{mnt-dir}/@swapfile |
edits