After the pool has been removed from the system (either through an explicit export or by forcefully removing the devices), you can attach the devices to the target system. ZFS can handle some situations in which only some of the devices are available, but a successful pool migration depends on the overall health of the devices. In addition, the devices do not necessarily have to be attached under the same device name. ZFS detects any moved or renamed devices, and adjusts the configuration appropriately. To discover available pools, run the zpool import command with no options. For example:
# zpool import pool: tank id: 11809215114195894163 state: ONLINE action: The pool can be imported using its name or numeric identifier. config: tank ONLINE mirror-0 ONLINE c1t0d0 ONLINE c1t1d0 ONLINE
In this example, the pool tank is available to be imported on the target system. Each pool is identified by a name as well as a unique numeric identifier. If multiple pools with the same name are available to import, you can use the numeric identifier to distinguish between them.
Similar to the zpool status command output, the zpool import output includes a link to a knowledge article with the most up-to-date information regarding repair procedures for the problem that is preventing a pool from being imported. In this case, the user can force the pool to be imported. However, importing a pool that is currently in use by another system over a storage network can result in data corruption and panics as both systems attempt to write to the same storage. If some devices in the pool are not available but sufficient redundant data exists to provide a usable pool, the pool appears in the DEGRADED state. For example:
# zpool import pool: tank 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: tank 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 this example, the first disk is damaged or missing, though you can still import the pool because the mirrored data is still accessible. If too many unavailable devices are present, the pool cannot be imported.
In this example, two disks are missing from a RAID-Z virtual device, which means that sufficient redundant data is not available to reconstruct the pool. In some cases, not enough devices are present to determine the complete configuration. In this case, ZFS cannot determine what other devices were part of the pool, though ZFS does report as much information as possible about the situation. For example:
# 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.