linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How to remove a device on a RAID-1 before replacing it?
@ 2011-03-29 20:09 Andrew Lutomirski
  2011-03-29 20:21 ` cwillu
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Lutomirski @ 2011-03-29 20:09 UTC (permalink / raw)
  To: linux-btrfs

I have a disk with a SMART failure.  It still works but I assume it'll
fail sooner or later.

I want to remove it from my btrfs volume, replace it, and add the new
one.  But 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.  And I don't even know how to tell btrfs to release the drive
so I can safely remove it.

(Mounting with -o degraded doesn't help.  I could umount, remove the
disk, then remount, but that feels like a hack.)

This is 2.6.38.1 running Fedora 14's version of btrfs-progs, but
btrfs-progs-unstable git does the same thing, as does btrfs-vol -r.

--Andy

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-03-29 21:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2011-03-29 21:15     ` Hugo Mills

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