On rhel5 ,you should edit following both files:
1./etc/sysconfig/rawdevices
- # raw device bindings
- # format: <rawdev> <major> <minor>
- # <rawdev> <blockdev>
- # example: /dev/raw/raw1 /dev/sda1
- # /dev/raw/raw2 8 5
- /dev/raw/raw1 /dev/mapper/datavg-vol01
- /dev/raw/raw2 /dev/mapper/datavg-vol02
- /dev/raw/raw3 /dev/mapper/datavg-vol03
- /dev/raw/raw4 /dev/mapper/datavg-vol04
- /dev/raw/raw5 /dev/mapper/datavg-vol05
- /dev/raw/raw6 /dev/mapper/datavg-vol06
2./etc/udev/rules.d/60-raw.rules
- ACTION=="add", KERNEL=="raw[1-6]", OWNER="sybase", GROUP="sybase", MODE="660"
3.Restart rawdevices service
- [root@syb05 ~]# service rawdevices restart
On rhel6,you just edit /etc/udev/rules.d/60-raw.rules file
- ACTION=="add", KERNEL=="dm-1", OWNER=="sybuser", GROUP=="sybase", RUN+="/bin/raw /dev/raw/raw1 %N"
- ACTION=="add", KERNEL=="dm-2", OWNER=="sybuser", GROUP=="sybase", RUN+="/bin/raw /dev/raw/raw2 %N"
- ACTION=="add", KERNEL=="dm-3", OWNER=="sybuser", GROUP=="sybase", RUN+="/bin/raw /dev/raw/raw3 %N"
- ACTION=="add", KERNEL=="raw[1-3]", OWNER="sybuser", GROUP="sybase", MODE="660"
- [root@syb06 ~]# start_udev
本文出自 “candon123” 博客,谢绝转载!