Developers Guide

Volume management
10 Dell EMC SC Series with Red Hat Enterprise Linux 7x | CML1071
There are multiple ways to ensure that these volumes are assigned and referenced by a persistent naming
scheme. This section presents using volume labels or universally unique identifiers (UUIDs) with /dev/sdX
referenced volumes. Volume labels are exceptionally useful when scripting SC Series snapshot recovery. An
example involves mounting a snapshot view volume of a production SC Series snapshot to a backup server.
In this case, the snapshot view volume may be referenced by its volume label without needing to explicitly
identify the associated /dev/sdX device. The volume label is metadata stored within the volume and is
inherited by snapshot view volumes cut from the SC Series snapshot.
Volume labels or UUIDs can also be used in multipath environments. That being said, multipath
/dev/mapper/mpathX device names (or multipath aliases a described in section 3.6.1) are persistent by
default and will not change across reboots. Volume labels, UUIDs, or multipath device names can be used
interchangeably for entries in the /etc/fstab file of a local Linux host.
If snapshot view volumes are used for recovery or relocation of volumes to an alternate Linux host, the use of
volume labels or UUIDs is recommended because these values are uniquely identifying of the volume, in
contrast to how multipath names may differ (depending on the configuration of the /etc/multipath.conf file).
2.5.1 Filesystem volume labels
Filesystem volume labels can be applied when creating a filesystem on the volume or by subsequently using
differing commands. Different filesystems (for example, ext4 or xfs) have different filesystem metadata
schemas and use different commands to view, manage, and change this data.
Filesystem volume labels are created in the /dev/disk/by-label/ folder. Entries in this folder are created as
symbolic links to their respective devices in the /dev folder. The /dev/disk/by-label/ folder is managed
dynamically and will not exist if none of the volumes on the Linux host have any volume labels applied.
The following examples demonstrate some of these concepts. The sample script in section 2.5.4 parses all
the Linux multipath device names and presents its multipath UUID, any known filesystem type, filesystem
volume label, and filesystem UUID values to STDOUT.
To apply a filesystem and label at the same time:
# mkfs.ext4 -L My_ext4_vol /dev/sdX
# mkfs.xfs -L My_xfs_vol /dev/mapper/mpathX
To apply a volume label to an existing filesystem (note the different commands used for different
filesystem types):
# tune2fs -L My_ext4_vol /dev/sdX
# xfs_admin -L My_xfs_vol /dev/mapper/mpathX
To remove a volume label from an existing filesystem (note the different commands used for different
filesystem types):
# tune2fs -L “” /dev/sdX
# xfs_admin -L “--“ /dev/mapper/mpathX