zfs:troubleshooting:replace_a_disk
This is an old revision of the document!
Table of Contents
ZFS - Troubleshooting - Replace a Disk
Check the Pool
Verifing that a disk is bad and that it needs to be replaced.
zpool status
Add a New Disk
- Add a new disk.
- Optionally remove the old disk.
NOTE: Only remove the old drive at this point if it is a redundant setup.
Replace the Old Device
zpool replace testpool c1t1d0 c2t0d0 zpool offline testpool c1t1d0 zpool remove testpool c1t1d0
NOTE: Here the old device is specified first followed by the new device.
- If the pool is a redundant configuration, data will be copied from other good disks to the new disk.
- If the pool is not redundant, data will be copied from the old device to the new device.
- The old drive should also become detached.
- Once that is complete, the old device can be physically removed.
If the old disk is already removed from the system and a new device has replaced it with the same device name, the following command can be used instead:
zpool offline pool1 sdd
zpool remove pool1 sdd
zpool attach -f pool1 sdc sdd
zfs/troubleshooting/replace_a_disk.1634165937.txt.gz · Last modified: 2021/10/13 22:58 by peter