4 .\" The contents of this file are subject to the terms of the
5 .\" Common Development and Distribution License (the "License").
6 .\" You may not use this file except in compliance with the License.
8 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 .\" or http://www.opensolaris.org/os/licensing.
10 .\" See the License for the specific language governing permissions
11 .\" and limitations under the License.
13 .\" When distributing Covered Code, include this CDDL HEADER in each
14 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 .\" If applicable, add the following below this CDDL HEADER, with the
16 .\" fields enclosed by brackets "[]" replaced with your own identifying
17 .\" information: Portions Copyright [yyyy] [name of copyright owner]
22 .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
23 .\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
24 .\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
25 .\" Copyright (c) 2017 Datto Inc.
26 .\" Copyright (c) 2018 George Melikov. All Rights Reserved.
27 .\" Copyright 2017 Nexenta Systems, Inc.
28 .\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
35 .Nd Lists ZFS storage pools available to import or import the specified pools
40 .Op Fl d Ar dir Ns | Ns device
45 .Op Fl F Oo Fl n Oc Oo Fl T Oc Oo Fl X Oc
46 .Op Fl -rewind-to-checkpoint
47 .Op Fl c Ar cachefile Ns | Ns Fl d Ar dir Ns | Ns device
49 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
54 .Op Fl F Oo Fl n Oc Oo Fl T Oc Oo Fl X Oc
55 .Op Fl -rewind-to-checkpoint
56 .Op Fl c Ar cachefile Ns | Ns Fl d Ar dir Ns | Ns device
58 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
61 .Ar pool Ns | Ns Ar id
62 .Op Ar newpool Oo Fl t Oc
69 .Op Fl d Ar dir Ns | Ns device
71 Lists pools available to import.
75 options are not specified, this command searches for devices using libblkid
76 on Linux and geom on FreeBSD.
79 option can be specified multiple times, and all directories are searched.
80 If the device appears to be part of an exported pool, this command displays a
81 summary of the pool with the name of the pool, a numeric identifier, as well as
82 the vdev layout and current health of the device for each device or file.
83 Destroyed pools, pools that were previously destroyed with the
85 command, are not listed unless the
89 The numeric identifier is unique, and can be used instead of the pool name when
90 multiple exported pools of the same name are available.
93 Reads configuration from the given
95 that was created with the
100 is used instead of searching for devices.
101 .It Fl d Ar dir Ns | Ns Ar device
104 or searches for devices or files in
108 option can be specified multiple times.
110 Lists destroyed pools only.
117 .Op Fl F Oo Fl n Oc Oo Fl T Oc Oo Fl X Oc
118 .Op Fl c Ar cachefile Ns | Ns Fl d Ar dir Ns | Ns device
120 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
124 Imports all pools found in the search directories.
125 Identical to the previous command, except that all pools with a sufficient
126 number of devices available are imported.
127 Destroyed pools, pools that were previously destroyed with the
129 command, will not be imported unless the
134 Searches for and imports all pools found.
135 .It Fl c Ar cachefile
136 Reads configuration from the given
138 that was created with the
143 is used instead of searching for devices.
144 .It Fl d Ar dir Ns | Ns Ar device
147 or searches for devices or files in
151 option can be specified multiple times.
152 This option is incompatible with the
156 Imports destroyed pools only.
159 option is also required.
161 Forces import, even if the pool appears to be potentially active.
163 Recovery mode for a non-importable pool.
164 Attempt to return the pool to an importable state by discarding the last few
166 Not all damaged pools can be recovered by using this option.
167 If successful, the data from the discarded transactions is irretrievably lost.
168 This option is ignored if the pool is importable or already imported.
170 Indicates that this command will request encryption keys for all encrypted
171 datasets it attempts to mount as it is bringing the pool online. Note that if
176 this command will block waiting for the keys to be entered. Without this flag
177 encrypted datasets will be left unavailable until the keys are loaded.
179 Allows a pool to import when there is a missing log device.
180 Recent transactions can be lost because the log device will be discarded.
185 Determines whether a non-importable pool can be made importable again, but does
186 not actually perform the pool recovery.
187 For more details about pool recovery mode, see the
191 Import the pool without mounting any file systems.
193 Comma-separated list of mount options to use when mounting datasets within the
197 for a description of dataset properties and mount options.
198 .It Fl o Ar property Ns = Ns Ar value
199 Sets the specified property on the imported pool.
202 manual page for more information on the available pool properties.
212 .It Fl -rewind-to-checkpoint
213 Rewinds pool to the checkpointed state.
214 Once the pool is imported with this flag there is no way to undo the rewind.
215 All changes and data that were written after the checkpoint are lost!
216 The only exception is when the
218 mounting option is enabled.
219 In this case, the checkpointed state of the pool is opened and an
220 administrator can see how the pool would look like if they were
223 Scan using the default search path, the libblkid cache will not be
224 consulted. A custom search path may be specified by setting the
225 ZPOOL_IMPORT_PATH environment variable.
229 recovery option. Determines whether extreme
230 measures to find a valid txg should take place. This allows the pool to
231 be rolled back to a txg which is no longer guaranteed to be consistent.
232 Pools imported at an inconsistent txg may contain uncorrectable
233 checksum errors. For more details about pool recovery mode, see the
235 option, above. WARNING: This option can be extremely hazardous to the
236 health of your pool and should only be used as a last resort.
238 Specify the txg to use for rollback. Implies
241 about pool recovery mode, see the
243 option, above. WARNING: This option can be extremely hazardous to the
244 health of your pool and should only be used as a last resort.
250 .Op Fl F Oo Fl n Oc Oo Fl t Oc Oo Fl T Oc Oo Fl X Oc
251 .Op Fl c Ar cachefile Ns | Ns Fl d Ar dir Ns | Ns device
253 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
256 .Ar pool Ns | Ns Ar id
259 Imports a specific pool.
260 A pool can be identified by its name or the numeric identifier.
263 is specified, the pool is imported using the name
265 Otherwise, it is imported with the same name as its exported name.
267 If a device is removed from a system without running
269 first, the device appears as potentially active.
270 It cannot be determined if this was a failed export, or whether the device is
271 really in use from another host.
272 To import a pool in this state, the
276 .It Fl c Ar cachefile
277 Reads configuration from the given
279 that was created with the
284 is used instead of searching for devices.
285 .It Fl d Ar dir Ns | Ns Ar device
288 or searches for devices or files in
292 option can be specified multiple times.
293 This option is incompatible with the
297 Imports destroyed pool.
300 option is also required.
302 Forces import, even if the pool appears to be potentially active.
304 Recovery mode for a non-importable pool.
305 Attempt to return the pool to an importable state by discarding the last few
307 Not all damaged pools can be recovered by using this option.
308 If successful, the data from the discarded transactions is irretrievably lost.
309 This option is ignored if the pool is importable or already imported.
311 Indicates that this command will request encryption keys for all encrypted
312 datasets it attempts to mount as it is bringing the pool online. Note that if
317 this command will block waiting for the keys to be entered. Without this flag
318 encrypted datasets will be left unavailable until the keys are loaded.
320 Allows a pool to import when there is a missing log device.
321 Recent transactions can be lost because the log device will be discarded.
326 Determines whether a non-importable pool can be made importable again, but does
327 not actually perform the pool recovery.
328 For more details about pool recovery mode, see the
332 Comma-separated list of mount options to use when mounting datasets within the
336 for a description of dataset properties and mount options.
337 .It Fl o Ar property Ns = Ns Ar value
338 Sets the specified property on the imported pool.
341 manual page for more information on the available pool properties.
352 Scan using the default search path, the libblkid cache will not be
353 consulted. A custom search path may be specified by setting the
354 ZPOOL_IMPORT_PATH environment variable.
358 recovery option. Determines whether extreme
359 measures to find a valid txg should take place. This allows the pool to
360 be rolled back to a txg which is no longer guaranteed to be consistent.
361 Pools imported at an inconsistent txg may contain uncorrectable
362 checksum errors. For more details about pool recovery mode, see the
364 option, above. WARNING: This option can be extremely hazardous to the
365 health of your pool and should only be used as a last resort.
367 Specify the txg to use for rollback. Implies
370 about pool recovery mode, see the
372 option, above. WARNING: This option can be extremely hazardous to the
373 health of your pool and should only be used as a last resort.
379 is temporary. Temporary pool names last until export. Ensures that
380 the original pool name will be used in all label updates and therefore
381 is retained upon export.
382 Will also set -o cachefile=none when not explicitly specified.