Whamcloud - gitweb
LU-3264 tests: import ZFS pool which has file-based vdev
authorJian Yu <jian.yu@intel.com>
Thu, 16 May 2013 13:36:39 +0000 (21:36 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 21 May 2013 05:36:15 +0000 (01:36 -0400)
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>

index 231b6c3..f9ab7a6 100644 (file)
@@ -916,6 +916,7 @@ import_zpool() {
        poolname=$(zpool_name $facet)
        if [[ -n "$poolname" ]]; then
+               opts+=" -d $(dirname $(facet_vdevice $facet))"
                do_facet $facet "$ZPOOL import -f $opts $poolname"