fsck

George Magklaras georgios at biotek.uio.no
Tue Oct 9 08:20:48 UTC 2007


Your original problem can be solved with output redirection, a standard 
practice in Unix/Linux. To do that, you will need to force fsck in non 
interactive mode (the default is interactive mode, where you will need a 
terminal). To force fsck to operate in non interactive mode, you can use 
the -p flag (see manual page)

If you use the -p flag like this:

fsck -v -p /machine/disk/p1 2>&1 > fscklog.txt

the log file fscklog.txt will contain the output of fsck on partition 
/machine/disk/u1.

(I assume that you are OK asking the utility to non interactively 
correct all the FS errors it finds in batch mode. If you wish to dump a 
log of the initial stages of fsck command without fixing the errors use 
a combonation of -p and -n flags (see manual page)).

Either way, you will have a log of the fsck output wherever you wish.

GM

-- 
--
George Magklaras

Senior Computer Systems Engineer/UNIX Systems Administrator
EMBnet Technical Management Board
The Biotechnology Centre of Oslo,
University of Oslo
http://www.biotek.uio.no/

EMBnet Norway:	http://www.no.embnet.org/





Johan Booysen wrote:
> I forced the fsck, but then had to go off and do something else.  When I
> got back the server was booted up and looked happy enough.
> 
> If fsck usually prompts for an error to be fixed, then I can assume
> everything went alright?
> 
> Thanks.
> 
>  
> 
> -----Original Message-----
> From: redhat-list-bounces at redhat.com
> [mailto:redhat-list-bounces at redhat.com] On Behalf Of
> Krishnaprasad_K at Dell.com
> Sent: 09 October 2007 07:06
> To: redhat-list at redhat.com
> Subject: RE: fsck
> 
> Hi,
> 
> 	If you run fsck manually and found some errors, it will prompt
> to do a fix in the command prompt itself... what's the output ur getting
> in the prompt when u run fsck?
> 
> Thanks,
> Krishnaprasad 
> 
> -----Original Message-----
> From: redhat-list-bounces at redhat.com
> [mailto:redhat-list-bounces at redhat.com] On Behalf Of Johan Booysen
> Sent: Monday, October 08, 2007 6:44 PM
> To: General Red Hat Linux discussion list
> Subject: RE: fsck
> 
> I can't seem to find anything in there either...
> 
> If fsck runs and finds some errors, does it prompt about whether to try
> and fix them (I did a "touch forcefsck" and rebooted the server)?
> 
> Can I assume that in that case it didn't find any errors?
> 
> Thanks.
> 
> Johan
> 
> -----Original Message-----
> From: redhat-list-bounces at redhat.com
> [mailto:redhat-list-bounces at redhat.com] On Behalf Of
> Krishnaprasad_K at Dell.com
> Sent: 08 October 2007 13:19
> To: redhat-list at redhat.com
> Subject: RE: fsck
> 
> Hi,
> 
> I don't think fsck is having a separate log file in linux. All fsck
> messages will be logged in /var/log/messages
> 
> Thanks,
> Krishnaprasad 
> 
> -----Original Message-----
> From: redhat-list-bounces at redhat.com
> [mailto:redhat-list-bounces at redhat.com] On Behalf Of Johan Booysen
> Sent: Monday, October 08, 2007 4:55 PM
> To: General Red Hat Linux discussion list
> Subject: fsck
> 
> Does anyone know if or where fsck logs its results after it has run?  Or
> how it can be configured to do so?
> 
> Thanks.
> 





More information about the redhat-list mailing list