I want to set up a notebook (debian) with 1 SSD and 1 HDD each with Luks and Btrfs on it. Because the SSD and the HDD doesn't have the same speed, i don't want to use Btrfs' Raid-1 on it, but i also don't want to miss Btrfs' checksumming and autocorrection.

Now i am thinking about to use the HDD only for storing snapshots from the SSD. In the meantime i've found this https://superuser.com/a/1099181 , the script create the first time an initial read-only snapshot on the source drive (SSD) and later with example cron, an daily incremental snapshot with btrfs send -p and btrfs receive.

My questions now: If the SSD get some troubles for example bitrot errors, will and how will i know that this happens? I dont think that Btrfs on the SSD will automatically correct this errors the next time when i make an snapshot and use btrfs send -p with btrfs receive, because it is simply no Raid-1, am I right?

Btw, snaps on the same notebook but different drive aren't my (full) backup strategy.

[edit] For further helpfull answers take a look at https://superuser.com/questions/1240204/btrfs-automatically-bitrot-correction-with-snapshots

  • I’m not sure what you’re hoping to achieve. Could you please clarify what it is you want? Btrfs subvolume snapshots don't protect against bit rot at all because it doesn't copy or verify any data. However, modern drives and Btrfs have mechanisms to detect bit rot. To recover from bit rot you’ll need some form of RAID though. Mdadm has a "write-mostly" option for mirrored volumes that’s helpful when one backing drive is much slower than the other. The mirror feature of Btrfs has no such feature. – David Foerster Aug 13 '17 at 14:25
  • I've clarified my question. Btw i don't want to use mdadm anymore, otherwise if it's not possible to get an Raid-1 nearly function with Btrfs on this setup, i will buy an second SSD. – X. Y. Aug 13 '17 at 20:46
  • 1
    btrfs snap and send operations don't check data consistency. You don't "miss" or gain anything on these operation in terms of checksums, etc. – Pilot6 Aug 13 '17 at 22:31
  • Btrfs has a mirror mode that protects against data loss from hardware failure in the exact same way as RAID-1. However, the mirror implementation of Btrfs has no option to use one or more backing media in “write mostly” mode to account for different read performance of the backing media. Afaik in Linux only mdadm has such a feature. Either use mdadm, get another SSD, or live with the performance penalty. – David Foerster Aug 14 '17 at 0:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.