Michael Kjörling
2013-12-05 09:08:35 UTC
(I tried sending this yesterday, but for some reason it doesn't seem
to have made it. Sorry if it ends up being a duplicate.)
OK, this is one of those questions that are likely to, when answered,
hit me as "why didn't I think of that, stupid?". But I can't seem to
figure it out.
I am running Debian Wheezy with ZFS On Linux installed through the
'debian-zfs' 7~wheezy package and friends. And aside from the very
occasional hiccup that may or may not even be ZFS-related, it's
working splendidly.
However, despite (or perhaps because of) the fact that zfs-mount is
executed as S01 in runlevel 2, the ZFS file systems are mounted _very_
late during the boot process. It's early enough to not cause much
grief for starting software, but it's late enough that there's already
quite a few processes running and a fair bit of boot work has been
done by the time those file systems get mounted.
I want to move mounting ZFS file systems considerably earlier. To that
end, I tried editing /etc/init.d/zfs-mount to indicate:
# Default-Start: S 1 2 3 4 5
# Default-Stop: 0 6
rather than the distributed:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
I also tried changing from:
# Required-Start: $local_fs
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
to:
# Required-Start: mountall
# Required-Stop:
# Default-Start: S
# Default-Stop: 0 6
When I then tried to execute 'update-rc.d -f zfs-mount' with either of
these changes made, it spewed out a whole series of warnings about
mismatched runlevels and didn't seem to do anything. Manually deleting
the /etc/rc?.d/???zfs-mount symlinks first appeared to have the same
effect. When I restored the two lines in the init script to what they
were like in the distributed package, the warnings went away.
Specifically, the warnings were very much along the lines of (these
copied from my most recent attempt):
update-rc.d: using dependency based boot sequencing
update-rc.d: warning: default start runlevel arguments (2 3 4 5) do not match zfs-mount Default-Start values (S)
update-rc.d: warning: default stop runlevel arguments (0 1 6) do not match zfs-mount Default-Stop values (0 6)
insserv: warning: current start runlevel(s) (2 3 4 5) of script `zfs-mount' overrides LSB defaults (S).
insserv: warning: current stop runlevel(s) (0 1 6) of script `zfs-mount' overrides LSB defaults (0 6).
insserv: warning: current start runlevel(s) (2 3 4 5) of script `zfs-mount' overrides LSB defaults (S).
insserv: warning: current stop runlevel(s) (0 1 6) of script `zfs-mount' overrides LSB defaults (0 6).
insserv: warning: current start runlevel(s) (2 3 4 5) of script `zfs-mount' overrides LSB defaults (S).
insserv: warning: current stop runlevel(s) (0 1 6) of script `zfs-mount' overrides LSB defaults (0 6).
What changes do I need to make in order to make ZFS file systems mount
as early as possible, _preferably together with rcS/mountall?_
to have made it. Sorry if it ends up being a duplicate.)
OK, this is one of those questions that are likely to, when answered,
hit me as "why didn't I think of that, stupid?". But I can't seem to
figure it out.
I am running Debian Wheezy with ZFS On Linux installed through the
'debian-zfs' 7~wheezy package and friends. And aside from the very
occasional hiccup that may or may not even be ZFS-related, it's
working splendidly.
However, despite (or perhaps because of) the fact that zfs-mount is
executed as S01 in runlevel 2, the ZFS file systems are mounted _very_
late during the boot process. It's early enough to not cause much
grief for starting software, but it's late enough that there's already
quite a few processes running and a fair bit of boot work has been
done by the time those file systems get mounted.
I want to move mounting ZFS file systems considerably earlier. To that
end, I tried editing /etc/init.d/zfs-mount to indicate:
# Default-Start: S 1 2 3 4 5
# Default-Stop: 0 6
rather than the distributed:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
I also tried changing from:
# Required-Start: $local_fs
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
to:
# Required-Start: mountall
# Required-Stop:
# Default-Start: S
# Default-Stop: 0 6
When I then tried to execute 'update-rc.d -f zfs-mount' with either of
these changes made, it spewed out a whole series of warnings about
mismatched runlevels and didn't seem to do anything. Manually deleting
the /etc/rc?.d/???zfs-mount symlinks first appeared to have the same
effect. When I restored the two lines in the init script to what they
were like in the distributed package, the warnings went away.
Specifically, the warnings were very much along the lines of (these
copied from my most recent attempt):
update-rc.d: using dependency based boot sequencing
update-rc.d: warning: default start runlevel arguments (2 3 4 5) do not match zfs-mount Default-Start values (S)
update-rc.d: warning: default stop runlevel arguments (0 1 6) do not match zfs-mount Default-Stop values (0 6)
insserv: warning: current start runlevel(s) (2 3 4 5) of script `zfs-mount' overrides LSB defaults (S).
insserv: warning: current stop runlevel(s) (0 1 6) of script `zfs-mount' overrides LSB defaults (0 6).
insserv: warning: current start runlevel(s) (2 3 4 5) of script `zfs-mount' overrides LSB defaults (S).
insserv: warning: current stop runlevel(s) (0 1 6) of script `zfs-mount' overrides LSB defaults (0 6).
insserv: warning: current start runlevel(s) (2 3 4 5) of script `zfs-mount' overrides LSB defaults (S).
insserv: warning: current stop runlevel(s) (0 1 6) of script `zfs-mount' overrides LSB defaults (0 6).
What changes do I need to make in order to make ZFS file systems mount
as early as possible, _preferably together with rcS/mountall?_
--
Michael Kjörling • http://michael.kjorling.se • michael-/***@public.gmane.org
“People who think they know everything really annoy
those of us who know we don’t.” (Bjarne Stroustrup)
To unsubscribe from this group and stop receiving emails from it, send an email to zfs-discuss+unsubscribe-VKpPRiiRko7s4Z89Ie/***@public.gmane.org
Michael Kjörling • http://michael.kjorling.se • michael-/***@public.gmane.org
“People who think they know everything really annoy
those of us who know we don’t.” (Bjarne Stroustrup)
To unsubscribe from this group and stop receiving emails from it, send an email to zfs-discuss+unsubscribe-VKpPRiiRko7s4Z89Ie/***@public.gmane.org