diff options
author | Brian Behlendorf <[email protected]> | 2011-06-30 14:45:33 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2011-06-30 14:45:33 -0700 |
commit | 2a005961a48e748632e96272915192dab6ce9401 (patch) | |
tree | 52aaace193c3787086a1877648570c96a3f22095 /etc/init.d/zfs.lunar | |
parent | 218b8eafbdcb9bc19fc5a252fdd411fde11bca48 (diff) |
Ensure all block devices are available
These days most disk drivers will probe for devices asynchronously.
This means it's possible that when you zfs init script runs all the
required block devices may not yet have been discovered. The result
is the pool may fail to cleanly import at boot time. This is
particularly common when you have a large number of devices.
The fix is for the init script to block until udev settles and we
are no longer detecting new devices. Once the system has settled
the zfs modules can be loaded and the pool with be automatically
imported.
Diffstat (limited to 'etc/init.d/zfs.lunar')
-rw-r--r-- | etc/init.d/zfs.lunar | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/etc/init.d/zfs.lunar b/etc/init.d/zfs.lunar index c7aa1edb4..4512151c2 100644 --- a/etc/init.d/zfs.lunar +++ b/etc/init.d/zfs.lunar @@ -13,6 +13,9 @@ case $1 in start) echo "$1ing ZFS filesystems" + # Delay until all required block devices are present. + udevadm settle + if ! grep "zfs" /proc/modules > /dev/null; then echo "ZFS kernel module not loaded yet; loading..."; if ! modprobe zfs; then |