1832973 Members
2530 Online
110048 Solutions
New Discussion

Re: automating fsck

 
SOLVED
Go to solution
Pablo Noya Noya
Occasional Advisor

automating fsck

Hello all !!!!
I am trying to automate a filesystem check using fsck. Basically, having split a set of standard and BCV disks, I try to mount the BCV disks on my backup server. The filesystems have NOT been unmounted on the application server as I am testing an online DB backup and therefore cannot close down the DB. I can manually do a fsck with the -o full,nolog option but will need to respond to the 'clear log and CLEAN' prompt. There seems to be no 'noprompt' option which would be ideal. Does anyone have a solution for this.
Cheers in advance !!!!!
5 REPLIES 5
Pete Randall
Outstanding Contributor
Solution

Re: automating fsck

I believe that "fsck -y" will automatically respond "yes" to all questions.


Pete

Pete
Marco Santerre
Honored Contributor

Re: automating fsck

We have something similar to what you are doing and the exact command we use inside our script is :

fsck -F vxfs -y -o full /dev/vg/lv

Cooperation is doing with a smile what you have to do anyhow.
Steven E. Protter
Exalted Contributor

Re: automating fsck

It is automated.

If there is an issue at startup fsck is run.

The command for recovery should be run manually.

fsck -F vxfs -o full

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Pablo Noya Noya
Occasional Advisor

Re: automating fsck

Man, do you 2 have the record for quick response or what !!!! Cheers for that. It's weird, but the man pages for fsck are a bag of pooh, absolutely no use what so ever. Thanks again.
Pablo
Rory R Hammond
Trusted Contributor

Re: automating fsck

You can run bcheckrc to fix filesystem automatically. Especially when a system does not comme up correctly.

It will do the lvm stuff and then the fsck's.

Rory
There are a 100 ways to do things and 97 of them are right