From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: Nagios probe for btrfs RAID status?
Date: Sat, 23 Nov 2013 10:35:08 +0000 (UTC) [thread overview]
Message-ID: <pan$13621$9e5c77ca$1502a49b$4b791baa@cox.net> (raw)
In-Reply-To: 5290695E.80506@pocock.com.au
Daniel Pocock posted on Sat, 23 Nov 2013 09:37:50 +0100 as excerpted:
> What about when btrfs detects a bad block checksum and recovers data
> from the equivalent block on another disk? The wiki says there will be
> a syslog event. Does btrfs keep any stats on the number of blocks that
> it considers unreliable and can this be queried from user space?
The way you phrased that question is strange to me (considers unreliable?
does that mean ones that it had to fix, or ones that it had to fix more
than once, or...), so I'm not sure this answers it, but from the btrfs
manpage...
>>>>
btrfs device stats [-z] {<path>|<device>}
Read and print the device IO stats for all devices of the filesystem
identified by <path> or for a single <device>.
Options
-z Reset stats to zero after reading them.
<<<<
Here's the output for my (dual device btrfs raid1) rootfs, here:
btrfs dev stat /
[/dev/sdc5].write_io_errs 0
[/dev/sdc5].read_io_errs 0
[/dev/sdc5].flush_io_errs 0
[/dev/sdc5].corruption_errs 0
[/dev/sdc5].generation_errs 0
[/dev/sda5].write_io_errs 0
[/dev/sda5].read_io_errs 0
[/dev/sda5].flush_io_errs 0
[/dev/sda5].corruption_errs 0
[/dev/sda5].generation_errs 0
As you can see, for multi-device filesystems it gives the stats per
component device. Any errors accumulate until a reset using -z, so you
can easily see if the numbers are increasing over time and by how much.
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
next prev parent reply other threads:[~2013-11-23 10:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-22 13:47 Nagios probe for btrfs RAID status? Daniel Pocock
2013-11-22 17:52 ` Duncan
2013-11-23 3:59 ` Anand Jain
2013-11-23 8:37 ` Daniel Pocock
2013-11-23 9:20 ` Daniel Pocock
2013-11-23 10:35 ` Duncan [this message]
2013-11-23 11:44 ` Daniel Pocock
2013-11-23 16:32 ` Duncan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='pan$13621$9e5c77ca$1502a49b$4b791baa@cox.net' \
--to=1i5t5.duncan@cox.net \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).