How to import only a mirror to recover a pool

Hi, I have a HP microserver, 4 Hard drives in a 2 by 2 mirror arrangement. The first two disks failed and apparently the mirror of the other two disks is online, I don’t know, if there is a command to import only the mirror that is online?

/etc/zfs# zpool import
pool: tank
id: 14664602324664177597
state: UNAVAIL
status: One or more devices contains corrupted data.
action: The pool cannot be imported due to damaged devices or data.
see: ZFS-8000-5E
config:

    tank                                 UNAVAIL  insufficient replicas
      mirror-0                           UNAVAIL  insufficient replicas
        ata-ST4000VN008-2DR166_ZDH9ZSG9  UNAVAIL
        ata-ST4000VN008-2DR166_ZGY9GL50  UNAVAIL
      mirror-1                           ONLINE
        ata-ST4000VN008-2DR166_ZGY9GMAS  ONLINE
        ata-ST4000VN008-2DR166_ZDH9ZSVT  ONLINE

AFAIK the files are scattered over the two mirrored VDEVs, making it not possible or useful to import half of the pool. Unfortunate to have two drives die at the same time. I’d spend some time looking at that to see if either of the UNAVAIL drives can be brought back on line. Perhaps the issue is transitory or something like a bad or dislodged cable.

Good luck!

That’s not how this works. In addition to the files being scattered between the two vdevs, the metadata necessary to FIND them is also scattered between them. If you lose a vdev, you lose the pool.

OP, if you can’t get either of those drives back online, you can’t get the pool back online either.

1 Like