rhel7udev-创新互联

检查磁盘id:

创新互联是一家集网站建设,独山企业网站建设,独山品牌网站建设,网站定制,独山网站建设报价,网络营销,网络优化,独山网站推广为一体的创新建站企业,帮助传统企业提升企业形象加强企业竞争力。可充分满足这一群体相比中小企业更为丰富、高端、多元的互联网需求。同时我们时刻保持专业、时尚、前沿,时刻以成就客户成长自我,坚持不断学习、思考、沉淀、净化自己,让我们为更多的企业打造出实用型网站。

[root@prod04 ~]# /usr/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/sdb

36000c291ff16db7914945dc7f9edd730

[root@prod04 ~]# /usr/lib/udev/scsi_id -g -u -d /dev/sdb

36000c291ff16db7914945dc7f9edd730

生成udev文件:

[root@prod04 ~]# for i in {b..e}; 

do 

echo KERNEL==\"sd?\", ENV{ID_SERIAL}==\"$(/usr/lib/udev/scsi_id -g -u -d /dev/sd$i)\", SYMLINK+=\"asm_disk$i\",  OWNER=\"grid\",  GROUP=\"asmadmin\", MODE=\"0660\"; 

done

KERNEL=="sd?", ENV{ID_SERIAL}=="36000c291ff16db7914945dc7f9edd730", SYMLINK+="asm_diskb", OWNER="grid", GROUP="asmadmin", MODE="0660"

KERNEL=="sd?", ENV{ID_SERIAL}=="", SYMLINK+="asm_diskc", OWNER="grid", GROUP="asmadmin", MODE="0660"

KERNEL=="sd?", ENV{ID_SERIAL}=="", SYMLINK+="asm_diskd", OWNER="grid", GROUP="asmadmin", MODE="0660"

KERNEL=="sd?", ENV{ID_SERIAL}=="", SYMLINK+="asm_diske", OWNER="grid", GROUP="asmadmin", MODE="0660"

检查udev文件:

[root@prod04 ~]# cat /etc/udev/rules.d/99-oracle-asmdevices.rules

KERNEL=="sd?", ENV{ID_SERIAL}=="36000c291ff16db7914945dc7f9edd730", SYMLINK+="asm_diskb", OWNER="grid", GROUP="asmadmin", MODE="0660"

使udev生效:

udevadm control --reload-rules

udevadm trigger

检查磁盘权限:

rhel7 udev

[root@prod04 ~]# 

[root@prod04 ~]# ll /dev/sd*

brw-rw---- 1 root disk     8,  0 Aug  7 10:07 /dev/sda

brw-rw---- 1 root disk     8,  1 Aug  7 10:07 /dev/sda1

brw-rw---- 1 root disk     8,  2 Aug  7 10:07 /dev/sda2

brw-rw---- 1 grid asmadmin 8, 16 Aug  7 10:07 /dev/sdb

[root@prod04 ~]# ll /dev/asm_diskb 

lrwxrwxrwx 1 root root 3 Aug  7 10:07 /dev/asm_diskb -> sdb


新闻标题:rhel7udev-创新互联
分享网址:http://ybzwz.com/article/dcggdj.html