Grub doesn’t fully revert ZFS snapshots

Bug #1949490 reported by Maurice Volaski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zsys (Ubuntu)
Opinion
Undecided
Unassigned

Bug Description

To reproduce this bug, take the following steps

Install Ubuntu 20.04.3 using a ZFS-based root.
Boot into it and get past the initial startup screens.
Take a manual recursive zfs snapshot like so

zfs snapshot -r rpool@beforeanything

Now touch a file on the desktop and install a package like htop.

You should see the file and htop should be able to run.

Reboot and hit escape to enter the grub screen. Choose the history menu and choose the snapshot you just created. Then hit enter and then choose the option to revert system and user data and then enter again.

If it were working correctly, everything should be reverted. There’d be no file on the desktop and no trace of htop.

That’s not what occurs. The file on the desktop is still there, and while htop is no longer installed, the package management seems to think it is.

description: updated
Steve Langasek (vorlon)
affects: grub (Ubuntu) → grub2 (Ubuntu)
Revision history for this message
Julian Andres Klode (juliank) wrote :

Reassigning to zsys, but also closing tentatively as opinion, as the snapshot has not been made using zsys, so this seems like it is out of scope.

affects: grub2 (Ubuntu) → zsys (Ubuntu)
Changed in zsys (Ubuntu):
status: New → Opinion
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Indeed, as the snapshot is not done with ZSys, USERDATA has not been snapshotted and will not be reverted.

Revision history for this message
Maurice Volaski (mauricev2) wrote :

If we use a ZSys-created snapshot, first the system hangs after being reverted. And then nothing is reverted at all. Either that, I should wait an inordinate amount of time for the revert to happen while the system is hung.

So there are in this sense, two bugs here, one, the hang, and two the complete of lack of reversion (if that’s a word ;))

However, the problem appears to be intermittent. Some of the time, it does work, but when it initially hangs that indicates it’s going to fail.

Revision history for this message
Maurice Volaski (mauricev2) wrote :

>also closing tentatively as opinion

Is this going to be reopened or shall I file new for the Zsys bug?

Revision history for this message
Maurice Volaski (mauricev2) wrote :

Two things. First, I created a separate bug for the failure to revert ZSys snapshots, https://bugs.launchpad.net/ubuntu/+source/zsys/+bug/1950330.

Second, this here is clearly a bug despite Didier's claims to the contrary. Regular snapshots appear in the menu. Why would anyone think they are not valid? It lets me go through steps to revert them. It never complains "invalid snapshot". In addition, the snapshot applies to every filesystem including the ones for USERDATA, so I don't follow Didier's logic.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.