-
Notifications
You must be signed in to change notification settings - Fork 256
Description
btrfs-progs v6.6.3
I've converted at least 8 of my ext4 drives recently to btrfs with btrfs-convert, but have had problems with 2.
3 of the drives I've converted were HDDs. There were no errors reported during conversion on any of the drives. All 3 of these drives were backup drives holding disk image files, so file sizes ranged from 4GB-500GB, with a total of maybe 100-200 files each. I kept MD5 sums of all files on these drives to confirm their validity.
- Drive 1 was encrypted with luks and had ~6.4TB to convert. About 95% of its files were corrupted.
- Drive 2 was encrypted with veracrypt and had ~7TB to convert. No files were corrupted.
- Drive 3 was encrypted with veracrypt and was a file mirror (not sector mirror) of Drive 2. I stopped checking how many files were corrupted after 5/10 that I checked were. It's crazy that of the 2 mirror drives only 1 had corrupt sectors. I'm currently running a sync on this drive to find out how much corruption there was.
I didn't verify this 100% but it seemed that the only sectors that ever got corrupted were ones that were filled with just 0s (NULs). The corruption was that random sectors that were supposed to be zero-filled were instead filled with random data. I'd say well under 1% of the sectors in each file were corrupted.
On drive #3 I kept the original ext4 image (I accidentally deleted it on Drive #1). I kept 1 file as corrupted for testing purposes to hopefully solve this bug. I checked the file on the ext2_saved backup image, and it had no corruption. Only the file on the btrfs volume.
This file is ~4914.4MB large. It only had 1022 zero-filled sectors (4096 bytes each). ALL zero-filled sectors were changed to random data. Meaning 0.081% corruption.
Ope, it just happened again on a SSD drive. This drive is luks encrypted and had ~500GB total of data over ~2.5 million files. Only 1 file got corrupted. It was ~1.3MB and contained all zeros. The ext2_saved backup had it correct, the btrfs file is filled with random data from start to finish.
Is there anything I can do to help debug this problem? I'm keeping around 2 problematic files on the 2 drives so we can check the used sectors or whatnot.