1

On FreeBSD 10.2-RELEASE, I had the following setup on a dev (luckily) environment until yesterday:

    NAME                          STATE     READ WRITE CKSUM
    bigpool                       ONLINE       0     0     0
      mirror-0                    ONLINE       0     0     0
        multipath/faba_lun0       ONLINE       0     0     0
        multipath/fabb_lun0       ONLINE       0     0     0
      mirror-1                    ONLINE       0     0     0
        multipath/faba_lun1       ONLINE       0     0     0
        multipath/fabb_lun1       ONLINE       0     0     0
      mirror-2                    ONLINE       0     0     0
        multipath/faba_lun2       ONLINE       0     0     0
        multipath/fabb_lun2       ONLINE       0     0     0
      mirror-3                    ONLINE       0     0     0
        multipath/faba_lun3       ONLINE       0     0     0
        multipath/fabb_lun3       ONLINE       0     0     0

I then thought it would be a good idea to try and "disable" the 4th mirror (mirror-3) as some sort of rudimentary HA test.

zpool detach bigpool multipath/faba_lun3

Then thinking this was a Bad Idea, I re-added the disk:

zpool add bigpool multipath/faba_lun3

I now have this setup:

    NAME                          STATE     READ WRITE CKSUM
    bigpool                       ONLINE       0     0     0
      mirror-0                    ONLINE       0     0     0
        multipath/faba_lun0       ONLINE       0     0     0
        multipath/fabb_lun0       ONLINE       0     0     0
      mirror-1                    ONLINE       0     0     0
        multipath/faba_lun1       ONLINE       0     0     0
        multipath/fabb_lun1       ONLINE       0     0     0
      mirror-2                    ONLINE       0     0     0
        multipath/faba_lun2       ONLINE       0     0     0
        multipath/fabb_lun2       ONLINE       0     0     0
      multipath/faba_lun3         ONLINE       0     0     0
      multipath/fabb_lun3         ONLINE       0     0     0

I am unable to re-attach the two lun3's into mirror-3:

root# zpool attach bigpool multipath/faba_lun3 multipath/fabb_lun3
invalid vdev specification
use '-f' to override the following errors:
/dev/multipath/fabb_lun3 is part of active pool 'bigpool'

Seem to be in a catch-22 - Unable to mirror because both vdevs are already part of the pool (therefore an attach doesn't make sense), and unable to remove the vdevs because they're not log, spare, etc...

Does anyone know of a way to "re-enable" this mirror, with existing pool vdevs? I guess this is akin to an online relayout.

Thank you

sc.

1
  • To update: I ended up trashing and re-creating the pool. There was no other way around it. Feb 18, 2016 at 8:43

1 Answer 1

1

It looks for me that you had the span of 4 mirrors, now after some manipulations you have the span of 3 mirrors and two single drives. It is unclear for me which manipulations did exactly lead to this, but I doubt these were detaches, because detach normally gives you a detached drive that isn't marked as a part of any pool.

In the same time it's normal that you cannot attach to each other two vdevs that are already parts of the active pool. And since they are spans, it's impossible to extract one, it's a known zfs downside.

I can only assume it's possible to add two blank drives to mirror each sigle one, but I'm not sure it's doable, though you can try it on one condition: avoid -f flag when doing it.

1
  • 1
    Thank you @drookie - you are right - I just scoured my zpool history and shell history, and found out that a detach was effected, but I actually followed it closely with a (re)add of the detached disk. I guess I will have to trash the pool and re-create it. Shame on me for doing this sort of stuff at the end of a long day :). Thanks. Feb 17, 2016 at 6:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .