linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hugo Mills <hugo@carfax.org.uk>
To: laie <laie@halifax.rwth-aachen.de>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: destroyed disk in btrfs raid
Date: Sun, 11 May 2014 15:19:57 +0100	[thread overview]
Message-ID: <20140511141957.GC23212@carfax.org.uk> (raw)
In-Reply-To: <c1b636dffe4c70c4e15010000e730703@halifax.rwth-aachen.de>

[-- Attachment #1: Type: text/plain, Size: 1844 bytes --]

On Tue, May 13, 2014 at 10:16:59AM +0200, laie wrote:
> On 2014-05-09 20:01, Hugo Mills wrote:
> >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... :)
> 
> I was hoping for an internal tool, but I guess the matter is to specific.
> Thank you for the fast and easy solution.
> 
> Are you sure that using only 256KiB covers also huge files, even if only the
> last Part is missing?

   Aah, thinking about it harder, since you had a partial balance,
there will be some block groups that are on n-1 devices, and some that
are on n devices. This means that you could have some files with parts
on unbalanced block groups (so, probably safe) and parts on balanced
block groups (probably damaged).

   So go back to my earlier suggestion: cat every file completely.

   Hugo.

-- 
=== 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
  --- The trouble with you, Ibid, is you think you know everything. ---  
                                                                         

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

  reply	other threads:[~2014-05-11 14:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-09 18:02 destroyed disk in btrfs raid laie
2014-05-09 17:58 ` Hugo Mills
2014-05-09 18:01   ` Hugo Mills
2014-05-13  8:16     ` laie
2014-05-11 14:19       ` Hugo Mills [this message]
2014-05-14 18:43         ` laie
2014-05-14 18:44           ` Hugo Mills
2014-05-14 21:44             ` laie
2014-05-21 22:25               ` laie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140511141957.GC23212@carfax.org.uk \
    --to=hugo@carfax.org.uk \
    --cc=laie@halifax.rwth-aachen.de \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).