From: Andrew Lutomirski <luto@mit.edu>
To: cwillu <cwillu@cwillu.com>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: How to remove a device on a RAID-1 before replacing it?
Date: Tue, 29 Mar 2011 17:01:39 -0400 [thread overview]
Message-ID: <AANLkTimXOFpfWS=8bxLyYiPLS_qBFbWG-g8VKsxLMEcD@mail.gmail.com> (raw)
In-Reply-To: <AANLkTi=SiesmPbkwoCHSpxDaLK_S8EcZEbBBtVFZUV_j@mail.gmail.com>
On Tue, Mar 29, 2011 at 4:21 PM, cwillu <cwillu@cwillu.com> wrote:
> On Tue, Mar 29, 2011 at 2:09 PM, Andrew Lutomirski <luto@mit.edu> wro=
te:
>> I have a disk with a SMART failure. =A0It still works but I assume i=
t'll
>> fail sooner or later.
>>
>> I want to remove it from my btrfs volume, replace it, and add the ne=
w
>> one. =A0But the obvious command doesn't work:
>>
>> # btrfs device delete /dev/dm-5 /mnt/foo
>> ERROR: error removing the device '/dev/dm-5'
>>
>> dmesg says:
>> btrfs: unable to go below two devices on raid1
>>
>> With mdadm, I would fail the device, remove it, run degraded until I
>> get a new device, and hot-add that device.
>>
>> With btrfs, I'd like some confirmation from the fs that data is
>> balanced appropriately so I won't get data loss if I just yank the
>> drive. =A0And I don't even know how to tell btrfs to release the dri=
ve
>> so I can safely remove it.
>>
>> (Mounting with -o degraded doesn't help. =A0I could umount, remove t=
he
>> disk, then remount, but that feels like a hack.)
>
> There's no "nice" way to remove a failing disk in btrfs right now
> ("btrfs dev delete" is more of a online management thing to politely
> remove a perfectly functional disk you'd like to use for something
> else.) =A0As I understand things, the only way to do it right now is =
the
> umount, remove disk, remount w/ degraded, and then btrfs add the new
> device.
>
Well, the disk *is* perfectly functional. It just won't be for long.
I guess what I'm saying is that either btrfs dev delete isn't really
working -- I want to be able to convert to non-RAID and back or
degraged and back or something else equivalent.
--Andy
--
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
next prev parent reply other threads:[~2011-03-29 21:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-29 20:09 How to remove a device on a RAID-1 before replacing it? Andrew Lutomirski
2011-03-29 20:21 ` cwillu
2011-03-29 20:45 ` Helmut Hullen
2011-03-29 21:01 ` Andrew Lutomirski [this message]
2011-03-29 21:15 ` Hugo Mills
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='AANLkTimXOFpfWS=8bxLyYiPLS_qBFbWG-g8VKsxLMEcD@mail.gmail.com' \
--to=luto@mit.edu \
--cc=cwillu@cwillu.com \
--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).