How to replace a disk in a ZFS storage pool?

How to replace a disk in a ZFS storage pool?

Run the zpool replace command to replace the disk. The following example walks through the steps to replace a disk in a ZFS storage pool with a disk in the same slot. Note that the preceding zpool output might show both the new and old disks under a replacing heading.

What happens if my ZFS drive goes offline?

Only bottom-level devices (drives) can be OFFLINE. This is a manual administrative state, and healthy drives can be brought back online and active into the pool. The device (or VDEV) in question can not be opened. If a VDEV is UNAVAIL, the pool will not be accessible or able to be imported.

What happens if a ZFS storage device is unavailable?

If the device causes a top-level virtual device to be unavailable, then nothing in the pool can be accessed. Otherwise, the fault tolerance of the pool might be compromised. In either case, the device just needs to be reattached to the system to restore normal operations.

How long does it take to replace a ZFS drive?

Now we are ready to make the new disk part of our pool. Make sure you replace the following with the guid of your old disk, and the path of your new disk. The new disk will now be resilvered. This process can take several hours. But you can check its progress:-

Use the cfgadm command to identify the disk ( c1t3d0) to be unconfigured and unconfigure it. The pool will be degraded with the offline disk in this mirrored configuration, but the pool will continue to be available. Physically replace the disk ( c1t3d0 ).

How to replace a failed disk in a ZFS mirror?

ZFS automatically started the resilvering process (copying data to the new disk). I wasn’t sure how long that would take… $ zpool status pool: storage state: DEGRADED status: One or more devices is currently being resilvered.

Can you replace a dead disk in a zpool?

Unfortunately I saw the problem only after the next reboot so now the drive label is missing and I can’t replace the disk using the official instructions here and here. root@zeus:~# zpool status hermes -x pool: hermes state: DEGRADED status: One or more devices could not be used because the label is missing or invalid.