Re: fstab Pass Column and forced disk checks

Andreas Dilger <[email protected]>
Newsgroups gmane.comp.file-systems.ext3.user,gmane.linux.lvm.general
Message-ID <[email protected]>
On 2010-03-09, at 10:10, Kyle Brandt wrote:
> If I have the 6th column in fstab (the pass column) set to 0, does  
> that mean disk checks will never be forced at boot regardless of  
> anything like File System State, Mount Count, and Check Interval on  
> the file system itself, or are there exceptions to this?

No, there are many filesystems which don't have/allow checking so the  
top-level fsck tool needs to honor this.  I would never recommend  
disabling e2fsck on a system, unless you are running in an HA  
environment where it is not safe to do automated checks at startup  
time.  I also do not recommend that people disable the periodic e2fsck  
checks, because people forget to check their filesystems, and the  
kernel can sometimes spread corruption further if it reads garbage  
from the disk.

If you dislike the periodic (time/mount count) checks that e2fsck  
forces at boot, I would suggest using the "lvcheck" script I posted to  
linux-ext4 some months ago (assuming you are using LVM, which most  
people are these days), and will attach here again. That allows you to  
periodically check the filesystem in the background to detect  
corruptions on disk, without any concern that the next reboot will  
take a long time.

It would be great to get these included as part of the lvm2 package,  
and have lvcheck installed in /etc/cron.weekly to automatically check  
all the LVs configured on the system, and solve the "we don't like  
periodic checks at boot" problem in a way that is still robust to the  
errors that will undoubtably appear on disk at one point or another.

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

_______________________________________________
Ext3-users mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/ext3-users
lvcheck (application/octet-stream, 10.5 KB) - not displayed
lvcheck.conf (application/octet-stream, 1.2 KB)
#!/bin/sh
# lvcheck configuration file

# This file follows the pattern of sshd_config:
# default values are shown here, commented-out.

# EMAIL: Address to send failure notifications to. If empty, failure
# notifications will not be sent.
#EMAIL='root'

# INTERVAL: Days to wait between checks. All LVs use the same INTERVAL,
# but the "days since last check" value can be different per LV, since
# that value is stored in the filesystem superblock.
#INTERVAL=30

# AC_UNKNOWN: Whether to run the fsck.* checks if the script can't determine
# whether the machine is on AC power. Laptop users will want to set this to
# ABORT, while server and desktop users will probably want to set this to
# CONTINUE.  Those are the only two valid values.
#AC_UNKNOWN="CONTINUE"

# MINSNAP: Minimum snapshot size to take, in megabytes. The default size is
# 1/500 the size of the logical volume, but if that is less than MINSNAP, the
# script will use MINSNAP instead. This should be large enough to handle e.g.
# journal updates, and other disk changes that require (semi-)constant space.
#MINSNAP=256

# MINFREE: Minimum amount of space (in megabytes) to keep free in each volume
# group when creating snapshots.
#MINFREE=0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.