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

Re: forced fsck (again?)

On Jan 22, 2008  22:35 -0500, Bryan Kadzban wrote:
> > Hmm, if you're going to source the config file directly, why not do 
> > this instead:
> > 
> > check_lvm_fs closure root 100m 30
> > check_lvm_fs closure home 100m 30
> Are you thinking that the check_lvm_fs calls would be in the config file
> (after setting global options), and the check_lvm_fs function would be
> defined in the main script?  That's my guess here, and it'd probably
> work OK, but it'd take a bit of work.  And it's getting late here, so I
> probably won't get it changed until at least tomorrow night.

It probably makes more sense just to parse /etc/fstab and check the
filesystems that have PASS != 0 (column 6), since those are the
filesystems that will be automatically checked on the next boot.  This
also avoids more configuration by the user, which is always desirable.

The second benefit of parsing /etc/fstab is that the filesystem type
can be checked and "fsck.{fstype}" used (if available) instead of just

Alternately, using "lvscan" to check for mounted LVM filesystems and
their fstype is another option, since there is no guarantee that all
filesystems listed in /etc/fstab are on LVM.  That's what I did in a
very old, but similar, script:


The only unfortunate thing is that I was revalidating this script still
works with LVM2 on my system, and created an LV snapshot (worked OK),
but when I tried to lvremove it immediately thereafter the system went
into 100% IO wait and the lvremove process was unkillable :-(.  This was
the 2.6.16 SLES10 kernel, so that may have been fixed in the meantime...

The LVM functions used in this script still appear to be working with
LVM2, so I think it is still a valid approach.

Cheers, Andreas
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.

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