Re: How to remove a device on a RAID-1 before replacing it?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 29, 2011 at 2:09 PM, Andrew Lutomirski <luto@xxxxxxx> wrote:
> 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.)

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.)  As 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux