-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unmanaged datasets destroyed at boot time #196
Comments
Not sure if it needed, but let it be here: zsys.conf.gz |
zsys shouldn't manage filesystems and snapshots that it didn't create, implicitly. |
I agree with @azazar and would go further and say it shouldn't destroy filesystems at all (only auto-created snapshots). |
I think I hit this today too, all 3 homedirs including all snapshots are gone on my system (Ubuntu Hirsute). Similar looking logs to the reporter. I will try to gather more evidence. Happened on Friday for me. |
First, sorry for your destroyed datasets. We handled at first that USERDATA (which was never used in any ZFS systems we monitor) as a reserved ZSYS datasets and own them. We need to delete datasets there, as after a revert, a dataset without any zsys tag (because of unsucessful revert or a dataset that expired due to garbage collection) would remain forever, filesystem datasets are some kind of a snapshots for it and we need to delete them to not clutter the system. However, we tried to create some mitigation as you noted on bug #103 and there has been no change since, this is why I am a little bit puzzled (could this be related to your particular encryption setup?) on why it only triggers now. Thanks for the reproducer, I’ll start my investigation from there and keep you posted. |
We unfortunately couldn’t reproduce it with the steps described. I’m really wonder what differed in your case. For your information, here are the datasets that are up for deletion in /USERDATA (once it reached the GC limit):
In addition to the reproducer, we tried the following (everytime, we advance the date and forced GC to keep 0 datasets) in the USERDATA namespace:
All those cases pass on encrypted or unencrypted datasets as we expect (we have found an issue on hirsute due to ZFS packaging, not related to ZSys itself, which makes some datasets not mounted at boot, we are fixing it). Any idea what’s different on your configuration (if you can come with a full reproducer, that would be awesome)? The only reason I can see is that |
If by tagging, do you mean setting |
Yeah, tagging is about adding that tag, but the manual doesn’t tell to set it to
(ofc, you need to change the dataset names there) |
I think this bug hit me today. Normally I wouldn't bother reporting behavior with this sparse of information but the bug deleted my home directory and after a few hours attempting recovery I'm pretty sure it's gone. This was on ubuntu 21.04, zfs 2.02, Linux 5.11.0-7620 with an encrypted home directory. Admittedly vague notes:
From that point forward the home directory dataset was gone. Zpool history did not show the deletion but it was there with the -i flag. I have a log file with that in it that I'll post when I have a new system up and running. I think there is a chance you can exhibit this bug by logging in to a fresh install via recovery mode, unmounting the home filesystem and rebooting but can't be sure other interactions don't play a part. I can't help but think there should be a tag/flag you can affix to certain datasets that marks them ineligible for destruction except for a very manual cli "zfs destroy -f NAME". |
While you propose that unvoluntary destruction of datasets should be opt-out, I would rather vote for making voluntary destruction of datasets opt-in. This means we would only allow to destroy datasets that have a certain property set, and not the other way round. But as of #213, I fear we can rather consider ZSYS as abandoned, with ZFS support leaving experimental status on Ubuntu nowadays. I am unable to figure out how this can go well together, but the world is contradictory at times. |
While I understand zsys is no longer maintained, this issue is scaring the crap out of a lot of people and puts the project under a bad light. I myself have moved to zrepl despite always tagging every dataset. If Ubuntu is not funding this maybe you could try a crowdfunding platform instead (Github Sponsors, patreon, gofundme, whatever)? Development will be slow (I don't see to many people interested, albeit there are surely some) but at least it won't be completely unmaintained with huge bugs eating your data. |
I have to chime in here, even if it's a bit Though there hasn't been a formal announcement from Canonical about the status of What's problematic here is that this is (was?) a supported installation method, and because of this bug there's a very real risk of data loss -- just ask @jdavidberger. Because Even if Canonical sees no future in |
AFAIK Ubuntu 22.04 will install ZFS and set up the datasets through their Ubiquity installer, but it won't install Please see this line, where the installation of zsys is commented out (permalink to latest current LTS ref): |
I wouldn't rejoice over zsys being dropped. It's bugged, of course, but it's a really nice and convenient piece of software. |
This might be helpful in case of issues with backups. |
Describe the bug
When custom datasets are present in the system, they are not recognised by zsys and sceduled for destuction. That's probably a new incarnation of a bug #103 reported earlier.
Before actually deleting filesystem there were two failed attempts:
From
zpool history -il rpool
output:Filesystem got deleted silently, without any notice:
To Reproduce
general.minfreepoolspace
Installed versions:
The text was updated successfully, but these errors were encountered: