Error while deleting device from a raid1 array
Hi,
I'm sorry if this email is sent twice. Gmail says it failed to deliver because it contains HTML, so I will try with plain text:
I have a raid1 array that contains 3 devices like this:
Label: 'pool' uuid: 7e66ba23-14c7-47b5-90fc-481ecc769138
Total devices 3 FS bytes used 888.04GiB
devid 1 size 931.51GiB used 738.03GiB path /dev/sdb devid 2 size 465.76GiB used 228.00GiB path /dev/sdc devid 5 size 1.82TiB used 966.03GiB path /dev/sdd
btrfs-progs v4.3
Data, RAID1: total=939.00GiB, used=871.94GiB System, RAID1: total=32.00MiB, used=192.00KiB Metadata, RAID1: total=27.00GiB, used=16.10GiB GlobalReserve, single: total=512.00MiB, used=0.00B
I was planning to replace devid 2 with another larger HDD so that I can have more space.
Because I have no spare slots for a new device, I have to firstly delete the devid 2 and then add the new device to it. A simple calculation suggested that after deleting devid 2, I should still have enough space to hold a raid1 on the remaining 2 devices.
So I issued btrfs device delete /dev/sdc /pool, and after a while, my FS turned write-only with this error in dmesg:
https://cfp.vim-cn.com/ccm2
I have reboot and tried for several times, and it will always stopped with this kind of situation.
The last time I tried, the system refused to mount the btrfs array with an error says something like:BTRFS: open_ctree failed. I reboot forcefully and it mounted again.
Now I am afraid to try again, so I bring it here. I have 2 questions:
1. Do I have enough space to hold raid1 even if I deleted devid 2?
2. How to delete devid 2 safely?
About my system version:
Linux yang-z800 4.2.5-1-ARCH #1 SMP PREEMPT Tue Oct 27 08:13:28 CET 2015 x86_64 GNU/Linux
btrfs-progs v4.3.1
Thank you
Signature · 4 lines
Jiachen Yang 楊嘉晨 Graduate School of Information Science and Technology, Osaka University Blog: https://farseerfc.me/ Gmail: [email protected]