程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> DB2數據庫 >> DB2教程 >> 關於在VM上安裝RACASMUDEV無法返回UUID問題

關於在VM上安裝RACASMUDEV無法返回UUID問題

編輯:DB2教程

關於在VM上安裝RACASMUDEV無法返回UUID問題


利用UDEV服務解決RAC ASM存儲設備名

1.確認在所有RAC節點上已經安裝了必要的UDEV包

[root@rh2 ~]# rpm -qa|grep udev
udev-095-14.21.el5

2.通過scsi_id獲取設備的塊設備的唯一標識名,假設系統上已有LUN sdc-sdp

for i in c d e f g h i j k l m n o p ;
do
echo "sd$i" "`scsi_id -g -u -s /block/sd$i` ";
done
3
for i in b c d e f g h i j k ;
do
echo "KERNEL==\"sd*\", BUS==\"scsi\", PROGRAM==\"/sbin/scsi_id -g -u -s %p\", RESULT==\"`scsi_id -g -u -s /block/sd$i`\", NAME=\"asm-disk$i\", OWNER=\"grid\", GROUP=\"asmadmin\", MODE=\"0660\""
done


中的 2腳本

 

 

for i in c d e f g h i j k l m n o p ;
do
echo "sd$i" "`scsi_id -g -u -s /block/sd$i` ";
done

 

沒有任何返回值 用UDEVTEST 檢查 確實無法返回ID

[root@localhost block]# udevtest /block/sdb
main: looking at device '/block/sdb' from subsystem 'block'
run_program: '/lib/udev/usb_id -x'
run_program: '/lib/udev/usb_id' returned with status 1
run_program: '/lib/udev/scsi_id -g -x -s /block/sdb -d /dev/.tmp-8-16'
run_program: '/lib/udev/scsi_id' returned with status 1
run_program: '/lib/udev/scsi_id -g -x -a -s /block/sdb -d /dev/.tmp-8-16'
run_program: '/lib/udev/scsi_id' (stdout) 'ID_VENDOR=VMware'
run_program: '/lib/udev/scsi_id' (stdout) 'ID_MODEL=Virtual_disk'
run_program: '/lib/udev/scsi_id' (stdout) 'ID_REVISION=1.0'
run_program: '/lib/udev/scsi_id' (stdout) 'ID_SERIAL='
run_program: '/lib/udev/scsi_id' (stdout) 'ID_TYPE=disk'
run_program: '/lib/udev/scsi_id' (stdout) 'ID_BUS=scsi'
run_program: '/lib/udev/scsi_id' returned with status 0
run_program: '/lib/udev/path_id /block/sdb'
run_program: '/lib/udev/path_id' (stdout) 'ID_PATH=pci-0000:00:10.0-scsi-0:0:1:0'
run_program: '/lib/udev/path_id' returned with status 0
udev_rules_get_name: add symlink 'disk/by-path/pci-0000:00:10.0-scsi-0:0:1:0'
run_program: '/lib/udev/vol_id --export /dev/.tmp-8-16'
run_program: '/lib/udev/vol_id' returned with status 4
run_program: '/lib/udev/edd_id --export /dev/.tmp-8-16'
run_program: '/lib/udev/edd_id' (stderr) 'no kernel EDD support'
run_program: '/lib/udev/edd_id' returned with status 2
run_program: '/sbin/scsi_id -g -u -s /block/sdb'
run_program: '/sbin/scsi_id' returned with status 1
run_program: '/sbin/scsi_id -g -u -s /block/sdb'
run_program: '/sbin/scsi_id' returned with status 1
run_program: '/sbin/scsi_id -g -u -s /block/sdb'
run_program: '/sbin/scsi_id' returned with status 1
run_program: '/sbin/scsi_id -g -u -s /block/sdb'
run_program: '/sbin/scsi_id' returned with status 1
run_program: '/sbin/scsi_id -g -u -s /block/sdb'
run_program: '/sbin/scsi_id' returned with status 1
run_program: '/sbin/scsi_id -g -u -s /block/sdb'
run_program: '/sbin/scsi_id' returned with status 1
run_program: '/sbin/scsi_id -g -u -s /block/sdb'
run_program: '/sbin/scsi_id' returned with status 1
run_program: '/sbin/scsi_id -g -u -s /block/sdb'
run_program: '/sbin/scsi_id' returned with status 1
run_program: '/sbin/scsi_id -g -u -s /block/sdb'
run_program: '/sbin/scsi_id' returned with status 1
run_program: '/sbin/scsi_id -g -u -s /block/sdb'
run_program: '/sbin/scsi_id' returned with status 1
udev_rules_get_name: no node name set, will use kernel name 'sdb'
udev_device_event: device '/block/sdb' already in database, validate currently present symlinks
udev_node_add: creating device node '/dev/sdb', major = '8', minor = '16', mode = '0640', uid = '0', gid = '6'
udev_node_add: creating symlink '/dev/disk/by-path/pci-0000:00:10.0-scsi-0:0:1:0' to '../../sdb'
main: run: 'socket:/org/kernel/udev/monitor'
main: run: '/lib/udev/udev_run_devd'
main: run: 'socket:/org/freedesktop/hal/udev_event'
main: run: '/sbin/pam_console_apply /dev/sdb /dev/disk/by-path/pci-0000:00:10.0-scsi-0:0:1:0'

解決方案

第一設備不能格式化

如果是VM

虛擬機的vmx文件裡面加入disk.EnableUUID ="TRUE"
如果再進行任何虛擬機的設置,比如添加磁盤,修改網卡類型或者其它的操作,
disk.EnableUUID參數又會重置為FALSE,所以每次進行虛擬機設置以後,都需要手工再次修改該參數。

想避免添加人工修改的話
只能采用udevinfo來獲得SYSFS[start]和SYSFS[size]的方式來設置了

udevinfo -a -p /sys/block/sdb/sdb1

KERNEL=="sdb1", SUBSYSTEM=="block", SYSFS{size}=="16771797", SYSFS{start}=="63", NAME="asmdisk1-crs",OWNER="grid", GROUP="asmadmin", MODE="0660"



如果是VBOX的話 建議換硬盤總線為SATA

如果格式化的 LINUX 5 那麼請用ASMLIB

 

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved