* How do I make 'btrfs scrub' report errors via email?
@ 2015-06-13 13:48 crocket
2015-06-14 3:56 ` Duncan
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: crocket @ 2015-06-13 13:48 UTC (permalink / raw)
To: linux-btrfs
I can check the result of 'btrfs scrub' later, but I don't want to
take time to actually check it.
Does anyone know how to make 'btrfs scrub' report errors via email?
It seems google doesn't know.
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: How do I make 'btrfs scrub' report errors via email? 2015-06-13 13:48 How do I make 'btrfs scrub' report errors via email? crocket @ 2015-06-14 3:56 ` Duncan 2015-06-14 4:34 ` Rich Rauenzahn 2015-06-17 17:48 ` Marc MERLIN 2 siblings, 0 replies; 5+ messages in thread From: Duncan @ 2015-06-14 3:56 UTC (permalink / raw) To: linux-btrfs crocket posted on Sat, 13 Jun 2015 22:48:35 +0900 as excerpted: > I can check the result of 'btrfs scrub' later, but I don't want to take > time to actually check it. > Does anyone know how to make 'btrfs scrub' report errors via email? > It seems google doesn't know. You'd throw together a script to do it, or, if you're running it as a cronjob, cron normally already has the ability to mail output elsewhere. Similarly, systemd timer jobs normally start service units, which will normally log to journald and possibly from journald to a more conventional syslog daemon (I'm running syslog-ng here), and those logs can be mailed, often after being sorted. Traditionally there was a sendmail executable (originally part of sendmail, but many alternatives supplied a call-compatible binary) as well, which could be called with an address to send to, along with the message body, and sometimes other parameters as well. This standardized things, and was generally what various daemons that mailed logs used to send them. A script could call it as easy as cron and other daemons did, so it was pretty easy to setup output/log mailings. These days many people don't use a full mail system on the machine, instead using a mail client or webmail, and all these daemons that can be configured to send their output elsewhere very often aren't even setup for it. But it's generally still possible, either using the traditional sendmail executable, or by scripting a call to whatever mail client you normally run, having it handle the message. Meanwhile, it's likely someone here (not me) already has such a thing setup and can post the script. Of course you'd have to adjust it to use your own mail client, if different. -- 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How do I make 'btrfs scrub' report errors via email? 2015-06-13 13:48 How do I make 'btrfs scrub' report errors via email? crocket 2015-06-14 3:56 ` Duncan @ 2015-06-14 4:34 ` Rich Rauenzahn 2015-06-17 17:48 ` Marc MERLIN 2 siblings, 0 replies; 5+ messages in thread From: Rich Rauenzahn @ 2015-06-14 4:34 UTC (permalink / raw) To: crocket, linux-btrfs On 6/13/2015 6:48 AM, crocket wrote: > I can check the result of 'btrfs scrub' later, but I don't want to > take time to actually check it. > Does anyone know how to make 'btrfs scrub' report errors via email? > It seems google doesn't know. I use this job in /etc/cron.d/btrfs.scrub.cron : 0 0 * * fri root for dev in `mount | grep "type btrfs" | awk '{print $1}' | sort -u`; do echo --------------------------; echo Scrubbing $dev :; echo --------------------------; /usr/sbin/btrfs scrub start -B $dev; done I also use sec: http://superuser.com/questions/789303/how-to-monitor-btrfs-filesystem-raid-for-errors ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How do I make 'btrfs scrub' report errors via email? 2015-06-13 13:48 How do I make 'btrfs scrub' report errors via email? crocket 2015-06-14 3:56 ` Duncan 2015-06-14 4:34 ` Rich Rauenzahn @ 2015-06-17 17:48 ` Marc MERLIN [not found] ` <CAL0=0H0OtLOY0toMcLGtmj1s1TywuO2MDmfOcpR2vNzp_czoQQ@mail.gmail.com> 2 siblings, 1 reply; 5+ messages in thread From: Marc MERLIN @ 2015-06-17 17:48 UTC (permalink / raw) To: crocket; +Cc: linux-btrfs On Sat, Jun 13, 2015 at 10:48:35PM +0900, crocket wrote: > I can check the result of 'btrfs scrub' later, but I don't want to > take time to actually check it. > Does anyone know how to make 'btrfs scrub' report errors via email? > It seems google doesn't know. See the bottom of: http://marc.merlins.org/perso/btrfs/2014-03.html#Btrfs-Tips_-Btrfs-Scrub-and-Btrfs-Filesystem-Repair You can remove shlock from the script if you don't have it (or use another lock script). Marc -- "A mouse is a device used to point at the xterm you want to type in" - A.S.R. Microsoft is to operating systems .... .... what McDonalds is to gourmet cooking Home page: http://marc.merlins.org/ | PGP 1024R/763BE901 ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <CAL0=0H0OtLOY0toMcLGtmj1s1TywuO2MDmfOcpR2vNzp_czoQQ@mail.gmail.com>]
* Re: How do I make 'btrfs scrub' report errors via email? [not found] ` <CAL0=0H0OtLOY0toMcLGtmj1s1TywuO2MDmfOcpR2vNzp_czoQQ@mail.gmail.com> @ 2015-06-18 1:23 ` Marc MERLIN 0 siblings, 0 replies; 5+ messages in thread From: Marc MERLIN @ 2015-06-18 1:23 UTC (permalink / raw) To: crocket; +Cc: linux-btrfs On Thu, Jun 18, 2015 at 09:56:09AM +0900, crocket wrote: > I think that's not going to report only errors. Outside of saying how long the scrub took, that's all it does. If you're not quite happy with the output, grep -v is your friend :) Marc -- "A mouse is a device used to point at the xterm you want to type in" - A.S.R. Microsoft is to operating systems .... .... what McDonalds is to gourmet cooking Home page: http://marc.merlins.org/ | PGP 1024R/763BE901 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-06-18 1:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-13 13:48 How do I make 'btrfs scrub' report errors via email? crocket
2015-06-14 3:56 ` Duncan
2015-06-14 4:34 ` Rich Rauenzahn
2015-06-17 17:48 ` Marc MERLIN
[not found] ` <CAL0=0H0OtLOY0toMcLGtmj1s1TywuO2MDmfOcpR2vNzp_czoQQ@mail.gmail.com>
2015-06-18 1:23 ` Marc MERLIN
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox