Hot Spares: https://docs.oracle.com/cd/E19120-01/open.solaris/817-2271/gcvcw/index.html
Hot Spares: https://docs.oracle.com/cd/E53394_01/html/E54801/gpegp.html
https://docs.joyent.com/private-cloud/troubleshooting/disk-replacement
http://docs.oracle.com/cd/E19253-01/819-5461/gbcet/index.html
http://docs.oracle.com/cd/E19082-01/817-2271/ghzvx/index.html
Replace with spare:
Degraded → Offline → Replace
Replace in-place drive:
Degraded → Offline → Remove → Pull Bad Drive → Install New Drive → Initialize → Add to VDEV
Wait for the resilvering to finish then run a scrub job.
zpool replace
to replace a failed drive. It is safest to replace a failed drive with another existent drive in another slot.
zpool replace <poolname> <faileddisk> <newdisk>
zpool replace
specifying only the drive being replaced.
zpool replace <poolname> <disk>
zpool replace -f "poolname" c0t5000C500418A83B3d0 c0t5000C500836A90C7d0
zpool detach
will remove a drive from a VDEV, turning a mirrored VDEV into a single drive VDEV. Use zpool attach
to recreate the mirror. In general, do not use these commands to replace a failed drive.
zpool attach
an additional mirror to a mirrored VDEV (which adds redundancy) then remove the drive being upgraded afterwards.
zpool attach <poolname> <existingvdevmember> <newdrive> # Wait for it to resilver, which adds redundancy, then zpool detach <poolname> <drivebeingreplaced>
Usually a spare can replace a faulted disk but remains a spare. The idea behind this is that you replace the faulted disk, then replace the spare with the new and the spare remains a spare.
If you want to remove the spare property, first remove then replace.
zpool offline <poolname> <disk>
to tell ZFS to ignore the device being replaced.
# Set the autoexpand property so the new disk space is recognized zpool set autoexpand=on <poolname> # Verify everything is online before replacing a disk zpool status # Take the old, smaller disk offline before removing it zpool offline <poolname> <olddisk> ##### Physically replace the disk with the new larger disk ##### zpool online <poolname> <samediskname> # Optionally kick off the autoexpand of each new larger device zpool online -e <poolname> <device>