System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

I need scripting help with fsck

SOLVED
Go to solution
frederick hannah
Super Advisor

I need scripting help with fsck

I have an HPUX11.11 rp7400 with numerous customer volume groups and associated lvols. Occassionally I am required to do fsck on the customer data and its very time intensive. Is there a base script I can use to fsck the customer lvols more effificiently?
3 REPLIES
James R. Ferguson
Acclaimed Contributor
Solution

Re: I need scripting help with fsck

Hi:

You might do something like this:

# cat ./fsckthese
#!/usr/bin/sh
vgdisplay -v | \
awk '/LV Name/ && !/vg00/ {split($NF,a,/\//);print "/"a[2]"/"a[3]"/r"a[4]}' | \
while read DEV
do
echo "fsck ... ${DEV}"
done
exit 0

Regards!

...JRF...
frederick hannah
Super Advisor

Re: I need scripting help with fsck

This looks like it will work. Thanks for the refresher
frederick hannah
Super Advisor

Re: I need scripting help with fsck

The script looks good