[wplug] fsck on mounted fs?

Bill Moran wmoran at potentialtech.com
Tue May 17 20:40:17 EDT 2005


Zachary Uram <netrek at gmail.com> wrote:

> On 4/24/05, William N. Powell <billpwl1 at verizon.net> wrote:
> > 
> > I umounted /mnt/sysimage and ran fsck /dev/hda4 on it and it indicated
> > no errors.
> 
> Can someone explain if/why it is bad idea to run fsck on a mounted filesystem?
> I recall in rescue situation I had to mount the / fs and make it rw
> and then ran e2fsck to fix the problems, and it worked fine afer that.
> I've heard some say to NEVER fsck a mounted fs.

You can run fsck on mounted fs, as long as it's mounted read only.

Running fsck modifies the filesystem independently of the filesystem
code, thus it is possible to have fsck changing metadata at the same
time the filesystem code is changing it, and the result could be
a completely hosed filesystem.

Like many things in computers, there's a mathematical gamble involved.
You _might_ run it, and if the computer is relatively unused, it might
not cause any problems.  It's never a good idea, and it _can_ corrupt
your filesystem, but you also might get away with it.  How much are
you willing to gamble?

-- 
Bill Moran
Potential Technologies
http://www.potentialtech.com


More information about the wplug mailing list