linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kyle Manna <2bluesc@gmail.com>
To: Duncan <1i5t5.duncan@cox.net>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: How to remove missing device on RAID1?
Date: Tue, 20 Oct 2015 14:48:28 -0700	[thread overview]
Message-ID: <CAM9fjH6pcwZKWryNrJay_N98wmXWVXXqo3HJuupbJRE3MC9YKQ@mail.gmail.com> (raw)
In-Reply-To: <pan$55e2$eeada9c5$c7289131$4f093ca1@cox.net>

Thanks for the follow-up Duncan, that makes sense.  I assumed I was
doing something wrong.

I downloaded the devel branch of of btrfs-progs and got it running
before I saw the need for a kernel patch and decided to wait.

For anyone following this later, I needed to use the following to get
the missing device ID:

btrfs device usage <path>
ᐧ

On Tue, Oct 20, 2015 at 1:58 PM, Duncan <1i5t5.duncan@cox.net> wrote:
> Kyle Manna posted on Tue, 20 Oct 2015 10:24:48 -0700 as excerpted:
>
>> Hi all,
>>
>> I have a collection of three (was 4) 1-2TB devices with data and
>> metadata in a RAID1 mirror.  Last night I was struck by the Click of
>> Death on an old Samsung drive.
>>
>> I removed the device from the system, rebooted and mounted the volume
>> with `-o degraded` and the file system seems fine and usable.  I'm
>> waiting on a replacement, drive but want to remove the old drive and
>> re-balance in the meantime.
>>
>> How do I remove the missing device?  I tried the `btrfs device delete
>> missing /mnt` but was greeted with "ERROR: missing is not a block
>> device".  A quick look at that btrfs-progs git repo shows that
>> `stat("missing")` is called, which of course fails since missing isn't a
>> block device.  Nothing other then `btrfs replace` seemed intuitive and
>> all the docs mention the older command.  What's the move?
>>
>> Thanks!
>> - Kyle
>>
>> Versions:
>> Kernel: 4.2.3-1-ARCH
>> btrfs-progs: 4.2.2-1 ᐧ
>
> I believe the current advice given here (that you were likely trying to
> follow, wrapped link)...
>
> https://btrfs.wiki.kernel.org/index.php/
> Using_Btrfs_with_Multiple_Devices#Replacing_failed_devices
>
> ... is dated and no longer works due to code change some time in the past.
>
> There's a set of (very) recent patches, to the kernel and userspace both
> (I just updated userspace and it's in the git devel-branch v4.2.3-49-
> g4db87a1 I just built, kernelspace, I don't see it in linus-mainline yet,
> so I'd guess it's in the btrfs-integration patches, to land in the v4.4
> commit window if not in 4.3 as it's getting late in the cycle for that.
>
> btrfs fi show <path>
>
> That will list the btrfs component devices together with their devids.
>
> Then use the appropriate devid like so:
>
> btrfs dev del <devid> <path>
>
> The -progs commit is d462081f, by Anand Jain, titled:
>
> btrfs-progs: Introduce device delete by devid
>
> According to it, the required kernel commit (title only listed) is
> similar:
>
> Btrfs: Introduce device delete by devid
>
> You can probably find them on-list if you wish to cherry-pick them into a
> current version.
>
> --
> 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
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2015-10-20 21:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-20 17:24 How to remove missing device on RAID1? Kyle Manna
2015-10-20 19:52 ` Philip Seeger
2015-10-20 20:37 ` Goffredo Baroncelli
2015-10-20 20:58 ` Duncan
2015-10-20 21:48   ` Kyle Manna [this message]
2015-10-20 22:40     ` Henk Slager
2015-10-20 22:46       ` Henk Slager
2015-10-21 19:14         ` Kyle Manna
2015-10-21  9:54       ` Dmitry Katsubo
2015-10-21 16:40         ` Henk Slager

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=CAM9fjH6pcwZKWryNrJay_N98wmXWVXXqo3HJuupbJRE3MC9YKQ@mail.gmail.com \
    --to=2bluesc@gmail.com \
    --cc=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;
as well as URLs for NNTP newsgroup(s).