Am Mittwoch, 18. April 2012 schrieb Duncan: > Shridhar Shetty posted on Tue, 17 Apr 2012 16:14:45 +0000 as excerpted: > > I have created a btrfs filesystem with RAID1 setup having 2 disks. > > Everything works fine but when I try to umount the device and remount > > it in degraded mode, > > the data still goes into both the disk. ideally in degraded mode only > > one disk show disk activity and not the failed ones. > > > > > > > > System Config: > > Base OS: Slackware kernel: linux 3.3.2 > > > > > > > > "sar -pd 2 10" shows me that the data is been written/read from both > > devices. > > > > > > > > Also, Is there any way in which I can remove the failed disk without > > adding a new one in a RAID1 (2 disk setup). The reason being we want > > the option to keep it running in degraded(single disk) mode for > > sometime and on a weekend replace the failed drive with a fresh one > > :-). > > Are you sure you created the filesystem with raid1 mode for both data > and metadata? Some people end up with only one or the other set to > raid1 mode (metadata defaults to mirroring on two-device, but data > will default to single if not specifically set). > > Meanwhile, AFAIK the degraded option doesn't force degraded, it only > allows mounting degraded if the other device is non-functional. If > btrfs detects all its devices and doesn't detect a problem with one, > it'll still try to run all devices, regardless of the degraded > mount-option. You can echo 1 > martin@merkaba:/sys/block/sda/device> ls -l delete --w------- 1 root root 4096 Apr 18 18:40 delete of the device you want to get rid of. (Double check that you have got the right device!) But you either need to reboot (tested) or to rescan the bus to get the device back (untested, don´t know whether this works). btrfs filesystem show should then report the device as missing and you should be able to delete it from it. But then btrfs device delete should do the same in a cleaner way. (I.e. without remove the device from Linux entirely.) -- Martin 'Helios' Steigerwald - http://www.Lichtvoll.de GPG: 03B0 0D6C 0040 0710 4AFA B82F 991B EAAC A599 84C7 -- 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
