Skip to main content
IBM 
ShopSupportDownloads
IBM HomeProductsConsultingIndustriesNewsAbout IBM
IBM : developerWorks : Linux : Education - Tutorials
LPI certification 101 exam prep, Part 4
ZIPPDF (letter)PDF (A4)e-mail
Main menuSection menuFeedbackPreviousNext
2. Linux filesystems
  


A sample fstab page 13 of 23


Let's take a look at a sample /etc/fstab file:


# <fs>         	<mountpoint>    <type>  	      <opts>      			    <dump/pass>

/dev/hda1         /boot		ext2		noauto,noatime			1 2
/dev/hdc7         /		xfs		noatime,osyncisdsync,nodiratime	0 1
/dev/hdc5         none              swap		sw				0 0
/dev/cdrom	/mnt/cdrom	iso9660		noauto,ro,user			0 0
# /proc should always be enabled
proc		/proc             proc		defaults				0 0

Above, each non-commented line in /etc/fstab specifies a partition block device, a mountpoint, a filesystem type, the filesystem options to use when mounting the filesystem, and two numeric fields. The first numeric field is used to tell the dump backup command the filesystems that should be backed up. Of course, if you are not planning to use dump on your system, then you can safely ignore this field. The last field is used by the fsck filesystem integrity checking program, and tells it the order in which your filesystems should be checked at boot. We'll touch on fsck again in a few panels.

Look at the /dev/hda1 line; you'll see that /dev/hda1 is an ext2 filesystem that should be mounted at the /boot mountpoint. Now, look at /dev/hda1s mount options in the <opts> column. The noauto option tells the system to not mount /dev/hda1 automatically at boot time; without this option, /dev/hda1 would be automatically mounted to /boot at system boot time.

Also note the noatime option, which turns off the recording of atime (last access time) information on the disk. This information is generally not needed, and turning off atime updates has a positive effect on filesystem performance. You can also turn off directory atime updates by supplying the nodiratime mount option.


Main menuSection menuFeedbackPreviousNext
PrivacyLegalContact