In this article I explain how to replace a failing disk on the BTRFS file system.
In my case disk SDB was failing so I had to replace it with a new disk.
Check BTRFS file system
btrfs fi show
Label: 'btrfs' uuid: fc34f7ac-7a8c-4b9a-99af-a6fdbdcd0ac5
Total devices 2 FS bytes used 2.90TiB
devid 1 size 3.64TiB used 3.62TiB path /dev/sda
devid 2 size 3.64TiB used 3.62TiB path /dev/sdb
Mount filesystem in degraded mode
mount -o degraded /dev/sda /mnt/btrfs
Add new disk
btrfs device add -f /dev/sdc /mnt/btrfs
Delete failing disk
btrfs device delete /dev/sdb /mnt/btrfs
Balance
btrfs balance start --full-balance /mnt/btrfs