You are not logged in.

#1 2014-10-16 15:24:42

m42kus
Member
Registered: 2014-10-16
Posts: 2

Snapper .snapshots directory is empty, mounted subvolume isn't

Edit: please see my post below, btw is it possible to change the title of the topic?

Hello,

I tried out snapper today and ran into a quite weird issue with snapper's rollback feature. I made a snapshot, installed some KDE stuff and made a rollback after that. Everything went fine so far but after the rollback I ended up with an empty .snapshot folder/subvolume in my root (on which I performed the rollback) and the command snapper list doesn't find any snapshots (there were a bunch of them before the rollback). However, when I mount the subvolume all the snapshots are still there.

$ ls /.snapshots
$ sudo mount /dev/sda2 -o subvol=@/.snapshots /mnt
$ ls /mnt
1  2  3  4  5

I have btrfs-progs installed so if I'm right I should see them directly... it works with my /home/.snapshots subvolume.

$ ls /home/.snapshots
1  2  3

/dev/sda2 Layout (simplified):

$ sudo btrfs subvolume list /
ID 257 gen 762 top level 5 path @
ID 260 gen 999 top level 5 path @home
ID 270 gen 956 top level 260 path @home/.snapshots
ID 271 gen 975 top level 257 path @/.snapshots

My System:

$ uname -r
3.16.4-1-ARCH
$ btrfs version
Btrfs v3.16.2
$ snapper --version
snapper 0.2.4
flages btrfs,lvm,ext4,xattrs,rollback,btrfs-quota

Edit: I was a bit in a hurry yesterday, I added some additional information now.
Thanks in advance :D

Last edited by m42kus (2014-10-17 12:54:02)

Offline

#2 2014-10-17 12:52:43

m42kus
Member
Registered: 2014-10-16
Posts: 2

Re: Snapper .snapshots directory is empty, mounted subvolume isn't

Ok guys,

I guess I found the solution myself. Just in case someone has the same problem with snapper rollback:
http://snapper.io/2014/04/29/rollback.html

For the rollback command to work it requires a properly configured system. I have not tried it out yet but hopefully I'm gonna have time that weekend.
1. and I have done that from the beginning you need to boot from the default subvolume because thats what snapper changes during a rollback.
2. And that's what I think produced the issue i had. You have to mount the .snapshots subvolume in fstab on boot. By default snapper only creates the subvolume and with btrfs-progs installed is able to access them without a mount. However, after the rollback you boot from a different subvolume than the one the .snapshots subvolume resides. So I got a empty directory.

The question is where to put the subvolume and how configure snapper to do that actually. I just tried to mount a subvolume into itself which worked surprisingly, but I don't know if someone should do that? When I have time I'm gonna install opensuse to see how they resolved that issue.

Last edited by m42kus (2014-10-17 13:02:30)

Offline

Board footer

Powered by FluxBB