Gentoo Archives: gentoo-user

From: Rich Freeman <rich0@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Hard drive error from SMART
Date: Tue, 12 Apr 2022 19:28:15
Message-Id: CAGfcS_kN8zwDga0S17aDXeFNdm1_rT6Akd9o3KYwTpy-1UnqVQ@mail.gmail.com
In Reply to: Re: [gentoo-user] Hard drive error from SMART by Dale
1 On Tue, Apr 12, 2022 at 1:08 PM Dale <rdalek1967@×××××.com> wrote:
2 >
3 > I remounted the drives and did a backup. For anyone running up on this,
4 > just in case one of the files got corrupted, I used a little trick to
5 > see if I can figure out which one may be bad if any. I took my rsync
6 > commands from my little script and ran them one at a time with --dry-run
7 > added. If a file was to be updated on the backup that I hadn't changed
8 > or added, I was going to check into it before updating my backups.
9
10 Unless you're using the --checksum option on rsync this isn't likely
11 to be effective. By default rsync only looks at size and mtime, so it
12 isn't going to back up a file unless you intentionally changed it. If
13 data was silently corrupted this wouldn't detect a change at all
14 without the --checksum option.
15
16 Ultimately if you care about silent corruptions you're best off using
17 a solution that actually achieves this. btrfs, zfs, or something
18 whipped up with dm-integrity would be best. At a file level you could
19 store multiple files and hashes, or use a solution like PAR2. Plain
20 mdadm raid1 will fix issues if the drive detects and reports errors
21 (the drive typically has a checksum to do this, but it is a black box
22 and may not always work). The other solutions will reliably detect
23 and possibly recover errors even if the drive fails to detect them (a
24 so-called silent error).
25
26 Just about all my linux data these days is on a solution that detects
27 silent errors - zfs or lizardfs. On ssd-based systems where I don't
28 want to invest in mirroring I still run zfs to detect errors and just
29 use frequent backups (ssds are small anyway so they're cheap to
30 frequently back up, especially if they're on zfs where there are
31 send-based backup scripts for this, and typically this is for OS
32 drives where things don't change much anyway).
33
34 --
35 Rich

Replies

Subject Author
Re: [gentoo-user] Hard drive error from SMART Dale <rdalek1967@×××××.com>