Skip to content
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

Remount datasets on soft-reboot #16845

Merged
merged 1 commit into from
Dec 13, 2024
Merged

Conversation

kotauskas
Copy link
Contributor

@kotauskas kotauskas commented Dec 7, 2024

Motivation and Context

Currently, the one-shot zfs-mount.service is incorrectly deemed active by Systemd after a systemctl soft-reboot. As such, soft-rebooting prevents zfs mount -a from being ran automatically.

Description

This PR makes it so that zfs-mount.service is marked as being undone by the time umount.target is reached, so that zfs.target then pulls it in again and gets it restarted after a soft reboot.

How Has This Been Tested?

I put those changes into a drop-in and it made zfs mount -a run automatically after soft reboots as expected.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

@amotin amotin added the Status: Code Review Needed Ready for review and testing label Dec 11, 2024
Copy link
Contributor

@behlendorf behlendorf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. Thanks for the fix.

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Dec 13, 2024
@behlendorf behlendorf merged commit 586304a into openzfs:master Dec 13, 2024
24 checks passed
@kotauskas kotauskas deleted the patch-1 branch December 14, 2024 11:39
behlendorf pushed a commit to behlendorf/zfs that referenced this pull request Dec 16, 2024
The one-shot zfs-mount.service is incorrectly deemed active by 
Systemd after a systemctl soft-reboot. As such, soft-rebooting
prevents zfs mount -a from being ran automatically.

This commit makes it so that zfs-mount.service is marked as being 
undone by the time umount.target is reached, so that zfs.target then 
pulls it in again and gets it restarted after a soft reboot.

Reviewed by: Brian Behlendorf <[email protected]>
Signed-off-by: kotauskas <[email protected]>
Closes openzfs#16845
lundman pushed a commit to openzfsonwindows/openzfs that referenced this pull request Jan 26, 2025
The one-shot zfs-mount.service is incorrectly deemed active by 
Systemd after a systemctl soft-reboot. As such, soft-rebooting
prevents zfs mount -a from being ran automatically.

This commit makes it so that zfs-mount.service is marked as being 
undone by the time umount.target is reached, so that zfs.target then 
pulls it in again and gets it restarted after a soft reboot.

Reviewed by: Brian Behlendorf <[email protected]>
Signed-off-by: kotauskas <[email protected]>
Closes openzfs#16845
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants