[FreeNAS] Trying to get my pool back

Hi everyone!

I've got a problem trying to get my pool back after a drive failure. I had a perfectly working installation of FreeNAS. I had a pool with four disk attached (no mirror). One of those four disks is now dead and I can't access the data on my pool anymore. When I tried zpool import, I got an error message saying a device is missing. Same message with -f -F, I tried zpool import -V, I can see four disks (one unavailable) but the pool is still unavailable too.

Any ideas? I'm new with linux and zfs ;) I'm just desperate to get back my photos. I'm not using the same computer to write here so it's a bit complicated to retype all the scripts here.

Thanks!
 
In fact, I don't need to get the pool back. I just want to access to the data. Is it maybe possible to destroy the pool and import the three disks left in a new one and access the files?
 
Unfortunately you've made just about every mistake you can do with storage.

ZFS stripes data slightly differently to most raid systems but in general the same idea applies, every file is split into pieces that are distributed across the disks. A 512k file may get split into 4 128k pieces, with each being written to one disk. Each piece can be written at the same time which is why an N disk stripe can write about N times faster than a single disk.

There really is very little reason to use a stripe with modern disks that can push ~150MBps. Most people that do it have usually made a bad choice. It's generally someone inexperienced who thinks they're awesome for getting 500MBps+, then go stick terabytes of their data on it (immediately putting their data at risk) and share it on a 1gig network that maxes out at ~120MBps anyway.

If you could get ZFS to import the 3 disks, which you can't, you'd only have 3 quarters of each file so everything would be unusable anyway, hence why ZFS says it's unavailable, because your data is, actually, completely unavailable.

In future make your storage redundant (mirrors, raid5/6, raid-z, etc) unless you really, really, absolutely need performance and losing the data is of no consequence. if the data is at all important back it up as well (that's not a suggestion it's a necessity). It doesn't matter whether you use raidz1,2,3 or raidz4000, you could still reboot one day and find your hyper redundant pool is faulted due to some metadata corruption because you're using spec-bending consumer disks.

If you'd given up the space of one disk and made a raidz1, your pool would probably still be online now. Even if you kept the stripe, but you'd backed up to a cheap USB disk every now and then, you'd still have a fairly good lifeline.

Always expect that disks are going to fail, at any time. Unfortunately you learned the hard way.
 
Perhaps one could argue that Appliance systems like FreeNAS has made it "too easy"?

@Math316

I feel for you man, I really do, but you´ve only got yourself to blame here. Never, ever start a project without getting the essential understanding of how the system works, and always have backups! Perhaps there are some things you can try but don´t expect much from it. Post back to us the output of:
# camcontrol devlist
# gpart show
# zpool status
# zpool import

Which will give us a better idea of just how screwed you are. Download putty so you can remote administer the system over SSH. Makes pasting the output so much easier:)

/Sebulon
 
Perhaps one could argue that Appliance systems like FreeNAS has made it "too easy"?

Quite possibly. Maybe the FreeNAS GUI should make users accept a warning when creating striped pools.

You could try sending the disk to a recovery firm and paying them a fortune to see if they can repair the disk or move the platters to a replacement disk. It's an expensive long shot though.
 
I tought that the data on a so small disk (80GB, the other disk are 1TB, 2TB, 160GB) can be acceptable if I can get back most. This why I'm thinking about recovering. I know this is my fault. As a new zfs user I didn't understand that was so different of windows environment where I got back data so easily.
 
If you lost one disk (completely dead) out of a 4 disk stripe on Windows you'd be in exactly the same position.

I don't know what problem you had on Windows that you managed to easily get out of but there is no file system that provides an easy way to fix the fact that you're missing a chunk out of all your files.

Edit:
With this disk being so small there's a small chance that some files had their data written entirely to the other 3 (unlike most RAID controllers which traditionally force striped disks to be the same size and always write to all) but there are currently no ZFS recovery tools I'm aware of. You'd probably have to manually try and pull the data out with zdb and there's only a few people around who know how to do that.
 
My dead disk is allways on but nothing on it .... this is why I don't understand and thought about data recovery.
Code:
[root@freenas ~]# zpool status                                                  
  pool: Media                                                                   
 state: UNAVAIL                                                                 
status: One or more devices could not be opened.  There are insufficient        
        replicas for the pool to continue functioning.                          
action: Attach the missing device and online it using 'zpool online'.           
   see: http://www.sun.com/msg/ZFS-8000-3C                                      
  scan: none requested                                                          
config:                                                                         
                                                                                
        NAME                    STATE     READ WRITE CKSUM                      
        Media                   UNAVAIL      0     0     0                      
          ada3p2                ONLINE       0     0     0                      
          da0p2                 ONLINE       0     0     0                      
          ada4p2                ONLINE       0     0     0                      
          13961247174508364812  UNAVAIL      0     0     0  was /dev/ada0p2
 
Post the output of the camcontrol/gpart commands listed by Sebulon so we can at least see what disks FreeBSD is picking up and what state they're in.

Maybe a copy of /var/run/dmesg.boot as well.
 
Code:
[root@freenas ~]# camcontrol dev list                                           
<WDC WD800JD-00MSA1 10.01E01>      at scbus0 target 0 lun 0 (ada0,pass0)        
<WDC WD800JD-00MSA1 10.01E01>      at scbus1 target 0 lun 0 (ada1,pass1)        
<TSSTcorp CD/DVDW SH-S182D SB06>   at scbus3 target 0 lun 0 (pass2,cd0)         
<OCZ-VERTEX4 1.5>                  at scbus5 target 0 lun 0 (ada2,pass3)        
<WDC WD20EARX-00PASB0 51.0AB51>    at scbus6 target 0 lun 0 (ada3,pass4)        
<ST3160815AS 3.AAD>                at scbus8 target 0 lun 0 (ada4,pass5)        
<SAMSUNG HD103UJ >                 at scbus9 target 0 lun 0 (pass6,da0)         
<SanDisk Cruzer Edge 1.26>         at scbus10 target 0 lun 0 (pass7,da1)

Code:
=>       63  125045361  ada2  MBR  (59G)                                        
         63    1930257     1  freebsd  [active]  (942M)                         
    1930320         63        - free -  (31k)                                   
    1930383    1930257     2  freebsd  (942M)                                   
    3860640       3024     3  freebsd  (1.5M)                                   
    3863664      41328     4  freebsd  (20M)                                    
    3904992  121140432        - free -  (57G)                                   
                                                                                
=>        34  3907029101  ada3  GPT  (1.8T)                                     
          34          94        - free -  (47k)                                 
         128     4194304     1  freebsd-swap  (2.0G)                            
     4194432  3902834696     2  freebsd-zfs  (1.8T)                             
  3907029128           7        - free -  (3.5k)                                
                                                                                
=>       34  312579628  ada4  GPT  (149G)                                       
         34         94        - free -  (47k)                                   
        128    4194304     1  freebsd-swap  (2.0G)                              
    4194432  308385230     2  freebsd-zfs  (147G)                               
                                                                                
=>      0  1930257  ada2s1  BSD  (942M)                                         
        0       16          - free -  (8.0k)                                    
       16  1930241       1  !0  (942M)

I can't use [Scroll lock] in freenas, don't know why ....

Code:
[root@freenas ~]# /var/run/dmesg.boot                                           
bash: /var/run/dmesg.boot: Permission denied

Thanks ;)
 
Looks like you have 2 80G disks in the system.
If you have any data on the other disk and you can identify the disk I would remove that from the system temporarily so you don't end up messing it up by accident.

I assume the following just gives you an error (assuming ada0 is the 80G disk from the pool)

Code:
gpart show ada0
 
Back
Top