RHEL 6.9 udev 将lv绑定raw devices

匿名 (未验证) 提交于 2019-12-02 21:59:42

环境

RHEL6|RHEL7,LVM2,RAW device

用途

使用LVM的lv逻辑卷绑定裸设备

1. 编辑 /etc/udev/rules.d/60-raw.rules 添加如下:

ACTION!="add|change", GOTO="raw_end"
# Create raw character device mapping:
ENV{DM_VG_NAME}=="vgoradata", ENV{DM_LV_NAME}=="lv_5G_1", RUN+="/bin/raw /dev/raw/raw1 %N"
ENV{DM_VG_NAME}=="vgoradata", ENV{DM_LV_NAME}=="lv_5G_2", RUN+="/bin/raw /dev/raw/raw2 %N"
ENV{DM_VG_NAME}=="vgoradata", ENV{DM_LV_NAME}=="lv_5G_3", RUN+="/bin/raw /dev/raw/raw3 %N"
# To set permissions:
KERNEL=="raw*", OWNER:="grid", GROUP:="asmadmin", MODE:="0660" LABEL="raw_end

2.使规则生效

udevadm control --reload-rules
udevadm trigger --type=devices --action=change

3.查看结果

# raw -qa



# vs -o +lv_kernel_major,lv_kernel_minor



参考

https://access.redhat.com/solutions/231323

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!