1820117 Members
3132 Online
109619 Solutions
New Discussion юеВ

fsck

 
SOLVED
Go to solution
Nobody's Hero
Valued Contributor

fsck

What does the '-y' do in the following command?

fsck -F vxfs -y -o full /dev/vgxx/lvolx
UNIX IS GOOD
10 REPLIES 10
John Poff
Honored Contributor

Re: fsck

Hi Robert,

The -y flag for fsck answers 'yes' to any questions that fsck would ask you while checking a filesystem. Handy if you have already run it once and you know what you will be answering 'yes' to.

JP
Steven E. Protter
Exalted Contributor

Re: fsck

I thought syntax was:


fsck -F vxfs -y -o full /dev/vgxx/rlvolx


The actual answer to your question is correct though.

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
James Murtagh
Honored Contributor
Solution

Re: fsck

Hi Robert,

A full fsck without the -y option will prompt you for a response if it is not sure the correct course of action, i.e. whether a file should be deleted etc. The choices are [qyn] I think for quit, yes or no. Adding -y simply means "answer yes to all questions".

Cheers,

James.
Nobody's Hero
Valued Contributor

Re: fsck

Would one of those questions be, 'do you want to relocate data on the disk'?
UNIX IS GOOD
Nobody's Hero
Valued Contributor

Re: fsck

Plus should I do it on the rlvol and not lvol
??? Is this a must always....
UNIX IS GOOD
John Poff
Honored Contributor

Re: fsck

I've never seen any questions about relocating data, and I've fsck'd some filesystems that were pretty hosed up. Mostly the questions are about repairing inodes and resetting flags. The trick is to run it with the -n option to answer no to everything and see what the questions are first. Then you can run it with -y to do the actual cleanup.

JP
Uday_S_Ankolekar
Honored Contributor

Re: fsck

y stands for YES!!

man fsck_vxfs for more

-USA..
Good Luck..
James Murtagh
Honored Contributor

Re: fsck

I can't see that option anywhere. Relocating valid data blocks is not something fsck would do - it should just check the structural data is in sync with the data on the filesystem. It may relocate blocks to lost+found but this wouldn't be the form of the question. Also, I believe using the raw volume is slightly faster.
Jeff Schussele
Honored Contributor

Re: fsck

I *think* that IF during the fsck process, the system exceeds the read retry limit it assumes the block has gone bad & the system may ask if you wish to attempt relocation. But I'm not sure fsck issues the msg - it may be LVM popping up to query you.

Later,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Murgesh_2
Advisor

Re: fsck

fsck -F vxfs -y (stands for running fsck without any prompt, means it takes 'yes' as default for all Q )

Enjoy
Murgesh