ZPOOL replace defective disk in exported pool

data-recoverydiskmanagementzfszfsonlinux

Yesterday, I put a new disk into my server.
Sadly, I didn't check the disk before of failures.

I added it to my pool with the command zpool add nas /dev/disk/by-id/scsi-SATA_ST31500341AS_9VS27Z4M-part1

Short after, the CPU-load of the server went nearly to infinity, I couldn't even relogin.

So I performed a hard-reboot (Alt + SysRq + b), but the server couldn't boot. (After the GRUB showed up, nothing more happened for about 5 minutes. Then, I shut it down and took out the new disk. I booted up and it worked.

But now, I have the problem, that I can't access the so-called "nas"-pool because the last (the new) disk shows as status "UNAVAIL", and because it's no mirrored pool, the whole pool is in state UNAVAIL.

If I put in the disk again and do a zpool online nas /dev/disk/by-id/scsi-SATA_ST31500341AS_9VS27Z4M-part1 it doesn't work and tells me "the disk could not be found".

So i tried some possibilities I read from the oracle-docs and I exported it with zpool export nas. Now, I'm not even able to import the pool.

zpool import nas -f
cannot import 'nas': one or more devices is currently unavailable

And if I look at zpool import, it tells me:

pool: nas
     id: 3366469163144781663
  state: UNAVAIL
 status: One or more devices are missing from the system.
 action: The pool cannot be imported. Attach the missing
        devices and try again.
   see: http://zfsonlinux.org/msg/ZFS-8000-6X
 config:

        nas                                               UNAVAIL  missing device
          dm-name-linuxServer-nas                         ONLINE
          ata-WDC_WD20EARX-00PASB0_WD-WCAZAC521840-part1  ONLINE
          ata-WDC_WD20EFRX-68AX9N0_WD-WMC300228535-part1  ONLINE

        Additional devices are known to be part of this pool, though their
        exact configuration cannot be determined.

To be clear: the pool is completely irrelevant, the data is not.
If I'd be able to access the data somehow, I could export it to a external HDD.

Yes, I have no backup (shame on me!) but I don't have usually another 6TB for the backup somewhere.

Is there any possibility to access this data? Maybe faking the disk so that zpool thinks, it's available or something like this?

Any help would greatly be appreciated.

Best Answer

I hate to say this, but do you know that you were basically adding unraided disks to your pool?
The command you provided basically says, "Add another disk to pool nas and stripe it with the existing disks."

Is that what you meant to do?

The pool is done at this point, especially if anything was written to the bad disk. If this were a pair of mirrors, the pool would be in state: FAULTED and you'd be able to recover. As-is, you've probably lost your data.