LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-22-2010, 11:29 AM   #1
xj25vm
Member
 
Registered: Jun 2008
Posts: 393

Rep: Reputation: 68
fsck and root file system


I would like to know if there is a way to do an unattended check on the root file system on my servers, *and* send emails in case of errors.

I know you can schedule a root file system fsck during boot time - but the root file system will be mounted read-only - so if fsck finds any problems - it can't email away a warning, or write the result to a file - or can it?

Essentially I would like my servers to do a self-check of the root file system periodically - and to email me if it fails. I just can't think of a way to get it done.
 
Old 09-22-2010, 11:55 AM   #2
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,669

Rep: Reputation: 498Reputation: 498Reputation: 498Reputation: 498Reputation: 498
Quote:
I know you can schedule a root file system fsck during boot time - but the root file system will be mounted read-only - so if fsck finds any problems - it can't email away a warning, or write the result to a file - or can it?
Yes. But you can always mail the warning portion of your log file after fsck has completed. It might not be "instant" in this case, but the same, you are informed by mail what happened the last fsck run for the given disk.

Use script.

Good luck.
 
Old 09-22-2010, 11:59 AM   #3
xj25vm
Member
 
Registered: Jun 2008
Posts: 393

Original Poster
Rep: Reputation: 68
Quote:
Yes. But you can always mail the warning portion of your log file after fsck has completed.
Are you saying that fsck saves it's output (generated during the boot-up scan) to one of the logs? How does it do that if it's not meant to be writing to the root partition (which is being checked)?
 
Old 10-20-2011, 05:36 AM   #4
xj25vm
Member
 
Registered: Jun 2008
Posts: 393

Original Poster
Rep: Reputation: 68
I know this thread is a bit oldish - but I'm resurrecting it hoping that somebody has an answer. The question is still:

Is there anyway of capturing (and possibly emailing away) the results of the automatic fsck check of the root partition during startup? If I have a server tucked away at a client site, which does a file system check on the root partition during an unattended boot - am I correct in thinking that the results of this test are not saved anywhere on the disk - as the root filesystem is not mounted rw during the check (otherwise the check itself can't happen). Is there any way around this?

Thanks for any suggestions
 
Old 10-20-2011, 01:11 PM   #5
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
You'd have to write some code which would mount some device and re-direct the output from fsck to that device.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
On boot the fsck of 2TB file-system fails thllgo Linux - Server 5 02-16-2011 05:46 PM
fsck damaged my file system Dr_Death_UAE Linux - General 10 02-03-2010 08:21 AM
is fsck checking file system on bootup necessary samwise17 Slackware 3 12-08-2007 11:20 PM
Running fsck (or e2fsck) on root file system... xbill311x Linux - Newbie 2 01-02-2006 10:54 PM
[LFS 61][failed fsck] with reiser file system mr_demilord Linux From Scratch 3 10-13-2005 04:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration