关于在VM上安装RAC ASM UDEV 无法返回UUID 问题

WBOY
풀어 주다: 2016-06-07 15:57:30
원래의
1095명이 탐색했습니다.

关于在VM上安装RAC ASM UDEV 无法返回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` ";
done3
for i in b c d e f g h i j k ;doecho "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",,OWNER="grid", GROUP="asmadmin", MODE="0660"

如果是VBOX的话 建议换硬盘总线为SATA 

如果格式化的 LINUX 5 那么请用ASMLIB 

本文永久更新链接地址

원천:php.cn
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿