btrfs device remove报错ERROR: error removing device '/dev/sdax': unable to go below two devices on raid1

btrfs filesystem balance <挂载目录>之后,默认居然不是single,反而是raid1。
使用btrfs filesystem usage /mnt确实是metadata和data果然是raid1

localhost:~ # btrfs device remove /dev/sda2 /mnt/
ERROR: error removing device '/dev/sda2': unable to go below two devices on raid1

做了之后有数据又不能移除,只能重新将元数据和系统数据区的组织机制重新分配成single

btrfs balance start -f -mconvert=single -dconvert=single /mnt/
Done, had to relocate 3 out of 3 chunks

#再移除
localhost:~ # btrfs device remove /dev/sda2 /mnt/

#查看
localhost:~ # btrfs filesystem usage /mnt
Overall:
    Device size:                  10.00GiB
    Device allocated:              1.28GiB
    Device unallocated:            8.72GiB
    Device missing:                  0.00B
    Used:                        448.00KiB
    Free (estimated):              9.72GiB      (min: 9.72GiB)
    Data ratio:                       1.00
    Metadata ratio:                   1.00
    Global reserve:                3.25MiB      (used: 0.00B)

Data,single: Size:1.00GiB, Used:320.00KiB
   /dev/sda1       1.00GiB

Metadata,single: Size:256.00MiB, Used:112.00KiB
   /dev/sda1     256.00MiB

System,single: Size:32.00MiB, Used:16.00KiB
   /dev/sda1      32.00MiB

Unallocated:
   /dev/sda1       8.72GiB

posted @ 2021-10-04 12:52  EverEternity  阅读(218)  评论(0编辑  收藏  举报