Is a btrfs RAID1 mountable if the added device isn't available/offline/failed/degraded?

1

Assume I created a RAID1 with btrfs's functions (btrfs device and btrfs balance subcommands instead of mdadm) like so:

btrfs device add /dev/sdxZ /dev/sdxY
btrfs balance start -dconvert=raid1 -mconvert=raid1 /dev/sdxZ

Is a /dev/sdxZ mountable if if pull the plug on /dev/sdxY (would it make a difference whether this happens during the sytem's running or between shutdown and boot)?

The following sources don't contain usable information:

I'm using btrfs-progs 3.19.1 on Linux 4.0-rc7.

Karl Richter

Posted 2015-04-10T16:33:06.373

Reputation: 1 641

Answers

1

Yes, but the partition will need to be mounted in degraded mode. From the wiki documentation on multiple devices:

Before replacing the device you will need to mount the array, if you have a missing device then you will need to use the following command:

sudo mount -o degraded /dev/sda1 /mnt

The full procedure for replacing a failed device in a redundant array is here:

https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices#Replacing_failed_devices

Mikkel

Posted 2015-04-10T16:33:06.373

Reputation: 585