[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: e2fsck



On Fri, Oct 20, 2006 at 04:27:09PM +0000, Francesco Pietra wrote:
> A quick question related to
> 
> "in general it is not safe to run e2fsck on mounted filesys-
>        tems.  The only exception is if the -n option is specified, and -c, -l,
>        or  -L  options  are not specified.   However, even if it is safe to do
>        so, the results printed by e2fsck are not valid if  the  filesystem  is
>        mounted.    If e2fsck asks whether or not you should check a filesystem
>        which is mounted, the only correct answer is ??????no??????.  Only experts  who
>        really know what they are doing should consider answering this question
>        in any other way"
> 
> How to check the filesystem (ext3) if it is not mounted?
> 
> That because I got warning that max count nr reached, suggesting to run 
> e2fsck.

I think the answer is: It is not safe to run fsck on a read-write
mounted filesystem, and if you run it on a read only filesystem, you
should unmount and remount it before making it readwrite.  So for / you
really should run it while in read only mode, and then if any changes
were made, you reboot.  This is how mine has always done it
automatically.

To check filesystems automatically at boot when needed, set the check
flag in fstab.  The last columns in fstab.  I have all mine set to 1,
since linux fsck is smart enough to know not to run on multiple
partitions on one device at once.  For raid systems it might be smarter
to stagger them if multiple raids share devices.  The number is simply
which order to check the filesystems in, if they need checking.

--
Len Sorensen



Reply to: