This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
computing:storage:zfs_replace_drive [2021/08/04 12:13] gcooper |
computing:storage:zfs_replace_drive [2023/07/05 11:39] (current) gcooper |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== ZFS Failed Disk Replacement ====== | ====== ZFS Failed Disk Replacement ====== | ||
+ | |||
+ | **Hot Spares**: https:// | ||
+ | |||
+ | **Hot Spares**: https:// | ||
https:// | https:// | ||
Line 31: | Line 35: | ||
https:// | https:// | ||
- | <note tip>Use '' | + | <note tip>Use '' |
< | < | ||
Line 37: | Line 41: | ||
</ | </ | ||
- | <note tip>To replace a failed drive by replacing it in-place, it is best to shut down the server, remove and replace the failed drive, | + | <note tip>To replace a failed drive by replacing it **in-place**, it is best to shut down the server, remove and replace the failed drive, |
< | < | ||
zpool replace < | zpool replace < | ||
+ | </ | ||
+ | |||
+ | <note tip> | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | zpool replace -f " | ||
</ | </ | ||
Line 53: | Line 64: | ||
< | < | ||
zpool attach < | zpool attach < | ||
- | # Wait for it to resilver, which adds redundancy | + | # Wait for it to resilver, which adds redundancy, then |
zpool detach < | zpool detach < | ||
</ | </ | ||
Line 59: | Line 70: | ||
==== Spares ==== | ==== Spares ==== | ||
- | Usually a spare can replace a faulted disk but remains a spare. | + | 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. | If you want to remove the spare property, first remove then replace. | ||
===== Pool Expansion ===== | ===== Pool Expansion ===== | ||
+ | |||
+ | https:// | ||
https:// | https:// | ||
Line 80: | Line 93: | ||
# Take the old, smaller disk offline before removing it | # Take the old, smaller disk offline before removing it | ||
zpool offline < | zpool offline < | ||
- | # Physically replace the disk with the new larger disk | + | ##### Physically replace the disk with the new larger disk ##### |
zpool online < | zpool online < | ||
- | # Optionally kick off the autoexpand of a new larger device | + | # Optionally kick off the autoexpand of each new larger device |
zpool online -e < | zpool online -e < | ||
</ | </ |