btrfs data integrity checksum under mdadm raid
0
votes
1
answer
175
views
I found several places suggesting to use btrfs under mdraid (
mdadm
) or LVM Raid. But nobody expands on how that works when you have data checksum issues!
My main concern of not using btrfs native raid, is that brtfs have native data checksum. And if I ever have a problem on any of those setup, the two bits diverging will be outside of brtfs domain (either on dmcrypt, or lvm or dm-raid, etc)... How do I go about "fixing" it?
Despite the amount of opinions to not use btrfs raid, I could not find good articles on actual alternatives. My Goal is to have any Mirror, Data integrity/checksum (btrfs or otherwise), and snapshots (for the goal of making incremental remote backups over ssh). Encryption is not required, but not a problem either. Also btrfs is also not required, i might do with ext4 after looking at the options that already cover all that before the fs.
This is about late boot data drives, not root partition.
(Also, note that LUKS+integrity can always be replaced with plain dm-integrity. Just covering 2 cases at once)
option 1:
2 HDD -> mdadm raid1 -> LUKS+integrity -> btrfs
Option 2 :
2 HDD -> LUKS+integrityx2 -> mdadm raid1 -> btrfs
Option 3:
2 HDD -> LVM PVx2 -> VGx1 -> LVx1 raid1+raidintegrity -> btrfs
Option 4:
2 HDD -> LUKS+integrityx2 -> LVM PVx2 -> VGx1 -> LVx1 raid1 + raidintegrity -> btrfs
Option 5:
2 HDD -> LVM PVx2 -> VGx2 -> LVx2 linear -> mdadm raid1 -> btrfs
Option 6:
2 HDD -> MBRx2 -> partitionx2 -> dm-integrityx2 -> mdadm raid1 -> btrfs
Option 7 :
2 HDD -> mdadm raid1 -> dm-integrity -> btrfs
...Many, many more combinations!
Does any of those non-btrfs raids/integrity will help me deal with btrfs checksum complaining about data integrity mismatch? Or the other way, if mdadm have a /sys/block/mdX/md/mismatch_cnt and I need to pick one of the two HDDs in a RAID1, will brtfs data help me deal with it?
(pls, don't suggest openzfs, already had too many questions closed for "Y for X questions" reasons :)
Asked by gcb
(632 rep)
Dec 28, 2024, 04:20 AM
Last activity: Dec 28, 2024, 06:18 PM
Last activity: Dec 28, 2024, 06:18 PM