Mastering etcfstab

Mastering /etc/fstab

Linux uses /etc/fstab during the boot process to mount partitions and directories in different ways. As shown in Figure 7.11, a number of parameters are associated with each filesystem. These parameters determine how filesystems are mounted, the way data is read, which user permissions are associated with the filesystem, and more.

click to expand
Figure 7.11: /etc/fstab defines how directories are mounted

As you can see, there are six different fields in each /etc/fstab line. Table 7.5 describes these fields, which are listed from left to right.

Table 7.5: /etc/fstab Fields

Column

Field

Description

1

Label

The filesystem, such as /usr , or partition, such as /dev/sdb1 , to be mounted.

2

Mount Point

The directory where the partition or filesystem is to be mounted.

3

Format

The Filesystem format type, such as ext2 , ext3 , or reiserfs .

4

Mount Options

The defaults option includes rw (read-write), suid (SUID permissions), dev (terminals and block devices such as drives ), exec (binary files), auto (automatically mounted), nouser (only root can mount), and async (data is read and written asynchronously).

5

Dump Value

If 1, the filesystem is automatically written to disk.

6

Filesystem Check Order

Filesystems that need fsck . The root ( / ) filesystem should be 1; others on the local computer should be 2; swap, virtual, CD, floppy, and remote directories should be 0.

In most cases, a listing such as LABEL=/ is checked against the partition data on your computer to find the actual partition device, such as /dev/hda3 , to be mounted.

Other mount options are available, such as usrquota and grpquota (for setting quotas), noauto (to make sure Linux doesn t look for a CD or floppy when it boots), and user (to let any user mount a filesystem, such as a CD-ROM).

 


Mastering Red Hat Linux 9
Building Tablet PC Applications (Pro-Developer)
ISBN: 078214179X
EAN: 2147483647
Year: 2005
Pages: 220

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net