scripts/FreeBSD/storage/partition-disk-zfs.md

23 lines
346 B
Markdown
Raw Normal View History

2020-07-17 22:55:07 +02:00
# How to replace a ZFS drive
```
# Put drive offline
sudo zpool tank da3 offline
```
```
sudo gpart destroy -F da7
```
```
# Partition drive
sudo gpart create -s gpt da7
sudo gpart add -s 100M -t freebsd-swap da7
sudo gpart add -t freebsd-zfs da7
```
```
# Replace drive in pool
sudo zpool replace -f tank 16950429292085325612 /dev/da7p2
```