Trying to recover data

jogre

Cadet
Joined
Apr 19, 2019
Messages
3
Hi,

My situation is I built a FreeNAS for temporary purposes to house some data and then copied the data it to a more permanent FreeNAS. Since then I have made the temporary FreeNAS a test machine and made a new dataset. For some reason the copy didn't get everything but I failed to double check. It was brought to my attention about the data missing and now I'm trying to figure out how to recover it. Not much has been written to the new dataset. I was trying to figure out to recover the data, any information and help would be greatly appreciated!

Some of the drives were removed before the new dataset was created. I have since added those drives back and tried to run a zpool import but I'm getting this output. I know all the HDDs are back I'm not sure.

Code:
[root@freenas ~]# zpool import                                                                                                     
   pool: RC3                                                                                                                       
     id: 17588022494157555181                                                                                                       
  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://illumos.org/msg/ZFS-8000-6X                                                                                         
 config:                                                                                                                           
                                                                                                                                    
        RC3                                             UNAVAIL  missing device                                                     
          raidz1-1                                      DEGRADED                                                                   
            11748030498495450882                        UNAVAIL  cannot open                                                       
            gptid/5bad8619-6f4a-11e8-9f8b-001f2905674f  ONLINE                                                                     
            gptid/5c6f6d60-6f4a-11e8-9f8b-001f2905674f  ONLINE                                                                     
            gptid/5d3d0b89-6f4a-11e8-9f8b-001f2905674f  ONLINE                                                                     
          raidz1-2                                      DEGRADED                                                                   
            5442945372869191789                         UNAVAIL  cannot open                                                       
            gptid/606378b4-6f4a-11e8-9f8b-001f2905674f  ONLINE                                                                     
            gptid/6154a216-6f4a-11e8-9f8b-001f2905674f  ONLINE                                                                     
            gptid/62251019-6f4a-11e8-9f8b-001f2905674f  ONLINE                                                                     
        spares                                                                                                                     
          gptid/55678dad-6f4a-11e8-9f8b-001f2905674f                                                                               
                                                                                                                                    
        Additional devices are known to be part of this pool, though their                                                         
        exact configuration cannot be determined.                                                                                   
[root@freenas ~]#                                                                                                                   
                      
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
Since then I have made the temporary FreeNAS a test machine and made a new dataset.
I think you are using the wrong word here. A "new dataset" does not involve removing any disks or changing the layout of the pool.
Some of the drives were removed before the new dataset was created.
This tells me that you did something significantly different from, "new dataset was created".

Still, it looks like you have enough of the disks back in the system to import the pool, if it is still viable, just add a -f to force it to import and see if you can get your data out of there.

Edit: the command would be: zpool import -f RC3

You might want to review these guides to get a better handle on the terminology that you appear to be using wrong:

Slideshow explaining VDev, zpool, ZIL and L2ARC
https://forums.freenas.org/index.ph...ning-vdev-zpool-zil-and-l2arc-for-noobs.7775/

Terminology and Abbreviations Primer
https://forums.freenas.org/index.php?threads/terminology-and-abbreviations-primer.28174/

Why not to use RAID-5 or RAIDz1
https://www.zdnet.com/article/why-raid-5-stops-working-in-2009/
 

jogre

Cadet
Joined
Apr 19, 2019
Messages
3
I'm sorry for using the wrong terminology i'll try to explain what I did a little better. Originally this system had 13 1 TB drives, when turning it into a test system I removed 6 of those drives. I then created a new volume and new dataset. I was wondering what would need to be done. Since trying to recover I have added the drives back.

I tried to zpool import -f RC3 and received this. I have also tried the -d command like it suggested here: https://illumos.org/msg/ZFS-8000-6X
Code:
[root@freenas ~]# zpool import -f RC3                                                                                               
cannot import 'RC3': one or more devices is currently unavailable  


Again I just wanted thank you for helping it is greatly appreciated!
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
If you destroyed the storage pool that had data on it, the data is not there any more. Just because you put the disks back does not mean anything.
I removed 6 of those drives. I then created a new volume and new dataset.
When you created a new volume, you erased the data that was there before. It is just gone. Even if you bring all thirteen drives from the original pool back, you still erased six of the drives, that leaves only half the drives from the original pool. There is no way to recover from having half the drives erased.
 

jogre

Cadet
Joined
Apr 19, 2019
Messages
3
Bummer. I know this is a long shot but I was thinking when hard drives get formatted the data is still there it just says it can written over and that is how recovery software is able to access deleted files in some cases. Some very small files have been written to it but not much so most of it should still be there. I know ZFS is very different but I was just wondering would something like that be possible in this situation? If I could recover the other drives, i could try to import it.

Thank you again! I appreciate it! If worst come to worst I live and I learn and will make sure not to make the same mistake in the future.
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
ZFS stores data differently from other file systems and there is not really any recovery software for it. The main problem is that there is blocks that store pointers to other blocks and if the pointer blocks get erased, there is no way to access the data that is pointed to. You would think that erasing six of the drives would, at the very least, eliminate any possibility of accessing half the data that had been stored, except that all data that was stored would have been spread across all the disks. So it isn't like half the files would be erased, half of each file would have been erased. If there was any hope of recovery, it would need someone skilled in data recovery and it would take analysis of all the disks.
 
Top