Translated message

A translation of this page exists in English.

Warning message

This translation is outdated. For the most up-to-date information, please refer to the English version.

如何在RHEL4,5,6上,为scsi磁盘创建固定的命名

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux (RHEL) 6

  • Red Hat Enterprise Linux 5.3 and later

  • Red Hat Enterprise Linux 4.7 and later

Issue

如何为scsi设备创建固定的名称,使得它在添加新磁盘,删除已存在的磁盘或者重启的时候,不会被改变。

Resolution

rhel6,5.3以后,4.7以后支持的的udev规则可以为scsi创建固定命名。
这些名字是永久的命名的软链接,存在于/dev/disk/by-id(磁盘设备)和/dev/tape/by-id
(磁带和媒体设备)。这些软链接,用于固定设备的属性(与系列号类似),当添加或删除
设备的时候(例如,会使得/dev/nst*设备的重新排序)不会被改变。

用这些固定命名的软链接是强烈推荐的,例如在配置软件的备份的时候(通常是一个
静态的定义,用来将软件设备的备份和操作系统级别的设备文件名进行绑定)。

注意:这些永久命名的软链接是根据设备文件名的默认值在/dev下创建的(例如,/devnst0)。

只针对rhel4

默认情况下,rhel4.7不会在/dev/[disk|tape]/by-id中创建这些固定命名的软链接。
为了创建固定命名软链接,/etc/scsi_id.config需要按照下面的方式改变:

    options=-g -u

修改完毕后,系统需要重启或者运行start_udev用来使得固定命名软链接的创建有效。

Comments

Reference Links - RHEL6
Reference Links - RHEL5

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.

Comments