这是我的故事:
我安装在VMWare Oracle Linux 6.6上,现在我计划安装网格基础架构11.2.0.3以使用ASM测试数据库。 我做的第一个是准备三个设备:sdd / sde / sdf。 我在每个驱动器上创建了分区,然后添加了将UUID映射到设备的规则:
[root@ORAHOST dev]# cat /etc/udev/rules.d/95-oracle-asmdevices.rules
KERNEL=="sdd1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="36000c29db07df5be78df12f25e0aa7fa", NAME="asm1", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sde1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="36000c29f577daa6a902849d466098de5", NAME="asm2", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sdf1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="36000c29d3ac6ee348f5026a9ac830a62", NAME="asm3", OWNER="grid", GROUP="asmadmin", MODE="0660"
当然是/ sbin / start_udev重启
然后配置oracleasm:
[root@ORAHOST dev]# oracleasm configure -i
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting <ENTER> without typing an
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface [grid]:
Default group to own the driver interface [asmadmin]:
Start Oracle ASM library driver on boot (y/n) [y]:
Scan for Oracle ASM disks on boot (y/n) [y]:
Writing Oracle ASM library driver configuration: done
[root@ORAHOST dev]# oracleasm init
Loading module "oracleasm": oracleasm
Configuring "oracleasm" to use device physical block size
Mounting ASMlib driver filesystem: /dev/oracleasm
最后我添加了以前准备好的设备
[root@ORAHOST dev]# oracleasm createdisk ASM1 /dev/asm1
Writing disk header: done
Instantiating disk: done
[root@ORAHOST dev]# oracleasm createdisk ASM2 /dev/asm2
Writing disk header: done
Instantiating disk: done
[root@ORAHOST dev]# oracleasm createdisk ASM3 /dev/asm3
Writing disk header: done
Instantiating disk: done
[root@ORAHOST dev]#
结果如下:
[root@ORAHOST dev]# oracleasm listdisks
ASM1
ASM2
ASM3
所以一切都很好....直到我重新启动。它足以通过exit / init重新启动oracleasm并且所有创建的磁盘都消失了 - 不再有磁盘了:(
[root@ORAHOST dev]# oracleasm exit
Unmounting ASMlib driver filesystem: /dev/oracleasm
Unloading module "oracleasm": oracleasm
[root@ORAHOST dev]# oracleasm init
Loading module "oracleasm": oracleasm
Configuring "oracleasm" to use device physical block size
Mounting ASMlib driver filesystem: /dev/oracleasm
[root@ORAHOST dev]# oracleasm listdisks
[root@ORAHOST dev]#
谷歌发现的这类案例的所有建议都与多路径有关。我没有多路径 - 只是普通的虚拟设备。许可通常也是原因,但我没有看到任何权限错误。 你能给我任何提示/建议/灵魂。
提前致谢
答案 0 :(得分:1)
尝试在asm初始化中加入一些延迟。甲骨文建议睡10秒:
echo -n "Initializing the Oracle ASMLib driver: "
logger "Initializing the Oracle ASMLib driver"
echo "Sleeping for 10 seconds, waiting for disk discovery to finish"
logger "Sleeping for 10 seconds, waiting for disk discovery to finish"
sleep 10
"${ORACLEASM}" init -l "${ORACLE_ASMMANAGER}" -v 1>>/var/log/oracleasm 2>&1
答案 1 :(得分:0)
在VMWare中将主机名VMX文件的disk.enableUUID
属性设置为TRUE
之前,VMWare上的Linux服务器可能无法使用SCSI ID。