From 522db29275b81c18c2bf53a95efa1aedeb13b428 Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Fri, 26 Jan 2018 10:49:46 -0800 Subject: zpool import -d to specify device path When we know which devices have the pool we are looking for, sometime it's better if we can directly pass those device paths to zpool import instead of letting it to search through all unrelated stuff, which might take a lot of time if you have hundreds of disks. This patch allows option -d to zpool import. You can have multiple pairs of -d , and zpool import will only search through those devices. For example: zpool import -d /dev/sda -d /dev/sdb Reviewed-by: Tony Hutter Reviewed-by: Brian Behlendorf Signed-off-by: Chunwei Chen Closes #7077 --- man/man8/zpool.8 | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) (limited to 'man/man8/zpool.8') diff --git a/man/man8/zpool.8 b/man/man8/zpool.8 index 64f570d7b..c69ff8446 100644 --- a/man/man8/zpool.8 +++ b/man/man8/zpool.8 @@ -87,13 +87,13 @@ .Nm .Cm import .Op Fl D -.Op Fl d Ar dir +.Op Fl d Ar dir Ns | Ns device .Nm .Cm import .Fl a .Op Fl DflmN .Op Fl F Oo Fl n Oc Oo Fl T Oc Oo Fl X Oc -.Op Fl c Ar cachefile Ns | Ns Fl d Ar dir +.Op Fl c Ar cachefile Ns | Ns Fl d Ar dir Ns | Ns device .Op Fl o Ar mntopts .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... .Op Fl R Ar root @@ -101,7 +101,7 @@ .Cm import .Op Fl Dflm .Op Fl F Oo Fl n Oc Oo Fl T Oc Oo Fl X Oc -.Op Fl c Ar cachefile Ns | Ns Fl d Ar dir +.Op Fl c Ar cachefile Ns | Ns Fl d Ar dir Ns | Ns device .Op Fl o Ar mntopts .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... .Op Fl R Ar root @@ -1137,7 +1137,7 @@ performed. .Nm .Cm import .Op Fl D -.Op Fl d Ar dir +.Op Fl d Ar dir Ns | Ns device .Xc Lists pools available to import. If the @@ -1168,8 +1168,10 @@ pool property. This .Ar cachefile is used instead of searching for devices. -.It Fl d Ar dir -Searches for devices or files in +.It Fl d Ar dir Ns | Ns Ar device +Uses +.Ar device +or searches for devices or files in .Ar dir . The .Fl d @@ -1183,7 +1185,7 @@ Lists destroyed pools only. .Fl a .Op Fl DflmN .Op Fl F Oo Fl n Oc Oo Fl T Oc Oo Fl X Oc -.Op Fl c Ar cachefile Ns | Ns Fl d Ar dir +.Op Fl c Ar cachefile Ns | Ns Fl d Ar dir Ns | Ns device .Op Fl o Ar mntopts .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... .Op Fl R Ar root @@ -1209,8 +1211,10 @@ pool property. This .Ar cachefile is used instead of searching for devices. -.It Fl d Ar dir -Searches for devices or files in +.It Fl d Ar dir Ns | Ns Ar device +Uses +.Ar device +or searches for devices or files in .Ar dir . The .Fl d @@ -1304,7 +1308,7 @@ health of your pool and should only be used as a last resort. .Cm import .Op Fl Dflm .Op Fl F Oo Fl n Oc Oo Fl t Oc Oo Fl T Oc Oo Fl X Oc -.Op Fl c Ar cachefile Ns | Ns Fl d Ar dir +.Op Fl c Ar cachefile Ns | Ns Fl d Ar dir Ns | Ns device .Op Fl o Ar mntopts .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... .Op Fl R Ar root @@ -1338,8 +1342,10 @@ pool property. This .Ar cachefile is used instead of searching for devices. -.It Fl d Ar dir -Searches for devices or files in +.It Fl d Ar dir Ns | Ns Ar device +Uses +.Ar device +or searches for devices or files in .Ar dir . The .Fl d -- cgit v1.2.3