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

Local file system dependency for zfs-zed init script #7420

Closed
Ryushin opened this issue Apr 9, 2018 · 2 comments
Closed

Local file system dependency for zfs-zed init script #7420

Ryushin opened this issue Apr 9, 2018 · 2 comments

Comments

@Ryushin
Copy link

Ryushin commented Apr 9, 2018

The zfs-zed init script should have a local file system dependency so that /var is mounted before starting zed.

Patch:
--- a/etc/init.d/zfs-zed.in
+++ b/etc/init.d/zfs-zed.in
@@ -8,8 +8,8 @@
 #
 ### BEGIN INIT INFO
 # Provides:          zfs-zed
-# Required-Start:    zfs-mount
-# Required-Stop:     zfs-mount
+# Required-Start:    $local_fs zfs-mount
+# Required-Stop:     $local_fs zfs-mount
 # Default-Start:     2 3 4 5
 # Default-Stop:      0 1 6
 # X-Stop-After:      zfs-share
@loli10K
Copy link
Contributor

loli10K commented Apr 10, 2018

The zfs-zed init script should have a local file system dependency

I am not sure it should, doesn't "zfs-mount" require "$local_fs" already? It seems only logical for "Required-Start/Stop" to be transitive: just requiring "zfs-mount" should implicitly tell the init system to also wait for every other "zfs-mount" requirement/dependency.

https://github.com/zfsonlinux/zfs/blob/74df0c5e251a920a1966a011c16f960cd7ba562e/etc/init.d/zfs-mount.in#L15-L16

@Ryushin
Copy link
Author

Ryushin commented Apr 10, 2018

I've been working this over in my mind and I believe you are correct. Since zed depends on zfs-mount, and zfs-mount has already required the local file systems being mounted, then /var has to already be mounted at this point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants