linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roman Mamedov <rm@romanrm.net>
To: 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 17:48:56 +0500	[thread overview]
Message-ID: <20171114174856.12ae346f@natsu> (raw)
In-Reply-To: <CAFTHvW9OmWApkzJ=s51Saq=cwv24hBqe0bzhR55Yv2+fAANH-Q@mail.gmail.com>

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.


[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. :)

-- 
With respect,
Roman

  parent reply	other threads:[~2017-11-14 12:48 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 [this message]
2017-11-14 12:58   ` Austin S. Hemmelgarn
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=20171114174856.12ae346f@natsu \
    --to=rm@romanrm.net \
    --cc=klaus@agnoletti.dk \
    --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).