• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

ZFS zpool detach from mirror: no valid replicas


New Member

Messages: 3

I have a mirror comprised of two vdev's, recently resilvered from two failed drives. One of the failed drives I detach'd with no problem but the other died and the BIOS wouldn't see it at boot time. I physically removed it and now have only the two new drives installed but I can't detach this old "ghost".

# zpool status -v zbig
  pool: zbig
 state: DEGRADED
status: One or more devices could not be opened.  Sufficient replicas exist for
        the pool to continue functioning in a degraded state.
action: Attach the missing device and online it using 'zpool online'.
   see: http://illumos.org/msg/ZFS-8000-2Q
  scan: scrub canceled on Tue Jan 30 08:28:50 2018

        NAME                      STATE     READ WRITE CKSUM
        zbig                      DEGRADED     1     0     0
          mirror-0                DEGRADED     2     0     0
            12294739914883835979  UNAVAIL      0     0     0  was /dev/gpt/disk2.eli
            gpt/disk3.eli         ONLINE       0     0     2
            gpt/wd2.eli           ONLINE       0     0     2

errors: No known data errors
# zpool detach zbig 12294739914883835979
cannot detach 12294739914883835979: no valid replicas
Note (if it makes a difference) these are geli-encrypted drives. I'm not sure where to go from here. Thanks for any help you guys can provide.


Staff member

Thanks: 1,036
Messages: 3,824

First, you have a single mirror vdev, comprised of 2 live disks and one missing disk. :)

Second, try running a scrub, then "zpool detach" the missing disk. Or "zpool remove" it.


New Member

Messages: 3

lol ok it's a single mirror vdev, now I know what it's called. ;)

So I did a scrub but got the same result:
# zpool detach zbig 12294739914883835979
cannot detach 12294739914883835979: no valid replicas
# zpool remove zbig 12294739914883835979
cannot remove 12294739914883835979: only inactive hot spares, cache, top-level, or log devices can be removed
The scrub shows an error:
errors: Permanent errors have been detected in the following files:

...which is something I've googled and can't fix -- nearest suggestion was to "scrub -s" cancel a scrub after a few minutes, which temporarily removes it. Originally (on the old disks) there were several similar errors due to corrupt files, which I deleted.