[CentOS] fsck file system is mounted

Robert Nichols rnicholsNOSPAM at comcast.net
Sat May 16 19:31:54 UTC 2009


centos at 911networks.com wrote:
> Hi,
> 
> Is there a way to run fsck or any other program to check if there is
> drive problem. I don't want it repaired, now, but maybe later on.
> 
> I can't shutdown the system and reboot in single user-mode.
> 
> All suggestions are welcomed.

You can run fsck with the "-n" option (assumes a "no" response to all
prompts) on a mounted file system, but some inconsistencies are
to be expected in the on-disk metadata for an active file system, so
the result is likely to be more confusing than useful unless you
really know what you are doing (and thus probably wouldn't have asked
this question).

If you just want to check for physical drive problems, running

     dd if=/dev/hda of=/dev/null bs=32k

will attempt to read the entire device and abort if it encounters
and unreadable sectors.  Replace "hda" with the appropriate device
or partition, of course.

-- 
Bob Nichols     "NOSPAM" is really part of my email address.
                 Do NOT delete it.




More information about the CentOS mailing list