I have a mirrored zpool with which had 4 disks. So I had a mirror-0 and a mirror-1. See below
root@pve:~# zpool status zones
pool: zones
state: ONLINE
scan: resilvered 11.5G in 00:03:28 with 0 errors on Mon Apr 26 07:40:2
config:
NAME STATE READ WRITE CKSUM
zones ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ata-ST8000VN0022-2EL112_ZA1EL30R ONLINE 0 0 0
ata-ST8000VN0022-2EL112_ZA1EJPDN ONLINE 0 0 0
mirror-1 ONLINE 0 0 0
sdb ONLINE 0 0 0
sdc ONLINE 0 0 0
errors: No known data errors
I decided to add another mirror to the pool, but when I connected the two new drives One shifted the dev order and became sdc. I didn't think the physical position would matter to zfs due to the disk labels but it did. I ended up with
root@pve:~# zpool status
pool: zones
state: DEGRADED
status: One or more devices could not be used because the label is missing or
invalid. Sufficient replicas exist for the pool to continue
functioning in a degraded state.
action: Replace the device using 'zpool replace'.
see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-4J
scan: resilvered 11.5G in 00:03:28 with 0 errors on Mon Apr 26 07:40:25 2021
config:
NAME STATE READ WRITE CKSUM
zones DEGRADED 0 0 0
mirror-0 ONLINE 0 0 0
ata-ST8000VN0022-2EL112_ZA1EL30R ONLINE 0 0 0
ata-ST8000VN0022-2EL112_ZA1EJPDN ONLINE 0 0 0
mirror-1 DEGRADED 0 0 0
sdb ONLINE 0 0 0
5296558483604593766 UNAVAIL 0 0 0 was /dev/sdc1
errors: No known data errors
So I decided to detach sdc and then add the re-positioned sdc (now sdd) to mirror-1. Well this kind of worked. The pool is healthy but mirror-1 is gone. I was able to add my 2 new disks as another mirror now mirror-3 (really should be 2 but what ever)
root@pve:~# zpool status
pool: zones
state: ONLINE
scan: resilvered 11.5G in 00:03:28 with 0 errors on Mon Apr 26 07:40:25 2021
config:
NAME STATE READ WRITE CKSUM
zones ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ata-ST8000VN0022-2EL112_ZA1EL30R ONLINE 0 0 0
ata-ST8000VN0022-2EL112_ZA1EJPDN ONLINE 0 0 0
sdb ONLINE 0 0 0
ata-ST8000AS0002-1NA17Z_Z840CZMZ ONLINE 0 0 0
mirror-3 ONLINE 0 0 0
sdc ONLINE 0 0 0
ata-ST8000VN004-2M2101_WSD1D5NP ONLINE 0 0 0
Is there any way to clean this up without having to destroy the zpool?
root@pve:~# zpool status zones
pool: zones
state: ONLINE
scan: resilvered 11.5G in 00:03:28 with 0 errors on Mon Apr 26 07:40:2
config:
NAME STATE READ WRITE CKSUM
zones ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ata-ST8000VN0022-2EL112_ZA1EL30R ONLINE 0 0 0
ata-ST8000VN0022-2EL112_ZA1EJPDN ONLINE 0 0 0
mirror-1 ONLINE 0 0 0
sdb ONLINE 0 0 0
sdc ONLINE 0 0 0
errors: No known data errors
I decided to add another mirror to the pool, but when I connected the two new drives One shifted the dev order and became sdc. I didn't think the physical position would matter to zfs due to the disk labels but it did. I ended up with
root@pve:~# zpool status
pool: zones
state: DEGRADED
status: One or more devices could not be used because the label is missing or
invalid. Sufficient replicas exist for the pool to continue
functioning in a degraded state.
action: Replace the device using 'zpool replace'.
see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-4J
scan: resilvered 11.5G in 00:03:28 with 0 errors on Mon Apr 26 07:40:25 2021
config:
NAME STATE READ WRITE CKSUM
zones DEGRADED 0 0 0
mirror-0 ONLINE 0 0 0
ata-ST8000VN0022-2EL112_ZA1EL30R ONLINE 0 0 0
ata-ST8000VN0022-2EL112_ZA1EJPDN ONLINE 0 0 0
mirror-1 DEGRADED 0 0 0
sdb ONLINE 0 0 0
5296558483604593766 UNAVAIL 0 0 0 was /dev/sdc1
errors: No known data errors
So I decided to detach sdc and then add the re-positioned sdc (now sdd) to mirror-1. Well this kind of worked. The pool is healthy but mirror-1 is gone. I was able to add my 2 new disks as another mirror now mirror-3 (really should be 2 but what ever)
root@pve:~# zpool status
pool: zones
state: ONLINE
scan: resilvered 11.5G in 00:03:28 with 0 errors on Mon Apr 26 07:40:25 2021
config:
NAME STATE READ WRITE CKSUM
zones ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ata-ST8000VN0022-2EL112_ZA1EL30R ONLINE 0 0 0
ata-ST8000VN0022-2EL112_ZA1EJPDN ONLINE 0 0 0
sdb ONLINE 0 0 0
ata-ST8000AS0002-1NA17Z_Z840CZMZ ONLINE 0 0 0
mirror-3 ONLINE 0 0 0
sdc ONLINE 0 0 0
ata-ST8000VN004-2M2101_WSD1D5NP ONLINE 0 0 0
Is there any way to clean this up without having to destroy the zpool?