2

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.

1 Answer 1

0

I am not an expert, learning BTRFS now. I know it is an old post, but try to answer it anyways.

According to some mailing list you can use DUP and RAID1 on a single disk, so if you don't mind the half space it is possible to use your SSD and keep auto data correction. Another way to buy another SSD, which I did.

If you don't want to give up half of your SSD space or more money, then some of the errors can be fixed and others can't without redundancy. You can try btrfs check --repair if you have filesystem errors. To detect data rot, you need to use btrfs scrub, which verifies the crc32 checksums and it displays in the status message whether it found uncorrectable errors. You can find the affected files with dmesg. You can restore the corrupted files manually using your backup. I think it is possible to write a script for this. Still no idea how snapshots will be affected by a file replacement, I suspect they will contain the old corrupted version. I'll post a question about that part.

1
  • The best solution realy would be to use a second SSD with the same speed. HDDs are slow and consume much more energy. Thanks for your answer, and also for your written question! The answers are great!
    – X. Y.
    Commented Jun 9, 2018 at 22:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .