rolling-rhino icon indicating copy to clipboard operation
rolling-rhino copied to clipboard

Adding ZFS Snapshot support

Open joriankarstark opened this issue 3 years ago • 9 comments

A first pass at adding in ZFS snapshot support.

I'm not sure if this is the best way to detect if ZFS is installed on root. Happy to take feedback and make edits. Especially in regards to snapshot names, zfs on root detection, and output messaging. Also, should we prompt the user if a snapshot is desired or just automatically take the snapshot as it is currently coded? My thought is to just take the snapshot as there is no downside that I'm aware of.

joriankarstark avatar Jul 09 '20 04:07 joriankarstark

I think we might have to add a update-grub into it.
As I've been testing it seems that as soon as I shutdown I will get an empty grub screen on next boot.

troyBORG avatar Jul 13 '20 04:07 troyBORG

Cool, thanks for testing that. I'll add in an update-grub and see how it works.

joriankarstark avatar Jul 13 '20 13:07 joriankarstark

Hmm... update-grub wasn't enough to fix it. I don't think this issue is directly related to the snapshot being taken. It seems something happens when switching to devel-repo with zfs on root? Will try to look further into this...

Edit: I believe it was some upstream issue that is now fixed. I was able to reproduce this earlier today, however now on latest version of groovy I can no longer see an issue after applying the rolling-rhino script. Should be good for further code review.

joriankarstark avatar Jul 13 '20 19:07 joriankarstark

It seems to be a bug that as soon as it takes another snapshot after switching to rolling that it is what breaks it.

troyBORG avatar Jul 14 '20 09:07 troyBORG

Ah, I was unaware of zsys. Let me see what I can do with it.

joriankarstark avatar Aug 10 '20 19:08 joriankarstark

Doesn't ZSys already take a snapshot every time a update is invoked?

IceTrayz avatar Aug 29 '20 11:08 IceTrayz

It does, but not until after we modify a bunch of config files in this case. I was thinking would be good to have a snapshot taken before we touch anything.

joriankarstark avatar Aug 30 '20 18:08 joriankarstark

Using zsys now. Still not sure if we should prompt the user for a zfs snapshot. But I think it's ready for review :)

joriankarstark avatar Aug 30 '20 19:08 joriankarstark

I was thinking would be good to have a snapshot taken before we touch anything.

Very good point and manual snapshot is also needed when you consider the amount of desktop changes people make outside of updates.

Thanks for working on this as it will save a lot of headaches , i find ZFS so confusing. :)

IceTrayz avatar Aug 30 '20 22:08 IceTrayz