You are not logged in.

#1 2025-05-07 15:07:33

ArcSnap
Member
Registered: 2025-05-07
Posts: 4

Question about regarding Snapper article in arch wiki.

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 /mnt

Do 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-backup

Or what would be the exact process when OS itself is not on BTRFS?

Offline

#2 2025-05-08 08:45:03

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,971

Re: Question about regarding Snapper article in arch wiki.

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

#3 2025-05-08 18:45:24

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,156

Re: Question about regarding Snapper article in arch wiki.

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-backup

and 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

#4 2025-05-08 23:08:09

ArcSnap
Member
Registered: 2025-05-07
Posts: 4

Re: Question about regarding Snapper article in arch wiki.

How should it exactly work?

If I have just this in my fstab

UUID=9c76582a-95c4-437c-abf2-81e3542665ae /home btrfs defaults 0 0

Should I start by creating subvolume first?

Right now if I type:

btrfs subvolume list /home

Then 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.txt

And 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 snapshot

But I cannot do mv:

# mv /home /home-backup
mv: cannot move '/home' to '/home-backup': Device or resource busy

Question: Should I have created some subvolume first? Like this?

btrfs subvolume create /home/@home

My 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

#5 2025-05-09 16:19:34

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,156

Re: Question about regarding Snapper article in arch wiki.

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

#6 2025-05-09 18:55:06

ArcSnap
Member
Registered: 2025-05-07
Posts: 4

Re: Question about regarding Snapper article in arch wiki.

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/@home

And 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 0

After 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

Board footer

Powered by FluxBB