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

Re: e2fsck



On Friday 20 October 2006 16:37, Lennart Sorensen wrote:
> 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.

Thanks a lot. Do these indications hold also for an external usb hd that is 
shared with another machine? In fstab is presently dump 0, pass 0, so I have 
to change to pass 1. If so, is it checked not-mounted at boot?

Which options are used on automatic check? I refer to options for e2fsck, if 
this applies to automatic check.

Should I check the external usb hd manually by e2fsck (which, is I remember 
correctly, for ext3 should only run the journal unless something very bad is 
involved), which options are to be given? -p alone?

Thanks again

francesco pietra
>
> --
> Len Sorensen



Reply to: