SYS: Configure systems to mount file systems at boot by Universally Unique ID (UUID) or label.

Share this link

Note: This is an RHCSA 7 exam objective.

Mount with UUID

UUID stands for Universal Unique ID. It is 128-bit value that uniquely identifies a disk or partition of a disk.

To get the list of disk UUID, type:

# blkid

To define the disk or partition that you want to mount (here lv_vol) and append it to the /etc/fstab file, type:

# blkid | grep lv_vol >> /etc/fstab

Then, edit the /etc/fstab file and change the new added line with the correct parameters (here /mnt as mount point, ext4 as file system type, etc).

UUID=".." /mnt ext4 defaults 1 2

To mount the disk or partition, type:

# mount /mnt

Mount with label

In addition to UUID, a disk or a partition of a disk can receive a label. It is a string of at most 16 characters long in the case of ext2/ext3/ext4.

To assign a label to a disk or partition (here /dev/vdb1), type:

# e2label /dev/vdb1 TEST
# tune2fs -L TEST /dev/vdb1

To get the label associated with a disk or a partition (here /dev/vdb1), type:

# e2label /dev/vdb1

To mount an ext4 formatted partition (here /dev/vdb1), edit the /etc/fstab file and paste the following line:

LABEL=TEST /mnt ext4 defaults 1 2

To mount the disk or partition, type:

# mount /mnt
1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 4.00 out of 5)

Leave a Reply

Please Login to comment
3 Comment threads
8 Thread replies
Most reacted comment
Hottest comment thread
9 Comment authors
smstongLisenetthegeekaidnavidehredhat0329 Recent comment authors
newest oldest
Notify of

One thing I have noticed from your guides here is that you do not list how to add labels to an already existing ext4 FS – It might be useful for students to know that the following tools can add/change labels on filesystems.

e2label – EX: e2label /dev/sda1 STORAGE

tune2fs – EX: tune2fs -L STORAGE /dev/sda1

Very handy if you are already existing filesystem and expected to change its name.


Also, for xfs file system,
xfs_admin -L “label” /dev/sda1


I would add this to your blkid command 🙂

blkid | grep lv_vol | awk ‘{print$2}’ >> /etc/fstab


In exam they will give us empty hard drive which we can divide to create what questions want or we need to decrease other space to create lvm or swap space?


Same question here


You have to be prepared for both.

RHCSA7: Task of the day

Allowed time: 10 minutes.
Create two new user accounts "steve" and "oliver".
Create a group "team". Create a directory "shared".
All files put into the "shared" directory by "steve" or "oliver" should belong to the "team" group and be only visible by them.

RHCE7: Task of the day

Allowed time: 8 minutes.
Set up an iScsi target based on a fileio backstore of 100MB called /opt/shareddata with CHAP authentication (username=usr/password=pwd), xfs filesystem and standard firewall configuration.

Follow me on Twitter

Poll for favorite RHEL 7 book

What is your favorite RHEL 7 book to prepare RHCSA & RHCE exams?

View Results

Loading ... Loading ...

Poll for most difficult RHCSA 7 topic

What do you think is the most difficult RHCSA 7 topic?

View Results

Loading ... Loading ...

Poll for most difficult RHCE 7 topic

What do you think is the most difficult RHCE 7 topic?

View Results

Loading ... Loading ...