1

I have a RAID10 BTRFS on /dev/sda4, /dev/sdb4, /dev/sdc4, and /dev/sdd4.

The sdd drive failed. I replaced it, and rebuilt the partition table like with sfdisk -d /dev/sda | sfdisk /dev/sdd.

I managed to mount the btrfs filesystem in its degraded state with mount -o degraded, but now I cannot figure out how to replace the old /dev/sdd4 in the filesystem with the new /dev/sdd4.

When I try to delete the missing device:

root@sauron:~# btrfs device delete /dev/sdd4 /big1
ERROR: error removing the device '/dev/sdd4' - unable to go below four devices on raid10

This is the replace command I tried. It has no output, but then when I check the status, it shows it was never started:

btrfs replace start /dev/sdd4 /dev/sdd4 -r /big1

The other partitions on these disks are four-way MDRAID1 devices, which I have successfully fixed on the new drive with the mdadm command.

I've been scouring google for help, but nothing I have found has been helpful.

2

According to documentation:

In case of raidXX layout, you cannot go below the minimum number of the device required. So before removing a device (even the missing one) you may need to add a new one.

mount in degraded mode
add a new device
remove the missing device

See here

  • 1
    This did fix it. Now I'm doing a filesystem balance. Looks like everything's going to be fine. – elyograg Nov 16 '15 at 4:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.