lost ZFS pool

Damien Fleuriot ml at my.gd
Tue Jun 12 23:21:15 UTC 2012


On 12 Jun 2012, at 20:17, "Nenhum_de_Nos" <matheus at eternamente.info> wrote:

> hail,
> 
> I write just to make sure its dead. I've lost the first disk on a ZFS pool (jbod). Now I can't
> mount it with only the second disk. The first disk clicks to death :(
> 
> [root at optimus ~]# zpool status
>  pool: pool
> 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
> scrub: none requested
> config:
> 
>        NAME          STATE     READ WRITE CKSUM
>        pool          UNAVAIL      0     0     0  insufficient replicas
>          label/zfs1  UNAVAIL      0     0     0  cannot open
>          label/zfs2  ONLINE       0     0
> 
> I have a spare disk (blank), but even though I can't make it online again ...
> 
> is there any hope I can read the files in that disk ?
> 
> thanks,
> 
> matheus
> 

Johan has the right of it, you're splitting data between your 2 devices a la raid0, this means both disks are required for the pool to function.

Your data is gone and you're not recovering any of it.

You will want to follow Johan's recommendation of using mirror (raid1),  raidz (raid5) or even raidz2 (raid6) to ensure data integrity and availability.



Note that using raid does *not* exempt you from running backups.

As has been pointed out already (Jeremy Chadwick was that you ?), with large disks ( >1TB ) you encounter the risk of another disk in your raid array failing while you're rebuilding on the replacement drive, because of the high IO.

Also, while I am a proponent of using the full disk for ZFS (as opposed to a slice), it is recommended to use slices and shave off roughly 100mb from the disk space available when creating your pool.

This way, if an old disk fails and you replace it with one the same size but from another manufacturer (the size may vary a bit, imagine if it's 2mb smaller, you can't use it in your pool !) you won't face the problem.


More information about the freebsd-stable mailing list