Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: bad block and io errors
Date: Sun, 26 Jan 2014 18:48:11 +0000 (UTC)	[thread overview]
Message-ID: <pan$52d14$c15afa2b$4b64e8fe$6dff9d36@cox.net> (raw)
In-Reply-To: CANjusZfFXaNZcMew+6tWfKVdoKuVv+cSCWefvzCr0nMMJJk2sg@mail.gmail.com

G. Michael Carter posted on Sun, 26 Jan 2014 10:11:08 -0500 as excerpted:

> I've basically got four questions:
> 
> 1.  How do I repair, or drop block 35435896033280?
> 
> 2.  How do I identify which drive out of 5 this block is on?
> 
> 3.  How do I detect which drive is causing the errno=-5 IO failure
> 
> 4.  How do I identify what files I'm going to loose by this block
> problem?

As a simple btrfs user myself (not a dev, tho hopefully they'll get you a 
better answer later), I can't answer most of these.  But #4...

btrfs scrub will normally report (in dmesg, not in the command output) 
what file is associated with a checksum failure if it can't fix it from a 
second copy if available.

That does assume that the failure is in a data block, not metadata, but 
since metadata defaults to raid1 mode (if multi-device, dup mode if 
single device) anyway, you'll likely have a second copy to fix from, in 
that case, unless of course you configured single or raid0 metadata, in 
which case you're likely but predictably screwed as you're deliberately 
configuring less reliability when you chose those modes for metadata, and 
I'd suggest mkfs and restore from backup.

With the file information, you can delete the file, and hopefully when 
the block is rewritten at some point in the future, the drive will 
automatically mark it bad and rotate in one of its spares.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman


  reply	other threads:[~2014-01-26 18:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-26 15:11 bad block and io errors G. Michael Carter
2014-01-26 18:48 ` Duncan [this message]
2014-01-27  2:25 ` Chris Murphy

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='pan$52d14$c15afa2b$4b64e8fe$6dff9d36@cox.net' \
    --to=1i5t5.duncan@cox.net \
    --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