From: sct@dcs.ed.ac.uk (Stephen Tweedie) Subject: Re: fsck on mounted file systems? Date: 14 Apr 1993 22:39:20 GMT
In article <10974@lhdsy1.lahabra.chevron.com>, hwrvo@kato.lahabra.chevron.com (W.R. Volz) writes:
> I noticed that someone said that fsck should be run on
> unmounted file systems. Then how does run it on the
> filesystem that contains fsck? Is this a studip question
> or what? Inquiring minds want to know.
As long as there is no other disk activity going on, it is safe to run
fsck on a mounted partition just to check the correctness of the
partition. However, if you are using the -r or -a options to repair a
filesystem, then there are basically two safe ways to go about it:
* Boot from a different filesystem (eg. from HJ's excellent bootable
floppy rootdisk, from the GCC directory on tsx-11.mit.edu) and use
the fsck there to check your primary root partition; or
* Using the latest kernel, elect to mount the root filesystem
readonly; upon boot, run fsck on the partition, and once that has
finished, remount root for writing and mount the other partitions.
The kernel code to support this is already present, and a version of
mount(8) which supports the necesary remounting of the root filesystem
should hopefully be available soon.
Cheers,
Stephen Tweedie.