System information

To list such mount points using the fi nd mnt command, type:
~]$ fi nd mnt -t ext4
TARGET SOURCE FSTYPE OPTIONS
/ /dev/sda2 ext4 rw,realtime,seclabel,barrier=1,data=ordered
/boot /dev/sda1 ext4 rw,realtime,seclabel,barrier=1,data=ordered
18.2. Mount ing a File Syst em
To attach a certain file system, use the mo unt command in the following form:
mo unt [option] device directory
The device can be identified by a full path to a block device (for example, “ /dev/sda3 ), a universally
unique identifier (UUID ; for example, “UUID=34795a28-ca6d-4fd8-a347-73671d0c19cb ), or a volume
label (for example, “ LABEL=home” ). Note that while a file system is mounted, the original content of the
directory is not accessible.
Important: Make Sure the Directory is Not in Use
Linux does not prevent a user from mounting a file system to a directory with a file system
already attached to it. To determine whether a particular directory serves as a mount point, run
the fi nd mnt utility with the directory as its argument and verify the exit code:
fi nd mnt directory; echo $?
If no file system is attached to the directory, the above command returns 1.
When the mo unt command is run without all required information (that is, without the device name,
the target directory, or the file system type), it reads the content of the /etc/fstab configuration file
to see if the given file system is listed. This file contains a list of device names and the directories in
which the selected file systems should be mounted, as well as the file system type and mount options.
Because of this, when mounting a file system that is specified in this file, you can use one of the
following variants of the command:
mo unt [option] directory
mo unt [option] device
Note that permissions are required to mount the file systems unless the command is run as ro o t (see
Section 18.2.2, “Specifying the Mount Options ).
Red Hat Ent erprise Lin ux 6 St orage Admin ist rat io n G uide
134