linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>
To: Roman Mamedov <rm@romanrm.net>, Klaus Agnoletti <klaus@agnoletti.dk>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: A partially failing disk in raid0 needs replacement
Date: Tue, 14 Nov 2017 07:58:48 -0500	[thread overview]
Message-ID: <ebe4279f-ac09-f27a-47f2-3e911033268b@gmail.com> (raw)
In-Reply-To: <20171114174856.12ae346f@natsu>

On 2017-11-14 07:48, Roman Mamedov wrote:
> On Tue, 14 Nov 2017 10:36:22 +0200
> Klaus Agnoletti <klaus@agnoletti.dk> wrote:
> 
>> Obviously, I want /dev/sdd emptied and deleted from the raid.
> 
>    * Unmount the RAID0 FS
> 
>    * copy the bad drive using `dd_rescue`[1] into a file on the 6TB drive
>      (noting how much of it is actually unreadable -- chances are it's mostly
>      intact)
> 
>    * physically remove the bad drive (have a powerdown or reboot for this to be
>      sure Btrfs didn't remember it somewhere)
> 
>    * set up a loop device from the dd_rescue'd 2TB file
> 
>    * run `btrfs device scan`
> 
>    * mount the RAID0 filesystem
> 
>    * run the delete command on the loop device, it will not encounter I/O
>      errors anymore.
While the above procedure will work, it is worth noting that you may 
still lose data.
> 
> 
> [1] Note that "ddrescue" and "dd_rescue" are two different programs for the
> same purpose, one may work better than the other. I don't remember which. :)
As a general rule, GNU ddrescue is more user friendly for block-level 
copies, while Kurt Garlof's dd_rescue tends to be better for copying at 
the file level.  Both work fine in terms of reliability though.

  reply	other threads:[~2017-11-14 12:58 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-14  8:36 A partially failing disk in raid0 needs replacement Klaus Agnoletti
2017-11-14 12:38 ` Adam Borowski
2017-11-15  2:54   ` Chris Murphy
2017-11-14 12:48 ` Roman Mamedov
2017-11-14 12:58   ` Austin S. Hemmelgarn [this message]
2017-11-14 14:09   ` Klaus Agnoletti
2017-11-14 14:44     ` Roman Mamedov
2017-11-14 15:43       ` Klaus Agnoletti
2017-11-26  9:04       ` Klaus Agnoletti
2017-11-14 14:43   ` Kai Krakow
2017-11-15  2:56   ` Chris Murphy
2017-11-14 12:54 ` Patrik Lundquist
2017-11-14 13:14 ` Austin S. Hemmelgarn
2017-11-14 14:10   ` Klaus Agnoletti
2017-11-15  2:47 ` Chris Murphy
2017-11-29 13:33 ` Klaus Agnoletti
2017-11-29 21:58   ` Chris Murphy
2017-11-30  5:28     ` Klaus Agnoletti
2017-11-30  6:03       ` Chris Murphy
2017-11-30  6:41         ` Klaus Agnoletti

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=ebe4279f-ac09-f27a-47f2-3e911033268b@gmail.com \
    --to=ahferroin7@gmail.com \
    --cc=klaus@agnoletti.dk \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=rm@romanrm.net \
    /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).