1819862 Members
2698 Online
109607 Solutions
New Discussion юеВ

fsck without prompting

 
Didier Honore
Frequent Advisor

fsck without prompting

I would like to include the fsck command in a shell script.

How to reply automaticly yes to all questions to the following command line:

fsck -F vxfs -o full /dev/vgs1010/lvol1


Thanks


Didier
7 REPLIES 7
Kevin O'Donovan
Regular Advisor

Re: fsck without prompting

Hi Didier,

check the man page but I think if you add a -y it takes yes as the answer to any questions.

Kevin.
Pete Randall
Outstanding Contributor

Re: fsck without prompting

fsck -y -F vxfs -o full /dev/vgs1010/lvol1


Pete


Pete
Tim Adamson_1
Honored Contributor

Re: fsck without prompting

Hi,

Use the -y option in your command line.

Refer to the fsck_vxfs(1M) man page for mor information.


Cheers!
Yesterday is history, tomorrow is a mystery, today is a gift. That's why it's called the present.
T G Manikandan
Honored Contributor

Re: fsck without prompting

fsck -F vxfs -o full -y

Just include the -y option
blal
Frequent Advisor

Re: fsck without prompting


Hi

fsck with -y option will do.But recommented to use charecter special device file for the logical volume.

Unmount the filesystem and

fsck -F vxfs -o full /dev/vg00/rlovl1.


regds,
baiju
Live and let live.
doug mielke
Respected Contributor

Re: fsck without prompting

the -y will do it.
Since you're automating this, you'll need to add a look in the lost+found dir to your script, in case fsck finds a problem, it will place it there under it's inode number as a file name.
If you know about it, you may be able to put it back.
Steven E. Protter
Exalted Contributor

Re: fsck without prompting

A script:

#!/usr/bin/sh
# example for $1 /dev/vg01/rlvol9
echo "A files system check on parameter 1 is commencing\n"
fsck -F vxfs -o full -y $1

This will do it.

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