Objective 3: Creating and Configuring Filesystem Options

In Chapter 6 we covered mounting various types of filesystems, but up to this point we have discussed creating only ext2 filesystems. In this objective, LPI expects you to be able to create other types of filesystems, such as ISO9660 filesystems for CD-ROMs. In addition, you should be able to set up automounting for network and device filesystems.

Automounting Filesystems

An automounter is a system that automatically mounts disks on demand. It can mount any kind of filesystem that mount can mount, as long as there is no interactive authentication. The handiest property of an automounter is that it is dynamic. If you make an update of the configuration, it's ready to mount at once.

Linux supports an automounter called autofs that is inspired by a Solaris utility of the same name. autofs is configured by two kinds of files.

The master map (usually /etc/auto.master) defines which mount points should be governed by autofs. Each mount point again has an automount map associated with it. The maps are usually stored in files called /etc/auto .mount_point. autofs can store the maps in NIS and LDAP as well as in flat files. We'll concentrate here on flat files. Consider the following /etc/auto.master file:

# Format of this file:
# mountpoint map options
# For details of the format look at autofs(8).
/misc   /etc/auto.misc  --timeout=15
/home   /etc/auto.home

The contents of /etc/auto.misc are:

usbdisk -fstype=vfat,umask=0,dotsOK=yes :/dev/sda1 ...

Get LPI Linux Certification in a Nutshell, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.