Re: destroyed disk in btrfs raid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 09, 2014 at 06:58:27PM +0100, Hugo Mills wrote:
> On Fri, May 09, 2014 at 08:02:45PM +0200, laie wrote:
> > Now I'm looking for a way to tell btrfs to provide me with a list of the
> > corrupted files and delete them afterwards. This would be great, because
> > otherwise it would take very long to get the data back from slow backups.
> 
>    Simple solution: cat every file to /dev/null, and see which ones
> fail with an I/O error. With RAID-0 data, losing a device is going to
> damage most files, though, so don't necessarily expect much to survive.

   Actually, you could cat just the first 256 KiB of each file to
/dev/null -- that should be sufficient, because with RAID-0, the
stripe size is 64 KiB, and 256 KiB is therefore 4 stripes, and so
should cover every device... :)

   Hugo.

> > btrfs fi show
> > Label: userspace  uuid: there is one ;)
> >         Total devices 3 FS bytes used 27.21TiB
> >         devid    1 size 21.83TiB used 13.03TiB path /dev/dm-3
> >         devid    2 size 16.37TiB used 13.01TiB path /dev/dm-2
> >         devid    3 size 8.19TiB used 4.27TiB path

-- 
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 65E74AC0 from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
             --- UDP jokes: It's OK if no-one gets them. ---             

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux