How to create custom persistent names for SCSI devices in Red Hat Enterprise Linux 4, 5 and 6?
Environment
- Red Hat Enterprise Linux 6 and later
- Red Hat Enterprise Linux 5.3 and later
- Red Hat Enterprise Linux 4.7 and later
Issue
- How to create custom persistent device names for attached SCSI devices that will not be changed on reboot or when new devices are added or existing devices are removed?
Resolution
-
The udev rules supplied with Red Hat Enterprise Linux 6 and later, 5.3 and later, and 4.7 and later can create persistent device names for SCSI devices. These names are actually persistently-named symbolic links that appear in
/dev/disk/by-id(for disk devices) and/dev/tape/by-id(for tape and media changer devices). These symbolic links, which use persistent device attributes (like serial numbers), do not change when devices are added or removed from the system (which causes reordering of the/dev/nst*devices, for example). -
Use of these persistently-named symbolic links is highly desirable in, for instance, the configuration of backup software (which is commonly a static definition that binds a backup software device name to an operating system-level device file name).
Note: that these persistently-named symbolic links are created in addition to the default device file names in /dev (for example, /dev/nst0).
For Red Hat Enterprise Linux 4 only
By default, a Red Hat Enterprise Linux 4.7 system will not create these persistently-named symbolic links in /dev/[disk|tape]/by-id. For the persistently-named symbolic links to be created, /etc/scsi_id.config must be modified as follows:
options=-g -u
Following this modification, the system should be rebooted or run command start_udev to enable creation of the persistently-named symbolic links.
Comments
-
For RHEL5, refer to How can static names be assigned for SCSI devices using udev in Red Hat Enterprise Linux 5?
-
For RHEL6, refer to How can static names be assigned for SCSI devices using udev in Red Hat Enterprise Linux 6?
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.