White Papers

Volume management
16 Dell EMC SC Series: Red Hat Enterprise Linux Best Practices | CML1031
3 Volume management
Understanding how volumes are managed in Linux requires basic understanding of the /sys pseudo-
filesystem. The /sys filesystem is a structure of files that allow interaction with various elements of the kernel
and modules. While the read-only files store current values, read/write files trigger events with the correct
commands. Generally, the cat and echo commands are used with a redirect as STDIN instead of being
opened with a traditional text editor.
To interact with the HBAs (FC, iSCSI, and SAS), commands are issued against special files located in the
/sys/class/scsi_host/ folder. Each port on a multiport card represents a unique HBA, and each HBA has its
own hostX folder containing files for issuing scans and reading HBA parameters. The folder layout, files, and
functionality can vary depending on the HBA vendor or type. Example HBAs include QLogic
®
Fibre Channel,
Emulex
®
Fibre Channel, software-iSCSI based HBAs, or Dell EMC 12Gbps SAS HBAs.
RHEL systems also provide several utilities to simplify the volume management. To access these utilities,
install the sg3_utils and lsscsi packages.
# yum install sg3 utils lsscsi
3.1 Identifying HBAs on the Linux system
Before the SC Series volumes can be presented/mapped to a Linux system, first create a server object in
DSM using the information of the Linux system HBAs. This section demonstrates how to identify the HBA
information to be used with this process.
3.1.1 FC HBAs
SC Series storage identifies a Linux system FC HBA by the WWPN. To display the WWPN, display the
content of /sys/class/fc_host/hostX/port_name.
# cat /sys/class/fc_host/host11/port_name
The following example script displays the WWPN and other useful information for all HBAs.
#!/bin/bash
# Script name: fcshow.sh
printf "%-10s %-20s %-10s %-s\n" "Host-Port" "WWN" "State" "Speed"
printf "%50s\n" |tr ' ' -
ls -1d /sys/class/fc_host/host* | while read host
do
(echo ${host##*/}: ; cat $host/port_name $host/port_state $host/speed)| xargs
-n 5 printf "%-10s %-20s %-10s %s %s\n"
done