udev常用测试命令
1.重启udev守护进程#start_udev
2.调试udev配置文件
#udevtest /block/sdb
3.查看设备属性
#udevinfo -a -p /block/sda
4.查看设备uuid
#scsi_id -g -u -s /block/sdc
5.reload udev.rules
#udevcontrol reload_rules
[root@rac1 ~]# cat /etc/scsi_id.config
options=-g (添加)
vi /etc/udev/rules.d/20-names.rules
ACTION=="add",KERNEL==”sd*”, BUS==”scsi”, PROGRAM==”/sbin/scsi_id –gs %p”, RESULT==”xxxxxx”, NAME=”sdb%n”
vi /etc/udev/rules.d/60-raw.rules 挂为裸设备
ACTION=="add", NAME=="mydisk1", RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add", NAME=="mydisk2", RUN+="/bin/raw /dev/raw/raw2 %N"
KERNEL=="raw[0-9]*",OWNER="root",GROUP="disk",MODE="640"