Dealing with a failed disk in a Btrfs RAID array is not as intuitive as it could be.
btrfs device delete missing
does not just delete the disk from the list of devices used by the array, instead it will re-allocate all chunks that existed on that disk. This means that:
- You will need at least as much free space in the array as data that disk previously held.
- This command will take hours or days to complete, and does not have a background option.
- The array will still try to read from the missing disk, slowing down both the delete operation and the array in general.
The correct command is btrfs replace start
which will background by default (-B to run in the foreground) and has the -r option to avoid reading from the failed disk.
Additionally, Btrfs arrays don't seem to want to mount in their normal mount point while 'degraded' (i.e. a disk is missing), even if you provide the -o degraded option to mount. Making a temporary mount point and starting the delete seems to solve this.