檢查磁盤id:
創(chuàng)新互聯(lián),專注為中小企業(yè)提供官網(wǎng)建設(shè)、營銷型網(wǎng)站制作、成都響應(yīng)式網(wǎng)站建設(shè)公司、展示型成都網(wǎng)站設(shè)計、網(wǎng)站建設(shè)、外貿(mào)網(wǎng)站建設(shè)等服務(wù),幫助中小企業(yè)通過網(wǎng)站體現(xiàn)價值、有效益。幫助企業(yè)快速建站、解決網(wǎng)站建設(shè)與網(wǎng)站營銷推廣問題。
[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
檢查磁盤權(quán)限:
[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