Turn single disk ZFS to mirrored ZFS

 I wanted to add some redundancy by mirroring disk. So I did it. Notice "-s" in zpool attach command so resilvering is done sequentially.

root@pve:~# zpool status -v
  pool: jemmapool
 state: ONLINE
  scan: scrub repaired 0B in 01:42:18 with 0 errors on Mon Jan  8 12:37:01 2024
config:
        NAME                               STATE     READ WRITE CKSUM
        jemmapool                          ONLINE       0     0     0
          ata-ST8000DM004-2CX188_WSC0ZW9T  ONLINE       0     0     0
errors: No known data errors

root@pve:~# zpool attach -s jemmapool \
                  /dev/disk/by-id/ata-ST8000DM004-2CX188_WSC0ZW9T \
                  /dev/disk/by-id/ata-WDC_WD80EZAZ-11TDBA0_7SJS82WW

root@pve:~# zpool status -v
  pool: jemmapool
 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: scrub repaired 0B in 01:42:18 with 0 errors on Mon Jan  8 12:37:01 2024
  scan: resilver (mirror-0) in progress since Tue Jan  9 18:49:24 2024
        951M / 2.85T scanned at 191M/s, 950M / 2.85T issued at 191M/s
        822M resilvered, 0.03% done, 04:20:30 to go
config:
        NAME                                   STATE     READ WRITE CKSUM
        jemmapool                              ONLINE       0     0     0
          mirror-0                             ONLINE       0     0     0
            ata-ST8000DM004-2CX188_WSC0ZW9T    ONLINE       0     0     0
            ata-WDC_WD80EZAZ-11TDBA0_7SJS82WW  ONLINE       0     0     0  (resilvering)
errors: No known data errors


Comments