Hi all,
I want to switch all of my external drives (used for storage/archiving/backup) over to Btrfs. I have two hard drives (encrypted with dm-crypt, though that is probably not relevant) that I have made a fully redundant Btrfs volume of, with:
Code:
mkfs.btrfs -L VolumeName -d raid1 -m raid1 /dev/mapper/device1 /dev/mapper/device2
This appears to work normally, the filesystem mounts normally, and I can copy data to and from it with no problems. In this setup, data should be fully redundant and the volume should be able to be mounted just fine, with all data accessible, if either drive fails. Upon copying some data to the drives and simulating drive failure (by not decrypting one or the other drive), I noticed very strange behavior. One of the two drives will mount fine in degraded mode with all data present. The other one, however, fails with:
Code:
mount: wrong fs type, bad option, bad superblock on /dev/mapper/device1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
The filesystem appears to be there:
Code:
btrfs filesystem show
WITH BAD DRIVE:
failed to read /dev/sr0
Label: 'VolumeName'' uuid: dda0ce8b-a40a-4c74-8cba-e9cefc9747be
Total devices 2 FS bytes used 5.28GB
devid 1 size 931.51GB used 7.03GB path /dev/dm-4
*** Some devices missing
Btrfs Btrfs v0.19
WITH GOOD DRIVE:
failed to read /dev/sr0
Label: 'VolumeName'' uuid: dda0ce8b-a40a-4c74-8cba-e9cefc9747be
Total devices 2 FS bytes used 5.28GB
devid 2 size 931.51GB used 7.01GB path /dev/dm-4
*** Some devices missing
Btrfs Btrfs v0.19
In the case of trying to mount the non-functional drive, dmesg shows the following:
Code:
[ 8223.374201] device label VolumeName devid 1 transid 31 /dev/mapper/device1
[ 8223.376441] btrfs: allowing degraded mounts
[ 8223.383357] parent transid verify failed on 29605888 wanted 26 found 13
[ 8223.384292] parent transid verify failed on 29605888 wanted 26 found 13
[ 8223.385048] parent transid verify failed on 29605888 wanted 26 found 13
[ 8223.385053] parent transid verify failed on 29605888 wanted 26 found 13
[ 8223.385058] Failed to read block groups: -5
[ 8223.390181] btrfs: open_ctree failed
Naturally, I'm rather confused by this behavior, since the two drives should be equally functional in this mirrored mode. Does anyone have any thoughts? Note: There is no data on the drives, so I'm okay with attempting anything destructive.
Thanks,
~Sirius
---------- Post added at 10:36 PM ---------- Previous post was at 10:27 PM ----------
Okay, having some weirder problems now, where both drives will mount individually in degraded mode, but cannot mount the complete array now. Will get back to this thread with more information once I've played with this more.
---------- Post added at 11:19 PM ---------- Previous post was at 10:36 PM ----------
Okay, completely reformatted and it works fine now. Go figure.