For "zpool import" command, if the -d option is not specified,
the command will only search for devices in "/dev". However,
for the pool which was created with file-based virtual device,
we need explicitly specify the search directory otherwise the
import command will not find the device.
Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I63ac141fdefcace99a1cf7c366e15f0067fa2a56
Reviewed-on: http://review.whamcloud.com/6358
Tested-by: Hudson
Reviewed-by: Li Wei <wei.g.li@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
poolname=$(zpool_name $facet)
if [[ -n "$poolname" ]]; then
+ opts+=" -d $(dirname $(facet_vdevice $facet))"
do_facet $facet "$ZPOOL import -f $opts $poolname"
fi
}