在RedHat/CentOS Linux上映射裸设备的方法如下:
1. 修改/etc/udev/rules.d/60-raw.rules 文件,增加如下内容:
ACTION=="add", KERNEL=="/dev/mapper/DatabaseVG iq_tpch_sys_main01_lv",RUN+="/bin/raw /dev/raw/raw11 %N"
ACTION=="add", ENV{MAJOR}=="253",ENV{MINOR}=="4",RUN+="/bin/raw /dev/raw/raw11 %M %m"
ACTION=="add", KERNEL=="/dev/mapper/DatabaseVG-iq_tpch_sys_temp01_lv",RUN+="/bin/raw /dev/raw/raw21 %N"
ACTION=="add", ENV{MAJOR}=="253",ENV{MINOR}=="3",RUN+="/bin/raw /dev/raw/raw21 %M %m"
KERNEL=="raw[1-2]*", OWNER="sybiq", GROUP="sybase", MODE="660"
2. 在/etc/rc.d/rc.local文件中增加
raw /dev/raw/raw11 /dev/mapper/DatabaseVG-iq_tpch_sys_main01_lv
raw /dev/raw/raw21 /dev/mapper/DatabaseVG-iq_tpch_sys_temp01_lv
3. 执行start_udev进行裸设备映射
4. raw -qa 查看已映射的裸设备
阅读(3698) | 评论(0) | 转发(0) |