-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Rollback before zfs root is mounted #15025
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
Conversation
On my machines I observe random failures caused by rollback happening after zfs root is mounted. I've observed two types of failures: - zfs-rollback-bootfs.service fails sying that rollback must be done just before mounting the dataset - boot process fails and rescue console is entered. After making this modification and testing it for couple of days none of those problems have been observed anymore. I don't know if `dracut-mount.service` is still needed in the `After` directive. Maybe someone else is able to address this? Signed-off-by: Wojciech Małota-Wójcik <[email protected]>
@gregory-lee-bartholomew would you mind taking a look at this PR. |
I just did a quick test of this patch on my PC and it looks fine.
Also, just from glancing at The only service I see getting skipped by moving zfs-rollback-bootfs.service before sysroot.mount is systemd-repart.service.
But that shouldn't cause any problems for this service. I don't remember for sure, but I suspect that dracut-mount.service was chosen as the upper limit for when the service would run simply because that is what zfs-import.target uses.
It would no longer be needed. But it isn't harming anything either. This PR looks OK to me. Edit: Note, however, that since this service is ordered after zfs-import.target, this change would effectively force zfs-import.target's |
The fact that this service exists is terrifying. Nothing so destructive ought to be automated, especially not as a systemd unit with zero error checking. |
It's not exactly automatic. It requires the user to enter "bootfs.rollback" on the kernel command line. It is just slightly more convenient than dropping to a Dracut rescue shell to enter the commands; especially if the user has "bootfs.snapshot" normally set on their kernel command line so they will occasionally get an automatic snapshot whenever they update their system and there is a kernel update. |
On my machines I observe random failures caused by rollback happening after zfs root is mounted. I've observed two types of failures: - zfs-rollback-bootfs.service fails saying that rollback must be done just before mounting the dataset - boot process fails and rescue console is entered. After making this modification and testing it for couple of days none of those problems have been observed anymore. I don't know if `dracut-mount.service` is still needed in the `After` directive. Maybe someone else is able to address this? Reviewed-by: Gregory Bartholomew <[email protected]> Signed-off-by: Wojciech Małota-Wójcik <[email protected]> Closes openzfs#15025
On my machines I observe random failures caused by rollback happening after zfs root is mounted. I've observed two types of failures: - zfs-rollback-bootfs.service fails saying that rollback must be done just before mounting the dataset - boot process fails and rescue console is entered. After making this modification and testing it for couple of days none of those problems have been observed anymore. I don't know if `dracut-mount.service` is still needed in the `After` directive. Maybe someone else is able to address this? Reviewed-by: Gregory Bartholomew <[email protected]> Signed-off-by: Wojciech Małota-Wójcik <[email protected]> Closes #15025
On my machines I observe random failures caused by rollback happening after zfs root is mounted. I've observed two types of failures: - zfs-rollback-bootfs.service fails saying that rollback must be done just before mounting the dataset - boot process fails and rescue console is entered. After making this modification and testing it for couple of days none of those problems have been observed anymore. I don't know if `dracut-mount.service` is still needed in the `After` directive. Maybe someone else is able to address this? Reviewed-by: Gregory Bartholomew <[email protected]> Signed-off-by: Wojciech Małota-Wójcik <[email protected]> Closes openzfs#15025
On my machines I observed random failures caused by rollback happening after zfs root
is mounted. I've observed two types of failures:
After making this modification and testing it for couple of days none of those problems
have been observed anymore. Looks like
dracut-mount.service
does not enforce the correctsequence and
sysroot.mount
does a better job here.I don't know if
dracut-mount.service
is still needed in theAfter
directive.Maybe someone else is able to address this?
Motivation and Context
Description
How Has This Been Tested?
Installed fixed service on my machines and observed them for couple of days.
Machines where root filesystem is reverted to the original snapshot on every boot.
Types of changes
Checklist:
Signed-off-by
.Signed-off-by: Wojciech Małota-Wójcik [email protected]