2019-11-09 18:12:15 +01:00
|
|
|
# How to replace a ZFS drive
|
|
|
|
|
|
|
|
```
|
|
|
|
# Put drive offline
|
|
|
|
sudo zpool tank da3 offline
|
|
|
|
```
|
|
|
|
|
2020-01-25 19:47:01 +01:00
|
|
|
```
|
|
|
|
sudo gpart destroy -F da7
|
|
|
|
```
|
|
|
|
|
2019-11-09 18:12:15 +01:00
|
|
|
```
|
|
|
|
# Partition drive
|
2020-01-25 19:47:01 +01:00
|
|
|
sudo gpart create -s gpt da7
|
|
|
|
sudo gpart add -s 100M -t freebsd-swap da7
|
|
|
|
sudo gpart add -t freebsd-zfs da7
|
2019-11-09 18:12:15 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
# Replace drive in pool
|
2020-01-25 19:47:01 +01:00
|
|
|
sudo zpool replace -f tank 16950429292085325612 /dev/da7p2
|
2019-11-09 18:12:15 +01:00
|
|
|
```
|