1827871 Members
1292 Online
109969 Solutions
New Discussion

fsck question

 
brian_31
Super Advisor

fsck question

when do i run fsck and e2fsck? what is the difference. man page states that e2fsck can be run on extended filesystems. if that be the case do i run fsck on primary filesystems? how would i find out which one is primary and which is an extended filesystem? please clarify..

Thanks

brian
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: fsck question

Shalom Brian,

fsck can be run on any filesystem, so long as its not mounted. It does not matter whether the filesystem is created with disk druid or LVM gui or the command line.

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
brian_31
Super Advisor

Re: fsck question

Shalom to you Steve

so then when does e2fsck come to play?

Thanks

brian
Stuart Browne
Honored Contributor

Re: fsck question

Ok, here's the funky.

'fsck' is a wrapper around 'e2fsck', and the other filesystem-specific 'fsck' versions (i.e. xfs, reiserfs, jfs, etc. etc.).

Using 'fsck' will automatically detect the filesystem type you're running it on, and attempt to use the appropriate tool for the job.

You can force a filesystem type by using the '-t ' argument, or you can just use the native checker directly.

Filesystem checks can be run in a non-modify-mode on any filesystem.

If there are errors, then you either need to take the fielsystem offline, or make it read-only before you can do repairs. Generally this means bringing the system down into single user mode.

****** IT IS RECOMENDED THAT YOU NEVER TRY THE BELOW ******

You can force a filesystem check repair on a mounted filesystem, but if any writes occur from something other than the repair tool, serious filesystem/data corruption can occur.
One long-haired git at your service...