Determining Available Storage Pools to Import
After the pool has been removed from the system, you can attach the devices to the target system. You do not need to attach them under the same device name. ZFS detects any moved or renamed devices and adjusts the configuration appropriately. Note that ZFS can handle some situations in which only some of the devices are available. However, a successful pool migration depends on the overall health of all the devices.
Use the following general command syntax for all pool import operations:
$ zpool import [options] [pool|ID-number]
To discover available pools that can be imported, run the zpool import
command without specifying pools. In the output, the pools are identified by names and unique number identifiers. If pools available for import share the same name, use the numeric identifier to import the correct pool.
If problems exist with a pool to be imported, the command output also provides the appropriate information to help you determine what action to take.
In the following example, one of the devices is missing but you can still import the pool because the mirrored data remains accessible.
$ zpool import
pool: system1
id: 4715259469716913940
state: DEGRADED
status: One or more devices are unavailable.
action: The pool can be imported despite missing or damaged devices. The
fault tolerance of the pool may be compromised if imported.
config:
system1 DEGRADED
mirror-0 DEGRADED
c0t5000C500335E106Bd0 ONLINE
c0t5000C500335FC3E7d0 UNAVAIL cannot open
device details:
c0t5000C500335FC3E7d0 UNAVAIL cannot open
status: ZFS detected errors on this device.
The device was missing.
In the following example, because two disks are missing from a RAID-Z virtual device, not enough redundant data exists to reconstruct the pool. With insufficient available devices, ZFS cannot import the pool.
$ zpool import
pool: mothership
id: 3702878663042245922
state: UNAVAIL
status: One or more devices are unavailable.
action: The pool cannot be imported due to unavailable devices or data.
config:
mothership UNAVAIL insufficient replicas
raidz1-0 UNAVAIL insufficient replicas
c8t0d0 UNAVAIL cannot open
c8t1d0 UNAVAIL cannot open
c8t2d0 ONLINE
c8t3d0 ONLINE
device details:
c8t0d0 UNAVAIL cannot open
status: ZFS detected errors on this device.
The device was missing.
c8t1d0 UNAVAIL cannot open
status: ZFS detected errors on this device.
The device was missing.