[Bug 937047] New: snapper rollback changes default subvolume
http://bugzilla.suse.com/show_bug.cgi?id=937047 Bug ID: 937047 Summary: snapper rollback changes default subvolume Classification: openSUSE Product: openSUSE Factory Version: 201505* Hardware: x86-64 OS: openSUSE 13.2 Status: NEW Severity: Major Priority: P5 - None Component: Basesystem Assignee: bnc-team-screening@forge.provo.novell.com Reporter: Stromeko@NexGo.DE QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- After a snapper boot rollback, the default btrfs subvolume has changed to the snapshot I've rolled back to. This had several undesirable consequences: 1. Snapper stopped working since /.snapshots wasn't populated any more. I've fixed that by adding the .snapshots subvolume to /etc/fstab. 2. One of the snapshots listed by snapper is actually the new default subvolume, but that's not marked in any way. 3. Trying to delete that snapshot leaves the system in an unusable state with most filesystems unmounted. You can only switch off hard at that point. The snapper cleanup hasn't gotten to that snapshot yet, but when it does it might produce the same crash then. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=937047
http://bugzilla.suse.com/show_bug.cgi?id=937047#c1
--- Comment #1 from Achim Gratz
http://bugzilla.suse.com/show_bug.cgi?id=937047
Achim Gratz
http://bugzilla.suse.com/show_bug.cgi?id=937047
http://bugzilla.suse.com/show_bug.cgi?id=937047#c2
Arvin Schnell
http://bugzilla.suse.com/show_bug.cgi?id=937047
Matthias Eckermann
http://bugzilla.suse.com/show_bug.cgi?id=937047
http://bugzilla.suse.com/show_bug.cgi?id=937047#c4
--- Comment #4 from Thorsten Kukuk
After a snapper boot rollback, the default btrfs subvolume has changed to the snapshot I've rolled back to. This had several undesirable consequences:
1. Snapper stopped working since /.snapshots wasn't populated any more. I've fixed that by adding the .snapshots subvolume to /etc/fstab.
This sounds like your system wasn't setup for rollback. Else /.snapshots should have been added to /etc/fstab already. Could it be that this was an upgrade from something older/short before rollback was fully introduced in openSUSE?
2. One of the snapshots listed by snapper is actually the new default subvolume, but that's not marked in any way.
When you called snapper rollback, snapper told you that this snapshot is the new default root filesystem. What else do you expect?
3. Trying to delete that snapshot leaves the system in an unusable state with most filesystems unmounted. You can only switch off hard at that point. The snapper cleanup hasn't gotten to that snapshot yet, but when it does it might produce the same crash then.
snapper cleanup algorighm will not delete the subvolume with the current root filesystem. So this is can really only happen if you try to manual delete that snapshot. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=937047
http://bugzilla.suse.com/show_bug.cgi?id=937047#c5
--- Comment #5 from Achim Gratz
When you called snapper rollback, snapper told you that this snapshot is the new default root filesystem. What else do you expect?
It should be marked as such in the snapshot list or not be shown at all. This is simply a snapshot that snapper cannot deal with at that moment.
snapper cleanup algorighm will not delete the subvolume with the current root filesystem. So this is can really only happen if you try to manual delete that snapshot.
Again, it shouldn't even try. In my case I've included it in a range of snapshots to delete, more or less by accident. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=937047
http://bugzilla.suse.com/show_bug.cgi?id=937047#c6
--- Comment #6 from Achim Gratz
When the system is installed with YaST snapper does add .snapshots to fstab.
The system was a fresh install from openSUSE-Tumbleweed-DVD-x86_64-Snapshot20141112-Media.iso copied to a USB stick. The default settings for a btrfs / were accepted.
Why the system gets unstable when trying to delete the default snapshot is not clear to me since the kernel ioctl to delete the snapshot simply fails. I will have a closer look when time permits but more information is welcome.
Yes, thankfully the subvolume itself was _not_ deleted. But somehow all filesystems had been unmounted anyway before that was attempted. The system didn't really crash, but with neither /proc nor /dev available you can't do anything useful anymore, not even shut down. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=937047
Lars Müller
http://bugzilla.suse.com/show_bug.cgi?id=937047
http://bugzilla.suse.com/show_bug.cgi?id=937047#c7
Arvin Schnell
(In reply to Arvin Schnell from comment #2)
The system was a fresh install from openSUSE-Tumbleweed-DVD-x86_64-Snapshot20141112-Media.iso copied to a USB stick. The default settings for a btrfs / were accepted.
That exact version seems to be impossible to find half a year later.
Why the system gets unstable when trying to delete the default snapshot is not clear to me since the kernel ioctl to delete the snapshot simply fails. I will have a closer look when time permits but more information is welcome.
Yes, thankfully the subvolume itself was _not_ deleted. But somehow all filesystems had been unmounted anyway before that was attempted. The system didn't really crash, but with neither /proc nor /dev available you can't do anything useful anymore, not even shut down.
I tried that myself with openSUSE 13.2 and the 'snapper delete' command does the ioctl to delete the btrfs subvolume which fails and that is it. Snapper does no umount in that situation (and never a umount of /dev or /proc). So I need more information about the "somehow" or exact steps how the reproduce the issue. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=937047
http://bugzilla.suse.com/show_bug.cgi?id=937047#c8
Johannes Studt
http://bugzilla.suse.com/show_bug.cgi?id=937047
http://bugzilla.suse.com/show_bug.cgi?id=937047#c9
--- Comment #9 from Achim Gratz
That exact version seems to be impossible to find half a year later.
In any case, it's a Tumbleweed install from that date, updated ever since. It should be possible to find out which way the system and snapper was installed by that version and what (if any) changes the updates should have introduced.
I tried that myself with openSUSE 13.2 and the 'snapper delete' command does the ioctl to delete the btrfs subvolume which fails and that is it. Snapper does no umount in that situation (and never a umount of /dev or /proc).
openSUSE 13.2 != Tumbleweed, I'd think.
So I need more information about the "somehow" or exact steps how the reproduce the issue.
1. Boot into a snapshot, rollback. 2. Keep on working from the rollback snapshot, including more snapshots being created. 3. Try to 'snapper rm #-of-rollback. That's it. Since you're left with only the bash builtins at that point there's not a whole lot more I can tell you, sorry. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=937047
http://bugzilla.suse.com/show_bug.cgi?id=937047#c10
--- Comment #10 from Arvin Schnell
(In reply to Arvin Schnell from comment #7)
I tried that myself with openSUSE 13.2 and the 'snapper delete' command does the ioctl to delete the btrfs subvolume which fails and that is it. Snapper does no umount in that situation (and never a umount of /dev or /proc).
openSUSE 13.2 != Tumbleweed, I'd think.
As wrote the version you installed is not available any longer so I took a version close to that. And you did not mention that you updated ever since. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=937047
http://bugzilla.suse.com/show_bug.cgi?id=937047#c11
Arvin Schnell
http://bugzilla.suse.com/show_bug.cgi?id=937047
http://bugzilla.suse.com/show_bug.cgi?id=937047#c12
--- Comment #12 from Arvin Schnell
http://bugzilla.suse.com/show_bug.cgi?id=937047
http://bugzilla.suse.com/show_bug.cgi?id=937047#c13
Arvin Schnell
http://bugzilla.suse.com/show_bug.cgi?id=937047
Arvin Schnell
http://bugzilla.suse.com/show_bug.cgi?id=937047
http://bugzilla.suse.com/show_bug.cgi?id=937047#c14
David Sterba
1. Boot into a snapshot, rollback. 2. Keep on working from the rollback snapshot, including more snapshots being created. 3. Try to 'snapper rm #-of-rollback.
You can't remove the snapshot that's currently mounted (EBUSY) or set as the default subvolume (EPERM). See if system log contains something like "deleting default subvolume <number> is not allowed". -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=937047
http://bugzilla.suse.com/show_bug.cgi?id=937047#c15
Arvin Schnell
participants (1)
-
bugzilla_noreply@novell.com