last modified by Nitin Yewale on 01/10/12 - 11:54


How do I create 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?

  • Red Hat Enterprise Linux (RHEL) 6

  • Red Hat Enterprise Linux 5.3 and later

  • Red Hat Enterprise Linux 4.7 and later

The udev rules supplied with Red Hat Enterprise Linux 6, 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.


Reference Links - RHEL6
Reference Links - RHEL5


Seems by default WWN are used.

I have three tape drives per WWN, so am not getting all necessary nodes.

How can I modify so that Serial Numbers not WWN numbers are used for tape drives?

For example,

root@> inquire

scsidev@0.0.0:SPECTRA PYTHON          2000|Autochanger (Jukebox), /dev/sg0

                                           S/N: 901F002454

                                           ATNN=SPECTRA PYTHON          901F002454


scsidev@0.0.1:IBM     ULTRIUM-TD4     97F9|Tape, /dev/nst0

                                           S/N: 1011002454

                                           ATNN=IBM     ULTRIUM-TD4     1011002454


scsidev@0.0.2:IBM     ULTRIUM-TD4     97F9|Tape, /dev/nst1

                                           S/N: 1012002454

                                           ATNN=IBM     ULTRIUM-TD4     1012002454


scsidev@0.1.0:IBM     ULTRIUM-TD4     97F9|Tape, /dev/nst2

                                           S/N: 1014002454

                                           ATNN=IBM     ULTRIUM-TD4     1014002454


scsidev@0.2.0:IBM     ULTRIUM-TD4     97F9|Tape, /dev/nst3

                                           S/N: 1021002454

                                           ATNN=IBM     ULTRIUM-TD4     1021002454


scsidev@0.2.1:IBM     ULTRIUM-TD4     97F9|Tape, /dev/nst4

                                           S/N: 1022002454

                                           ATNN=IBM     ULTRIUM-TD4     1022002454


<snip - removed remaining similar tape drives>

root# > ls  -al /dev/tape/by-id/

total 0

drwxr-xr-x 2 root root 180 Jun  4 05:48 .

drwxr-xr-x 3 root root  60 Jun  4 05:36 ..

lrwxrwxrwx 1 root root   9 Jun  4 05:36 scsi-3201f0090a5002454 -> ../../sg0

lrwxrwxrwx 1 root root  10 Jun  4 05:48 scsi-3201f0090a5002454-nst -> ../../nst1

lrwxrwxrwx 1 root root  10 Jun  4 05:48 scsi-3202f0090a5002454-nst -> ../../nst5

lrwxrwxrwx 1 root root  10 Jun  4 05:48 scsi-3203f0090a5002454-nst -> ../../nst6

lrwxrwxrwx 1 root root  10 Jun  4 05:48 scsi-3204f0090a5002454-nst -> ../../nst9

lrwxrwxrwx 1 root root  11 Jun  4 05:48 scsi-3205f0090a5002454-nst -> ../../nst14

lrwxrwxrwx 1 root root  11 Jun  4 05:48 scsi-3206f0090a5002454-nst -> ../../nst16

I assume that the common WWN number is the cause of the missing drive links.  Seems to select a random drive from within common WWN numbers, ignoring Serial Number (S/N)  and "ATTN" value.

우주곰:지구곰이 아닙니다.
지구곰이 아닙니다.
Categories (190)
Information (5)
About uzoogom (5)
My Advanced Linux (73)
Learning Linux (96)
OperatingSystem (5)
Databases (4)
OpenSource (1)
Tips! (1)
«   2024/02   »
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29