linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Pocock <daniel@pocock.com.au>
To: linux-btrfs@vger.kernel.org
Subject: Re: Nagios probe for btrfs RAID status?
Date: Sat, 23 Nov 2013 09:37:50 +0100	[thread overview]
Message-ID: <5290695E.80506@pocock.com.au> (raw)
In-Reply-To: <52902808.8020706@oracle.com>



On 23/11/13 04:59, Anand Jain wrote:
> 
> 
>> For example, would the command
>>
>>      btrfs filesystem show --all-devices
>>
>> give a non-zero error status or some other clue if any of the devices
>> are at risk?
> 
>  No there isn't any good way as of now. that's something to fix.

Does it require kernel/driver code changes or it should be possible to
implement in the user space utility?

It would be useful for people testing the filesystem to know when they
get into trouble so they can investigate more quickly (and before the
point of no return)

> [btrfs personal user/sysadmin, not a dev, not anything large enough to
> have personal nagios experience...]
> 
> AFAIK, btrfs raid modes currently switch the filesystem to read-only on
> any device-drop error. That has been deemed the simplest/safest policy
> during development, tho at some point as stable approaches the behavior
> could theoretically be made optional.

None of the warnings about btrfs's experimental status hint at that,
some people may be surprised by it.

> So detection could watch for read-only and act accordingly, either
> switching back to read-write or rebooting or simply logging the event,
> as deemed appropriate.

It would be relatively trivial to implement a Nagios check for
read-only, Nagios probes are just shell scripts

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?


  reply	other threads:[~2013-11-23  8:37 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 [this message]
2013-11-23  9:20     ` Daniel Pocock
2013-11-23 10:35     ` Duncan
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=5290695E.80506@pocock.com.au \
    --to=daniel@pocock.com.au \
    --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).