bcachefs
bcachefs copied to clipboard
3 replicas with erasure codeing fails with 2 defective drives
This is a test of raid 6 using this format:
./bcachefs format -f --erasure_code /dev/sda /dev/sdb /dev/sdc /dev/sde --data_replicas=3 --metadata_replicas=3 --data_replicas_required=2 --metadata_replicas_required=2
If the above format is the equivalent to raid 6 then removing 2 drives should be ok.
kernel: 5.15.0-gd9b3fe55be51 bcachefs-tools: v0.1-453-g7b15324
If I pull sda and sdb at the same time the test file is not readable. Note that there are 4 drives in use.
This passes when erasure coding is not enabled.
This seems to be related to if the first drive is pulled in the test. pull sda and sdb : fail pull sdc and sde: pass pull sdb and sdc: pass pull sda and sde: fail
The test is: create a new filesystem and mount it ./bcachefs format -f --erasure_code /dev/sda /dev/sdb /dev/sdc /dev/sde --data_replicas=3 --metadata_replicas=3 --data_replicas_required=2 --metadata_replicas_required=2
mount -t bcachefs /dev/sda:/dev/sdb:/dev/sdc:/dev/sde /mnt/bcachefs
create some test data: cd /mnt/bcachefs/ dd if=/dev/urandom bs=1M count=500 > test_data md5sum test_data
pull drives...
test file contents: md5sum test_data md5sum: test_data: Input/output error
If you need any additional info just ask.
_replicas_required is a synonym for _replicas, so you've effectively just set redundancy levels to 2.
@koverstreet should we nerf these flags they're just causing confusion?
Yes we should