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

ZFS Recover Data from Zpool?

nick22_3

New Member


Messages: 1

#1
We had a zpool setup with raidz2, named sysvol. 2 of the drives needed to be replaced and I thought I replaced the correct disks, but I ended up replacing 2 of the 'Online' disks (mfid4 and mfid5). After I replaced the disks, the zpool status showed sysvol as unavailable and the 2 disks mfid4 and mfid5 then appeared as unavailable. I put the old disks back, thinking it would see the old disks and sysvol would go back to an online state. That didn't happen. I restarted the server, but it still showed sysvol as unavailable. In a panic, I destroyed the zpool then recreated sysvol and restored from a snapshot that was on our backup server. On sysvol, the only volume that has a backup snapshot on our backup server was sysvol/server. We have another volume, sysvol/2016, that was not backed up. Is there anyway to recover the data that was stored on sysvol/2016?

zpool status prior to replacing drives;
Code:
NAME                        STATE     READ WRITE CKSUM
sysvol                      DEGRADED      0    0     0
  raidz2-0                  DEGRADED      0    0     0
    mfid1                   ONLINE       0    0     0
    mfid2                   ONLINE       0    0     0
    mfid6                   ONLINE       0    0     0
    mfid3                   ONLINE       0    0     0
    spare-4                 DEGRADED     0    0     0
      18314821131401792223  REMOVED      0     0     0  was /dev/mfid4
      mfid7                 ONLINE       0    0     0
    12533332683947493905    UNAVAIL      0     0     0  was /dev/mfid5
    mfid4                   UNAVAIL      0     0     0
    mfid5                   UNAVAIL      0     0     0
logs
  ada0                      ONLINE       0    0     0
spares
      14972353427050779695  IN USE    was /dev/mfid7
zpool status after replacing drives;
Code:
NAME                        STATE     READ WRITE CKSUM
sysvol                      UNAVAIL      0    0     0
  raidz2-0                  UNAVAIL      0    0     0
    mfid1                   ONLINE       0    0     0
    mfid2                   ONLINE       0    0     0
    mfid6                   ONLINE       0    0     0
    mfid3                   ONLINE       0    0     0
    spare-4                 DEGRADED     0    0     0
      18314821131401792223  REMOVED      0     0     0  was /dev/mfid4
      mfid7                 ONLINE       0    0     0
    12533332683947493905    UNAVAIL      0     0     0  was /dev/mfid5
    17106016892657665591    UNAVAIL      0     0     0  was /dev/mfid4
    10214131241854954179    UNAVAIL      0     0     0  was /dev/mfid5
logs
  ada0                      ONLINE       0    0     0
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 5,503
Messages: 25,687

#2
I'm afraid your pool is now a mess and cannot be recovered.
 

ShelLuser

Daemon

Thanks: 806
Messages: 2,012

#3
I gave this a long hard thought but... I think the moment you opted to destroy the pool was basically the beginning of the end :(

From a rescue disk: # zpool import -Nfo readonly=yes -R /mnt sysvol

And a leap of faith: # zpool import -FNfR /mnt sysvol

That's the best advice I can give here, but I'm convinced that this will only result in errors and no solutions. The first command basically tries to force the pool import in readonly mode and not automatically mounting any filesystems. Assuming the highly unlikely that this actually does something you could then proceed by checking zfs list to see what might be accessible and then try to mount that specific filesystem.

The second command is potentially destructive because it will try to force recovery mode onto the pool while also not automatically mounting any filesystems. Once again zfs list should be used afterwards assuming this command doesn't exit with a massive errors (which I think it will).

That's my best shot. Just so we're clear: don't get any false hopes up. Just sharing some of the steps which I would try here, but I seriously doubt that this will have any effect.