Replacing two drives in striped mirror

i have the following pool where i want to replace nvme-eui.2 and nvme-eui.4

NAME                                 STATE     READ WRITE CKSUM
zroot                                ONLINE       0     0     0
  mirror-0                           ONLINE       0     0     0
                   nvme-eui.1-part2  ONLINE       0     0     0
                   nvme-eui.2-part2  ONLINE       0     0     0
  mirror-1                           ONLINE       0     0     0
                   nvme-eui.3-part2  ONLINE       0     0     0
                   nvme-eui.4-part2  ONLINE       0     0     0

can i just disconnect them, put two new nvme drives in and let them resilver? or should i do zfs detaching before?

It’s a bit nicer to detach them first, but not technically necessary.

You should scrub first, though.

1 Like

there won’t be any issue with removing these drives with detach while its running right? i ask since its my OS drive

Nope. That’ll be fine.

Hi, there are 3 ways: safe, unsafe, very unsafe.
Safe is:

  1. Create backup of data.
  2. Destroy pool.
  3. Replace nvme disks.
  4. Build new pool.

Unsafe is (Simulate a disk failure and rebuild the Zpool):
Works if you have an empty slot for nvme (5 nvme disks in total)

  1. Create backup of data.
  2. Add 5-th disk in system
  3. zpool status test-pool
  4. zpool replace test-pool /nvme-eui.2 /nvme-eui.5 (please specify mirror and other options that you used during pool creation)
  5. zpool scrub test-pool
  6. zfs list

Very unsafe is (Simulate a disk failure and rebuild the Zpool):
Very dangerous way because of data loss option

  1. Create backup of data.
  2. Turn off system.
  3. Replace disk 2 by disk 5 in system.
  4. Power up system.
  5. zpool status test-pool
  6. zpool replace test-pool /nvme-eui.2 /nvme-eui.5 (please specify mirror and other options that you used during pool creation)
  7. zpool scrub test-pool
  8. zfs list
  9. Repeat from step 2 for nvme-eui.4 .