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

今天直接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

上一篇:Linux 驱动开发(三)SPI


下一篇:让阿宅不再寂寞聊天的机器人