Commit Graph

8 Commits

Author SHA1 Message Date
Sören Tempel
eda3d4e1de Refactor dracut module
Provide '/lib/dracut-zfs-lib.sh' with utility functions.

Signed-off-by: Sören Tempel <soeren+git@soeren-tempel.net>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #3109
2015-06-17 16:45:18 -07:00
Gordan Bobic
7b4536c710 Execute udevadm settle before trying to import pools
Execute udevadm settle before trying to import pools.  Otherwise the
disk device nodes may not be ready before import time.  This is
analogous to the behavior of the init scripts and systemd units.

Signed-off-by: Gordan Bobic <gordan@steel.shatteredsilicon.net>
Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #3213
2015-03-24 13:38:55 -07:00
Sören Tempel
cfbaa3c830 Use test(1) in a proper way
Use the correct operators to check the expected data type.

Signed-off-by: Soeren Tempel <soeren+git@soeren-tempel.net>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #3093
2015-02-13 15:58:18 -08:00
Lukas Wunner
bf5efb5c66 Fix Dracut scripts to allow for blanks in pool and dataset names
The ability to use blanks is documented in zpool(8) and implemented
in module/zcommon/zfs_namecheck.c:valid_char().

Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #3083
2015-02-09 10:08:43 -08:00
Lukas Wunner
07a3312f17 Amend Dracut module to export ZFS root on shutdown
Make use of Dracut's ability to restore the initramfs on shutdown and
pivot to it, allowing for a clean unmount and export of the ZFS root.
No need to force-import on every reboot anymore.

Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #2195
Issue #2476
Issue #2498
Issue #2556
Issue #2563
Issue #2575
Issue #2600
Issue #2755
Issue #2766
2014-10-07 10:20:56 -07:00
Evan Susarret
dc55d79101 Correct autodetection of bootfs property
Remove lines that contain only a hyphen (match '^-$' instead of '-').

I had a root fs with a hyphen in the name (fedora/ROOT/Fedora20-Dev),
it was not detected because sed eliminated that line of output from
'zpool list -Ho bootfs'.

Signed-off-by: Evan Susarret <evansus@gmail.com>
Signed-off-by: Turbo Fredriksson <turbo@bayour.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #2196
2014-08-13 16:53:06 -07:00
Zachary Bedell
c39b2786ac Fix boot failure in Dracut scripts.
mount-zfs.sh script incorrectly parsed results from zpool list.  Correct
bootfs attribute was only found on systems with a single pool or where
the bootable pool's name alphabetized to before all other pool names.
Boot failed when the bootable pool's name came after other pools
(IE 'rpool' and 'mypool' would fail to find bootfs on rpool.)

Patch correctly discards pools whose bootfs attribute is blank ('-').

Signed-off-by: Zachary Bedell <zac@thebedells.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #402
2011-09-26 09:29:51 -07:00
Kyle Fuller
f0102d6e75 Make dracut module-setup.sh an autoconf config file
This ensures that module-setup.sh script will always be able to
install the required dracut components regardless of how the zfs
package was configured.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2011-08-19 16:26:13 -07:00