Advice on disk media error recovery

John Nielsen lists at jnielsen.net
Thu Feb 5 19:12:33 UTC 2015


On Feb 5, 2015, at 11:20 AM, Bengt Ahlgren <bengta at sics.se> wrote:

> I have a five-disk non-redundant zpool where two disks have media
> errors.  One with five sectors unreadable and the other with three
> sectors.
> 
> I would like to recover as much data as possible from these disks.  What
> are my possible options?  (And, no, there is no backup.)

(Aside from learn to always have backups and where feasible to use redundant disks...)

> Copying the files that can be read from the pool to a different pool on
> other disks?

That would be a good place to start so you at least have backups of most things. You could use rsync but you would lose and ZFS dataset structure and attributes.

You could add disks to the system and do "zpool replace".

You could make a new (hopefully redundant) pool and try "zpool send | zpool recv". I don't know firsthand if that would cope with errors.

> Making block-copy clones of the faulty disks and removing files that had
> the media errors?

This might be a last resort. You should export the zpool before you start.



More information about the freebsd-fs mailing list