Do not import a pool that the kernel automatically imported

This works around the following upstream issue:
https://github.com/zfsonlinux/zfs/issues/714

Signed-off-by: Richard Yao <ryao@cs.stonybrook.edu>
cleanup-cruft
Richard Yao 13 years ago
parent 6968584a58
commit b5b535f5aa

@ -654,7 +654,7 @@ startVolumes() {
if [ "${USE_ZFS}" = '1' ] if [ "${USE_ZFS}" = '1' ]
then then
if [ -z "${ZFS_POOL}" ]; if [ -z "${ZFS_POOL}" ]
then then
good_msg "Importing ZFS pools" good_msg "Importing ZFS pools"
@ -667,6 +667,11 @@ startVolumes() {
bad_msg "Imported ZFS pools failed" bad_msg "Imported ZFS pools failed"
fi fi
else else
if [ "$(zpool list -H -o name ${ZFS_POOL} 2>&1)" = "$ZFS_POOL" ]
then
good_msg "ZFS pool ${ZFS_POOL} already imported"
else
good_msg "Importing ZFS pool ${ZFS_POOL}" good_msg "Importing ZFS pool ${ZFS_POOL}"
/sbin/zpool import -N "${ZPOOL_FORCE}" "${ZFS_POOL}" /sbin/zpool import -N "${ZPOOL_FORCE}" "${ZFS_POOL}"
@ -679,6 +684,7 @@ startVolumes() {
fi fi
fi fi
fi fi
fi
} }
startiscsi() { startiscsi() {

Loading…
Cancel
Save