Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] BTRFS problem? [WAS Quick check on net-print/hplip-3.14.10]
Date: Fri, 18 Sep 2015 21:58:43
Message-Id: 201509182258.28664.michaelkintzios@gmail.com
In Reply to: Re: [gentoo-user] BTRFS problem? [WAS Quick check on net-print/hplip-3.14.10] by Rich Freeman
1 On Friday 18 Sep 2015 19:30:49 Rich Freeman wrote:
2 > On Fri, Sep 18, 2015 at 2:19 PM, Mick <michaelkintzios@×××××.com> wrote:
3 > > On Friday 18 Sep 2015 19:15:50 Rich Freeman wrote:
4 > >> On Fri, Sep 18, 2015 at 1:56 PM, Mick <michaelkintzios@×××××.com> wrote:
5 > >> > On Friday 18 Sep 2015 17:16:54 Marc Joliet wrote:
6 > >> >> On Friday 18 September 2015 10:31:01 Mick wrote:
7 > >> >> >A couple of months ago the akonadi DB went sideways and kmail played
8 > >> >> >up as a result. Again I was suspicious of btrfs, but neither the
9 > >> >> >logs nor fsck showed up anything.
10 > >> >>
11 > >> >> I take it "btrfs scrub" didn't turn up anything, or is that what you
12 > >> >> meant by fsck?
13 > >> >
14 > >> > Am I supposed to run scrub with I do not have a RAID running? I
15 > >> > thought scrub was meant for comparing checksums between mirrored fs -
16 > >> > have I got this wrong?
17 > >>
18 > >> You can actually run scrub on a non-raid btrfs setup. Btrfs will
19 > >> report any errors that it detects (using the checksumming in the
20 > >> filesystem), but it would not be able to fix errors unless you have it
21 > >> storing redundant data somewhere (even on non-raid it still stores
22 > >> redundant metadata by default, and you can choose to do this with data
23 > >> as well which protects against block-level failures but not disk-level
24 > >> failures, obviously).
25 > >>
26 > >> However, you'd have gotten the same errors in dmesg just trying to
27 > >> read the files - btrfs checks the checksum on all file read
28 > >> operations. That is a big part of the value of both btrfs and zfs.
29 > >
30 > > Ah! V interesting ... can I run scrub with mounted partitions, or do I
31 > > have to do it from a LiveCD?
32 >
33 > I didn't check, but I suspect you can only run scrub on a mounted
34 > partition. I also suspect that fsck probably has an option to do
35 > something equivalent offline.
36 >
37 > You do get the error-detection anyway just by reading files, and if
38 > you just ran find on your filesystem and catted every file you have to
39 > /dev/null that would actually accomplish the same thing as long as
40 > you're not in a redundant mode (simply reading all the files doesn't
41 > guarantee that all copies of each file are checked).
42 >
43 > The main reason for doing a scrub is to detect latent issues, and if
44 > you have redundancy that means you can auto-correct them today, rather
45 > than discovering them a month from now when the drive containing the
46 > only good copy fails. Even if you don't have redundancy maybe you
47 > rotate your backups every 30 days and detecting the error might mean
48 > having the ability to go back and restore a good copy of the file
49 > before it is completely replaced with bad copies.
50
51 Thank you Rich, I ran 'btrfs scrub start /" and it found zero problems. dmesg
52 and syslog clean too.
53 --
54 Regards,
55 Mick

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] BTRFS problem? [WAS Quick check on net-print/hplip-3.14.10] "Stefan G. Weichinger" <lists@×××××.at>