Index: zpool_main.c =================================================================== --- zpool_main.c (revision 237199) +++ zpool_main.c (working copy) @@ -221,14 +221,16 @@ return (gettext("\thistory [-il] [] ...\n")); case HELP_IMPORT: return (gettext("\timport [-d dir] [-D]\n" - "\timport [-d dir | -c cachefile] [-F [-n]] \n" + "\timport [-d dir | -c cachefile] [-F [-X | -n]] \n" "\timport [-o mntopts] [-o property=value] ... \n" "\t [-d dir | -c cachefile] [-D] [-f] [-m] [-N] " - "[-R root] [-F [-n]] -a\n" + "[-R root] [-F [-X | -n]] -a\n" "\timport [-o mntopts] [-o property=value] ... \n" "\t [-d dir | -c cachefile] [-D] [-f] [-m] [-N] " - "[-R root] [-F [-n]]\n" - "\t [newpool]\n")); + "[-R root] [-F [-X | -n]]\n" + "\t [newpool]\n" + "\timport [-V] \n" + "\timport [-T] \n")); case HELP_IOSTAT: return (gettext("\tiostat [-v] [-T d|u] [pool] ... [interval " "[count]]\n")); Index: zpool.8 =================================================================== --- zpool.8 (revision 237199) +++ zpool.8 (working copy) @@ -21,8 +21,10 @@ .\" Copyright 2011, Nexenta Systems, Inc. All Rights Reserved. .\" Copyright (c) 2011, Justin T. Gibbs .\" Copyright (c) 2012 by Delphix. All Rights Reserved. +.\" Copyright (c) 2012 by Marcelo Araujo . +.\" All Rights Reserved. .\" -.\" $FreeBSD$ +.\" $FreeBSD: head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 236155 2012-05-27 16:00:00Z mm $ .\" .Dd November 28, 2011 .Dt ZPOOL 8 @@ -91,7 +93,7 @@ .Op Fl m .Op Fl N .Op Fl R Ar root -.Op Fl F Op Fl n +.Op Fl F Op Fl X | Fl n .Fl a .Nm .Cm import @@ -104,10 +106,19 @@ .Op Fl m .Op Fl N .Op Fl R Ar root -.Op Fl F Op Fl n +.Op Fl F Op Fl X | Fl n .Ar pool | id .Op Ar newpool .Nm +.Cm import +.Op Fl V +.Ar pool | id +.Nm +.Cm import +.Op Fl T +.Ar pool | id +.Op txg +.Nm .Cm iostat .Op Fl T Cm d Ns | Ns Cm u .Op Fl v @@ -190,7 +201,7 @@ A .Qq virtual device .Pq No vdev -describes a single device or a collection of devices organized according to +describes a single device or a collection of devices organized according to certain performance and fault characteristics. The following virtual devices are supported: .Bl -tag @@ -238,7 +249,7 @@ group can have single-, double- , or triple parity, meaning that the .No raidz group can sustain one, two, or three failures, respectively, without -losing any data. The +losing any data. The .Sy raidz1 No vdev type specifies a single-parity .No raidz @@ -288,7 +299,7 @@ .No raidz .No vdev types are not supported for the intent log. For more information, -see the +see the .Qq Sx Intent Log section. .It Sy cache @@ -310,13 +321,13 @@ (known as .Qq root .No vdev Ns s). -Data is dynamically distributed across all top-level devices to balance data +Data is dynamically distributed across all top-level devices to balance data among devices. As new virtual devices are added, .Tn ZFS automatically places data on the newly available devices. .Pp Virtual devices are specified one at a time on the command line, separated by -whitespace. The keywords +whitespace. The keywords .Qq mirror and .Qq raidz @@ -429,7 +440,7 @@ .Qq hot spares . These devices are not actively used in the pool, but when an active device fails, it is automatically replaced by a hot spare. To create a pool with hot -spares, specify a +spares, specify a .Qq spare .No vdev with any number of devices. For example, @@ -459,7 +470,7 @@ .Pp Spares cannot replace log devices. .Ss Intent Log -The +The .Tn ZFS Intent Log .Pq Tn ZIL @@ -598,7 +609,7 @@ .Sy altroot is not a persistent property. It is valid only while the system is up. Setting -.Sy altroot +.Sy altroot defaults to using .Cm cachefile=none , though this may be overridden using an explicit setting. @@ -643,9 +654,9 @@ .It Sy autoreplace Ns = Ns Cm on No | Cm off Controls automatic device replacement. If set to .Qq Cm off , -device replacement must be initiated by the administrator by using the +device replacement must be initiated by the administrator by using the .Qq Nm Cm replace -command. If set to +command. If set to .Qq Cm on , any new device, found in the same physical location as a device that previously belonged to the pool, is @@ -666,7 +677,7 @@ .Qq Nm Cm import Fl c . Setting it to the special value .Qq Cm none -creates a temporary pool that is never cached, and the special value +creates a temporary pool that is never cached, and the special value .Cm '' (empty string) uses the default location. .It Sy comment Ns = Ns Ar text @@ -677,7 +688,7 @@ .It Sy dedupditto Ns = Ns Ar number Threshold for the number of block ditto copies. If the reference count for a deduplicated block increases above this number, a new ditto copy of this block -is automatically stored. Default setting is +is automatically stored. Deafult setting is .Cm 0 . .It Sy delegation Ns = Ns Cm on No | Cm off Controls whether a non-privileged user is granted access based on the dataset @@ -897,7 +908,7 @@ option is specified. .Bl -tag -width indent .It Fl f -Forces use of +Forces use of .Ar vdev Ns s, even if they appear in use or specify a conflicting replication level. Not all devices can be overridden in this manner. @@ -944,7 +955,7 @@ .Qq Cm altroot Ns Pa /pool if .Sy altroot -is specified. The mount point must be an absolute path, +is specified. The mount point must be an absolute path, .Qq Cm legacy , or .Qq Cm none . @@ -1104,7 +1115,7 @@ .Op Fl m .Op Fl N .Op Fl R Ar root -.Op Fl F Op Fl n +.Op Fl F Op Fl X | n .Fl a .Xc .Pp @@ -1166,6 +1177,11 @@ can be recovered by using this option. If successful, the data from the discarded transactions is irretrievably lost. This option is ignored if the pool is importable or already imported. +.It Fl X +Used with the +.Fl F +recovery option. Try to import a non-importable pool from an extreme rewind, +it should be used very carefully. .It Fl n Used with the .Fl F @@ -1178,7 +1194,6 @@ Searches for and imports all pools found. .El .It Xo -.Nm .Cm import .Op Fl o Ar mntopts .Op Fl o Ar property Ns = Ns Ar value @@ -1189,7 +1204,7 @@ .Op Fl m .Op Fl N .Op Fl R Ar root -.Op Fl F Op Fl n +.Op Fl F Op Fl X | n .Ar pool | id .Op Ar newpool .Xc @@ -1253,6 +1268,11 @@ can be recovered by using this option. If successful, the data from the discarded transactions is irretrievably lost. This option is ignored if the pool is importable or already imported. +.It Fl X +Used with the +.Fl F +recovery option. Try to import a non-importable pool from an extreme rewind, +it should be used very carefully. .It Fl n Used with the .Fl F @@ -1264,6 +1284,31 @@ .El .It Xo .Nm +.Cm import +.Op Fl V +.Ar pool | id +.Xc +.Pp +Import the pool even if there is any faulted vdevs, this option treats the pool configuration as it is completed, leaving any bad vdevs in the FAULTED state, it does a verbatim import. +.Bl -tag -width indent +.It Fl V +Import the pool in the verbatim mode, this option shall be used carefully due it will import the pool even if there is any vdevs faulted. +.El +.It Xo +.Nm +.Cm import +.Op Fl T +.Ar pool | id +.Op Ar txg +.Xc +.Pp +Specify a txg from where will starting to import the pool. +.Bl -tag -width indent +.It Fl T +Import the pool from a given txg. +.El +.It Xo +.Nm .Cm iostat .Op Fl T Cm d Ns | Ns Cm u .Op Fl v @@ -1281,7 +1326,7 @@ .Sy Ctrl-C is pressed. If no .Ar pools -are specified, statistics for every pool in the system is shown. If +are specified, statistics for every pool in the system is shown. If .Ar count is specified, the command exits after .Ar count @@ -1339,7 +1384,7 @@ .Ar interval seconds until .Sy Ctrl-C -is pressed. If +is pressed. If .Ar count is specified, the command exits after .Ar count @@ -1348,8 +1393,6 @@ .It Fl H Scripted mode. Do not display headers, and separate fields by a single tab instead of arbitrary space. -.It Fl v -Show more detailed information. .It Fl o Ar property Ns Op , Ns Ar ... Comma-separated list of properties to display. See the .Qq Sx Properties @@ -1445,7 +1488,7 @@ waiting for it to resilver, and then detaching .Ar old_device . .Pp -The size of +The size of .Ar new_device must be greater than or equal to the minimum size of all the devices in a mirror or @@ -1456,7 +1499,7 @@ is required if the pool is not redundant. If .Ar new_device is not specified, it defaults to -.Ar old_device . +.Ar old_device . This form of replacement is useful after an existing disk has failed and has been physically replaced. In this case, the new disk may have the same .Pa /dev @@ -1543,12 +1586,12 @@ .Pp When using a .Ar device -argument, +argument, .Cm split -includes the specified device(s) in a new pool and, should any devices remain +includes the specified device(s) in a new pool and, should any devices remain unspecified, assigns the last device in each mirror .No vdev -to that pool, as it does normally. If you are uncertain about the outcome of a +to that pool, as it does normally. If you are uncertain about the outcome of a .Cm split command, use the .Fl n @@ -1601,7 +1644,7 @@ .Ar interval seconds until .Sy Ctrl-C -is pressed. If +is pressed. If .Ar count is specified, the command exits after .Ar count