You are not logged in.
Question about Snapper page on Arch Linux wiki: https://wiki.archlinux.org/title/Snappe … e_snapshot
Under chapter Restore using the default layout it starts with commands:
# mount -t btrfs -o subvol=/ /dev/disk/by-uuid/UUID_of_root_volume /mnt
# cd /mntDo I understand correctly that this is written with assumption entire system is BTRFS and subvol=/ references the / of system?
Can and should this chapter from Arch wiki be applied if OS itself is not BTRFS and only data is on BTRFS?
And what would be steps in case when / is normal EXT4 and /home is a separate hard drive with BTRFS?
Should I still for example do this mv command?
# mv /home /home-backupOr what would be the exact process when OS itself is not on BTRFS?
Offline
Snapper is in archlinux repos, Moving to Newbie Corner
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
subvol=/ means the root of the btrfs volume and is not strictly related to "the system root". (Every distinct filesystem/partition has their own "root" that's what you invoke with subvol=/ NOT whatever is mounted on /)
you should still be doing this move command, but note that it's
mv @home @home-backupand is done following a cd into /mnt (long story short, you can follow this exactly as is mentioned there. just replace UUID_of_root_volume with the UUID of your relevant volume)
Offline
How should it exactly work?
If I have just this in my fstab
UUID=9c76582a-95c4-437c-abf2-81e3542665ae /home btrfs defaults 0 0Should I start by creating subvolume first?
Right now if I type:
btrfs subvolume list /homeThen it shows nothing.
However when I initialize snapper:
# btrfs subvolume list /home
# snapper -c homeConf create-config /home
# snapper list-configs
Config | Subvolume
---------+----------
homeConf | /home It works just fine and I can take even snapshots:
# echo "before" > /home/user/test.txt
# snapper -c homeConf create
# echo "after" > /home/user/test.txtAnd I can even confirm that snapshots appear:
# ls -a /home
. .. .snapshots user
# cat /home/user/test.txt
after snapshot
# cat /home/.snapshots/1/snapshot/user/test.txt
before snapshotBut I cannot do mv:
# mv /home /home-backup
mv: cannot move '/home' to '/home-backup': Device or resource busyQuestion: Should I have created some subvolume first? Like this?
btrfs subvolume create /home/@homeMy confusion comes from the fact that according to my understanding (not sure if it's correct) snapper already creates some subvolume. And since Snapper already created something I didn't recreate it myself. But from the fact that I am stuck with mv command shows that I should always create subvoume myself and not use what snapper does?
Offline
What subvolume is currently being mounted? If you unmount home and mount it as described you should see multiple @ prefixed "directories" which are your subvolumes. FWIW to check what snapper did you could probably use a btrfs list subvolumes or so https://wiki.archlinux.org/title/Btrfs# … subvolumes
Offline
It turned out that I had to manually create a subvolume before creating Snapper configuration. At first I understood that Snapper itself will create a subvolumes. Solution was to create @home subvolume with command
btrfs subvolume create /home/@homeAnd then fix my fstab to to use subvol=@home parameter to make /home/@home/user-name/ become /home/user-name/
UUID=9c76582a-95c4-437c-abf2-81e3542665ae /home btrfs defaults,subvol=@home 0 0After that I was able to follow Arch Wiki: https://wiki.archlinux.org/title/Snappe … e_snapshot
Last edited by ArcSnap (2025-05-10 13:38:22)
Offline