1819803 Members
3205 Online
109607 Solutions
New Discussion юеВ

how to run fsck

 
SOLVED
Go to solution
praveen..
Super Advisor

how to run fsck

Hi,
Some of my file system got only in read mode.
but before these are in READ-WRITE mode.

so I want to get them back in RW mode.

I think i need to run fsck.

So please suggest me how to run fsck, this is redhat enterprise Linux server.
Should i use the following steps:

1. first unmount the file system.
2. run the command:
#fsck -y /dev/vg07/db2-mkbldrt01
or
#e2fsck -y /dev/vg07/db2-mkbldrt01

which command should i run?

3. mount the file system.

there are critical data in this file system,

Please suggest

Thanks
7 REPLIES 7
Fabian Brise├▒o
Esteemed Contributor
Solution

Re: how to run fsck

Hello praveen.
Your steps seem fine, in HPUX i use fsck for when a FS woul not mount at boot time, for example.
fsck -y /dev/vg00/lvol4

1. unmount
2. run command
3. mount filesystem.

Also I hpe you have a backup just in case this doesn't work.
Knowledge is power.
praveen..
Super Advisor

Re: how to run fsck

this is ext3 file system.

Please suggest which command should i use.

#fsck -y /dev/vg07/db2-mkbldrt01
or
#e2fsck -y /dev/vg07/db2-mkbldrt01



Thanks
Yogeeraj_1
Honored Contributor

Re: how to run fsck

hi,

I would prefer to specify the file system type using -t option.

Beware of corruptions as fsck by default assumes ext2 file system.

# fsck -t ext3 /dev/vg07/db2-mkbldrt01
OR
# fsck.ext3 /dev/vg07/db2-mkbldrt01

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Fabian Brise├▒o
Esteemed Contributor

Re: how to run fsck

ext3 filesystem ?.
Knowledge is power.
Yogeeraj_1
Honored Contributor

Re: how to run fsck

hi again,

from the docs: (http://kbase.redhat.com/faq/FAQ_80_3434.shtm)

Note that you can also configure your system such that fsck on every boot.

For ext3 filesystems, the boot scripts do a quick check to see if the filesystem journal indicates the file system is clean. If the initial check passes no further checking is performed. Otherwise, the user is prompted to run a full fsck check.

You can force an automatic full check by changing the check interval using tune2fs (-c and/or -i). For example:

tune2fs -c 1 /dev/vg07/db2-mkbldrt01

The above command would tell the init scripts to run fsck on hda2 at every boot.

hope this helps too!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Ganesh Balraman
Regular Advisor

Re: how to run fsck

Dear Praveen,

Never run a fsck wihtout knowing the exct fsck version.

Because running incorrect version of fsck has damaged our entire server.

1.Identify the fs type.
2. Run fsck.

Regds
B.Ganesh
praveen..
Super Advisor

Re: how to run fsck

Thanks

i used:

1. unmount the file system
2. #e2fsck -y /dev/vg07/db2
3. mount back the file system


Thanks