Developers Guide

Volume management
9 Dell EMC SC Series with Red Hat Enterprise Linux 7x | CML1071
As a best practice, use SC Series volumes as whole drives. However, LVM may still be used if it can provide
features or benefits that are not provided by the storage layer.
2.3.1 LVM configuration and SCSI UNMAP/TRIM
If LVM is used with SC Series volumes, LVM can be configured to respect SCSI UNMAP/TRIM commands
and pass these commands back to the SC Series storage.
This scenario applies where logical volumes are removed from the member volume group. The space
recovered from this removed logical volume correlates to the SC Series pages that are freed and returned to
the page pool.
Configuring LVM is performed by editing the /etc/lvm/lvm.conf file.
1. Edit the /etc/lvm/lvm.conf file.
2. Change the key value pair issue_discards = 0 to issue_discards =1.
3. Save the changes and exit the editor session.
2.4 SCSI UNMAP/TRIM and filesystems
The behaviors of SCSI UNMAP/TRIM can also be configured to operate in the filesystem layer (such as ext4,
xfs, or btrfs).
This scenario applies where files and directories are removed from an ext4, xfs, or btrfs filesystem. The space
recovered from these removed files and directories correlates to the SC Series storage pages that are freed
and returned to the page pool.
Enabling SCSI UNMAP/TRIM functions on the filesystem is done using the mount command. This mount
command parameter is applied in a similar manner regardless of filesystem type (ext4, xfs, or btrfs).
# mount -o discard /dev/mapper/<volume_name> /<mountpoint_name>
This mount parameter can also be made persistent across reboots by adding the appropriate flag to the
/etc/fstab file for the filesystems.
# cat /etc/fstab
[snip]
/dev/mapper/VolGroup00-home /home xfs defaults 1 2
/dev/mapper/VolGroup00-swap swap swap defaults 0 0
/dev/mapper/<volume_name> /<mountpoint_name> xfs defaults,discard 0 0
[snip]
2.5 Persistent device management
Volumes discovered in Linux are given device designations such as /dev/sdd and /dev/sdf depending on the
Linux discovery method used by the HBA ports connecting the server to the SAN.
Among other uses, these /dev/sdX device names designate the volumes for mount commands including
entries in the /etc/fstab file. In static disk environments, /dev/sdX device names work well for entries in the
/etc/fstab file. However, the dynamic nature of Fibre Channel or iSCSI connectivity inhibits Linux from tracking
these disk designations persistently across reboots.