Installation guide

Chapter 28. Miscellaneous storage topics
244
28.2. Configuring persistent storage in Red Hat Enterprise
Linux 6
This section is for systems with external or networked storage; for example, Fibre Channel, iSCSI,
or SRP based storage devices. It is recommended that those systems have persistent device names
configured for your hosts. This assists live migration as well as providing consistent device names and
storage for multiple virtualized systems.
Universally Unique Identifiers (UUIDs) are a standardized method for identifying computers and
devices in distributed computing environments. This section uses UUIDs to identify iSCSI, SRP, or
Fibre Channel LUNs. UUIDs persist after restarts, disconnection and device swaps. The UUID is
similar to a label on the device.
Systems which are not running multipath must use Single path configuration. Systems running
multipath can use Multiple path configuration.
Single path configuration
This procedure implements LUN device persistence using udev. Only use this procedure for hosts
which are not using multipath.
1. Edit the /etc/scsi_id.config file.
Add the following line:
options=--whitelisted --replace-whitespace
This sets the default options for scsi_id, ensuring returned UUIDs contains no spaces. The
IET iSCSI target otherwise returns spaces in UUIDs, which can cause problems.
2. To display the UUID for a given device run the scsi_id --whitelisted --replace-
whitespace --device=/dev/sd* command. For example:
# scsi_id --whitelisted --replace-whitespace --device=/dev/sdc
1IET_00010001
The output may vary from the example above. The output in this example displays the UUID of
the device /dev/sdc.
3. Verify the UUID output from the scsi_id --whitelisted --replace-whitespace --
device=/dev/sd* command is correct and as expected.
4. Create a rule to name the device. Create a file named 20-names.rules in the /etc/udev/
rules.d directory. Add new rules to this file. All rules are added to the same file using the same
format. Rules follow this format:
KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM="/sbin/scsi_id --whitelisted --replace-
whitespace /dev/$name", RESULT=="UUID", NAME="devicename"
Replace UUID and devicename with the UUID retrieved above, and a name for the device. This
is an example for the rule above for three example iSCSI luns:
KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM="/sbin/scsi_id --whitelisted --replace-
whitespace /dev/$name", RESULT=="1IET_00010001", NAME="rack4row16lun1"
KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM="/sbin/scsi_id --whitelisted --replace-
whitespace /dev/$name", RESULT=="1IET_00010002", NAME="rack4row16lun2"