1 |
Marc Joliet posted on Wed, 28 May 2014 22:32:47 +0200 as excerpted: |
2 |
|
3 |
> (Dammit, it seems that I've developed a habit of writing somewhat |
4 |
> long-winded emails :-/ . Sorry!) |
5 |
|
6 |
You? <looking this way and that> What does that make mine? =:^) |
7 |
|
8 |
> Am Wed, 28 May 2014 08:29:07 +0100 schrieb thegeezer |
9 |
> <thegeezer@×××××××××.net>: |
10 |
> |
11 |
>> top man, thanks for detail and the tips ! |
12 |
> |
13 |
> I second this :) . In fact, I think I'll link to it in my btrfs thread |
14 |
> on gentoo-user. |
15 |
|
16 |
Thanks. I was on the user list for a short time back in 2004 when I |
17 |
first started with gentoo, but back then it was mostly x86, while my |
18 |
interest was amd64, and the amd64 list was active enough back then that I |
19 |
didn't really feel the need for the mostly x86 user list, so I |
20 |
unsubscribed and never got around to subscribing again, when the amd64 |
21 |
list traffic mostly dried up. But if it'll help people there... go right |
22 |
ahead and link or repost. (Also, anyone who wants to put it up on the |
23 |
gentoo wiki, go ahead. I work best on newsgroups and mailing lists, and |
24 |
find wikis, like most of the web, in practice read-only for my usage. |
25 |
I'll read up on them, but somehow never get around to actually writing |
26 |
anything on them, even if it would in theory save me a bunch of time |
27 |
since I could write stuff once and link it instead of repeating on the |
28 |
lists.) |
29 |
|
30 |
> I do have a question for Duncan (or anybody else who knows, but I know |
31 |
> that Duncan is fairly active on the BTRFS ML), though: |
32 |
> |
33 |
> How does btrfs handle checksum errors on a single drive (or when |
34 |
> self-healing fails)? |
35 |
> |
36 |
> That is, does it return a hard error, rendering the file unreadable, or |
37 |
> is it possible to read from a corrupted file? |
38 |
|
39 |
As you suspect, it's a hard error. |
40 |
|
41 |
There has been developer discussion on the btrfs list of some sort of |
42 |
mount option or the like that would allow retrieval even with bad |
43 |
checksums, presumably with dmesg then being the only indication something |
44 |
was wrong, in case it's a simple single bit-flip or the like in something |
45 |
like text where it should be obvious, or media, where it'll likely not |
46 |
even be noticed, but I've not seen an actual patch for it. Presumably |
47 |
it'll eventually happen, but to now there's a lot more potential features |
48 |
and bug fixes to code up than developers and time in their days to code |
49 |
them, so no idea when. I guess when the right person gets that itch to |
50 |
scratch. |
51 |
|
52 |
Which is yet another reason I have chosen the raid1 mode for both data |
53 |
and metadata and am eagerly awaiting the N-way-mirroring code in ordered |
54 |
to let me do 3-way as well, because I'd really /hate/ to think it's just |
55 |
a bitflip, yet not have any way at all to get to it. |
56 |
|
57 |
Which of course makes it that much more critical to keep your backups as |
58 |
current as you're willing to risk losing, *AND* test that they're |
59 |
actually recoverable, as well. |
60 |
|
61 |
(FWIW here, while I do have backups, they aren't always current. Still, |
62 |
for my purposes the *REAL* backups are the experiences and knowledge in |
63 |
my head. As long as I have that, I can recreate the real valuable stuff, |
64 |
and to the extent that I can't, I don't consider it /that/ valuable. And |
65 |
if I lose those REAL backups... well I won't have enough left then to |
66 |
realize what I've lost, will I? That's ultimately the attitude I take, |
67 |
appreciating the real important stuff for what it is, and the rest, well, |
68 |
if it comes to it, I lose what I lose, but yes, I do still keep backups, |
69 |
actually multiple levels deep, tho as I said they aren't always current.) |
70 |
|
71 |
However, one trick that I alluded to, that actually turned out to be an |
72 |
accidental side effect feature of fixing an entirely different problem, |
73 |
is setting mixed-blockgroup mode at mkfs.btrfs and selecting dup mode for |
74 |
both data and metadata at that time as well. (In mixed-mode, data and |
75 |
metadata must be set the same, and the default except on ssd is then dup, |
76 |
but the point here is to ensure dup, not single.) As I said, the reason |
77 |
mixed-mode is there is to deal with really small filesystems and it's the |
78 |
default for under a gig. And there's definitely a performance cost as |
79 |
well as the double-space cost when using dup. But it *DOES* allow one to |
80 |
run dup mode for both data and metadata, and some users are willing to |
81 |
pay its performance costs for the additional data integrity it offers. |
82 |
|
83 |
Certainly, if you can possibly do two devices, the paired device raid1 |
84 |
mode is preferable, but for instance my netbook has only a single SATA |
85 |
port, so either mixed-bg and dup mode, or partitioning up and using two |
86 |
partitions to fake two devices for raid1 mode, are what I'm likely to do. |
87 |
|
88 |
(I actually don't know which I'll do as I haven't messed with the netbook |
89 |
in awhile, but I have an SSD already laying around to throw in it and I |
90 |
keep thinking about it, and with its single SATA port, it's a perfect |
91 |
example of sometimes not being /able/ to run two devices. OTOH, I might |
92 |
just throw some money at it and buy a full 64-bit replacement machine, |
93 |
thus allowing me to use the 64-bit packages I build for my main machine |
94 |
on the (new) little one too, and thus to do away with the 32-bit chroot |
95 |
on my main machine that I use as a built image for the netbook.) |
96 |
|
97 |
(I snipped it there to reply to this bit first as it was a |
98 |
straightforward answer. I'll go back and read the rest now, to see if |
99 |
there's anything else I want to reply to.) |
100 |
|
101 |
-- |
102 |
Duncan - List replies preferred. No HTML msgs. |
103 |
"Every nonfree program has a lord, a master -- |
104 |
and if you use the program, he is your master." Richard Stallman |