/lib/udev/rules.d/
/dev/.udev/rules.d/
/etc/udev/rules.d/ <- 习惯存放自定义规则文件
rhel6 利用 tgtd 服务如果需要创建自定义 SCSI ID , 需要使用参数
/etc/tgtd/tgtd.conf
scsi_id 123456789
RHEL6 ISCSI 固定命名方法
KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM="/sbin/scsi_id --whitelisted --replace-whitespace /dev/$name", RESULT=="UUID", NAME="devicename"
vi /etc/udev/rules.d/75-custom.rules
KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM="/sbin/scsi_id --whitelisted --replace-whitespace /dev/$name", RESULT=="1a12345689", NAME="mydisk"
rhel5 命名方法
KERNEL=="sd[a-z][0-9]",SYSFS{serial}=="3842FB83B95E4647",SYMLINK+="class%n"
KERNEL=="sd[a-z][0-9]",SYSFS{serial}=="09716989",SYMLINK+="sky%n"
KERNEL=="sdb[1-9]", PROGRAM=="scsi_id -g -s /block/sdb", RESULT=="1129371982379812739281731", SYMLINK+="station%n"
KERNEL=="sdc[1-9]", PROGRAM=="scsi_id -g -s /block/sdc", RESULT=="1129371982379812739281731", SYMLINK+="station%n"
KERNEL=="sdb[1-9]",PROGRAM=="scsi_id -g -s /block/sdb",RESULT=="1494554000000000030313233343536370000000000000000",SYMLINK+="node%n"
KERNEL=="sdc[1-9]",PROGRAM=="scsi_id -g -s /block/sdc",RESULT=="1494554000000000030313233343536370000000000000000",SYMLINK+="node%n"
RHEL6 中, iscsi initiator 必须把 session 与 discovery 打开才可以使用 CHAP
vi /etc/iscsi/iscsid.conf
node.session.auth.authmethod = CHAP
node.session.auth.username = newuser
node.session.auth.password = vendor123
discovery.sendtargets.auth.authmethod = CHAP
discovery.sendtargets.auth.username = newuer
discovery.sendtargets.auth.password = vendor123