summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorTurbo Fredriksson <[email protected]>2015-06-27 14:31:43 +0200
committerBrian Behlendorf <[email protected]>2015-06-29 12:32:05 -0700
commitd6c9ff0a6be1e4b87f71a641a8973070ec46d01b (patch)
treebed280e3afe5b913f2b4c45bae9b4f23bb743094 /etc
parent84045c2ddfacd451cadfa0ea97617909c0137841 (diff)
Add /dev/mapper to the list of possible sources for pool devices.
This is especially needed when using LUKS backed pools. Signed-off-by: Turbo Fredriksson <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #3536
Diffstat (limited to 'etc')
-rwxr-xr-xetc/init.d/zfs-import.in9
1 files changed, 9 insertions, 0 deletions
diff --git a/etc/init.d/zfs-import.in b/etc/init.d/zfs-import.in
index dc674c49e..fed364a60 100755
--- a/etc/init.d/zfs-import.in
+++ b/etc/init.d/zfs-import.in
@@ -156,6 +156,15 @@ do_import()
ZPOOL_IMPORT_PATH="/dev/disk/by-vdev:"
fi
+ # Help with getting LUKS partitions etc imported.
+ if [ -d "/dev/mapper" ]; then
+ if [ -n "$ZPOOL_IMPORT_PATH" ]; then
+ ZPOOL_IMPORT_PATH="$ZPOOL_IMPORT_PATH:/dev/mapper:"
+ else
+ ZPOOL_IMPORT_PATH="/dev/mapper:"
+ fi
+ fi
+
# ... and /dev at the very end, just for good measure.
ZPOOL_IMPORT_PATH="$ZPOOL_IMPORT_PATH$dirs:/dev"
fi