infra/nix/hosts/pure-joy/zr-pool.md
2026-01-05 23:09:19 +01:00

54 lines
2.0 KiB
Markdown

## plan
* rm one device (`wwn-0x5001b448b14c43cd-part2`)
* add it as a mirror with the tmp USB-connected device (`/dev/disk/by-id/ata-WDC_WDS240G2G0A-00JH30_19461B800819-part2`)
* rm the other device (`wwn-0x5001b448b143d092-part2`)
* swap the USB-connected device from the mirror using `replace`
**THE ABOVE IS WRONG**, what sufficed was:
* remove one of the drives
* do a `zpool attach zr <id of the drive left> <id of the drive to add>`, which
automatically forms a mirror!
* profit!!!
## status
pre:
```
pool: zr
state: ONLINE
scan: scrub repaired 0B in 00:00:21 with 0 errors on Tue Dec 3 13:13:50 2024
remove: Evacuation of /dev/disk/by-id/wwn-0x5001b448b14c43cd-part2 in progress since Sun Dec 8 23:02:45 2024
5.97G copied out of 8.54G at 105M/s, 69.86% done, 0h0m to go
config:
NAME STATE READ WRITE CKSUM
zr ONLINE 0 0 0
wwn-0x5001b448b143d092-part2 ONLINE 0 0 0
wwn-0x5001b448b14c43cd-part2 ONLINE 0 0 0 (removing)
errors: No known data errors
```
post:
```
pool: zr
state: ONLINE
status: One or more devices is currently being resilvered. The pool will
continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
scan: resilver in progress since Sun Dec 8 23:12:49 2024
17.2G / 17.2G scanned, 5.52G / 17.2G issued at 56.0M/s
5.94G resilvered, 32.09% done, 00:03:33 to go
remove: Removal of vdev 1 copied 8.54G in 0h1m, completed on Sun Dec 8 23:04:06 2024
368K memory used for removed device mappings
config:
NAME STATE READ WRITE CKSUM
zr ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
wwn-0x5001b448b143d092-part2 ONLINE 0 0 0
wwn-0x5001b448b14c43cd-part2 ONLINE 0 0 0 (resilvering)
errors: No known data errors
```