日期:2014-05-16  浏览次数:20858 次

linux 5 裸设备绑定
在以前的redhat版本中,系统通过/etc/sysconfig/rawdevices配置raw的控制文件,通过/etc/init.d/rawdevices来管理raw设备的启动和关闭。
redhat5正规的方法是通过udev来管理raw。裸设备绑定的重启命令为start_udev
今天在数据库检查过程中碰到一客户,没有在系统启动过程实现裸设备自动绑定。简单做下记录,以便不时之需。

[root@wms01 dbcheck]#  more /etc/redhat-release
CentOS release 5.2 (Final)

wms:
[root@wms01 ~]# cd /dev/raw
[root@wms01 raw]# ls -rtl
total 0
crw-rw---- 1 root   oinstall 162, 19 Aug  8 14:29 raw19
crwxr-xr-x 1 oracle oinstall 162, 12 Aug  8 14:29 raw12
crwxr-xr-x 1 oracle oinstall 162, 13 Aug  8 14:29 raw13
crwxr-xr-x 1 oracle oinstall 162,  5 Nov 17 13:54 raw5
crwxr-xr-x 1 oracle oinstall 162,  7 Nov 17 13:54 raw7
crwxr-xr-x 1 oracle oinstall 162,  4 Nov 17 13:54 raw4
crw-r--r-- 1 oracle oinstall 162, 20 Nov 17 13:54 raw20
crwxr-xr-x 1 oracle oinstall 162,  2 Nov 17 13:54 raw2
crwxr-xr-x 1 oracle oinstall 162,  3 Nov 17 13:54 raw3
crwxr-xr-x 1 oracle oinstall 162,  9 Nov 17 13:54 raw9
crwxr-xr-x 1 oracle oinstall 162,  8 Nov 17 13:54 raw8
crwxr-xr-x 1 oracle oinstall 162,  6 Nov 17 13:54 raw6
crwxr-xr-x 1 oracle oinstall 162, 11 Nov 17 13:54 raw11
crwxr-xr-x 1 oracle oinstall 162, 10 Nov 17 13:54 raw10

[root@wms01 raw]#  raw -qa
/dev/raw/raw2:  bound to major 253, minor 27
/dev/raw/raw3:  bound to major 253, minor 19
/dev/raw/raw4:  bound to major 253, minor 28
/dev/raw/raw5:  bound to major 253, minor 29
/dev/raw/raw6:  bound to major 253, minor 8
/dev/raw/raw7:  bound to major 253, minor 9
/dev/raw/raw8:  bound to major 253, minor 10
/dev/raw/raw9:  bound to major 253, minor 11
/dev/raw/raw10: bound to major 253, minor 12
/dev/raw/raw11: bound to major 253, minor 13
/dev/raw/raw12: bound to major 253, minor 14
/dev/raw/raw13: bound to major 253, minor 15
/dev/raw/raw19: bound to major 253, minor 33
/dev/raw/raw20: bound to major 253, minor 31

[root@wms01 dev]# ls -rtl |grep 253
brw-------  1 root root 253,     0 Aug  8 14:27 root
brw-rw----  1 root root 253,     9 Aug  8 14:28 dm-9
brw-rw----  1 root root 253,    10 Aug  8 14:28 dm-10
brw-rw----  1 root root 253,    11 Aug  8 14:28 dm-11
brw-rw----  1 root root 253,    12 Aug  8 14:28 dm-12
brw-rw----  1 root root 253,    13 Aug  8 14:28 dm-13
brw-rw----  1 root root 253,    14 Aug  8 14:28 dm-14
brw-rw----  1 root root 253,    15 Aug  8 14:28 dm-15
brw-rw----  1 root root 253,    16 Aug  8 14:28 dm-16
brw-rw----  1 root root 253,    17 Aug  8 14:28 dm-17
brw-rw----  1 root root 253,    18 Aug  8 14:28 dm-18
brw-rw----  1 root root 253,    19 Aug  8 14:28 dm-19
brw-rw----  1 root root 253,    22 Aug  8 14:28 dm-22
brw-rw----  1 root root 253,    20 Aug  8 14:28 dm-20
brw-rw----  1 root root 253,    24 Aug  8 14:28 dm-24
brw-rw----  1 root root 253,    21 Aug  8 14:28 dm-21
brw-rw----  1 root root 253,    23 Aug  8 14:28 dm-23
brw-rw----  1 root root 253,    26 Aug  8 14:28 dm-26
brw-rw----  1 root root 253,    27 Aug  8 14:28 dm-27
brw-rw----  1 root root 253,    28 Aug  8 14:28 dm-28
brw-rw----  1 root root 253,    29 Aug  8 14:28 dm-29
brw-rw----  1 root root 253,    31 Aug  8 1