1 使用vmware创建共享磁盘:
C:\Users\Administrator>E:\vmware\vmware-vdiskmanager.exe -c -s 500M -a lsilogic -t 2 "G:\rac_sharedisk\testdisk01.vmdk"
Creating disk 'G:\rac_sharedisk\testdisk01.vmdk'
Create: 100% done.
Virtual disk creation successful.
2 使用vmware将磁盘添加进虚拟机。
进入虚拟机主目录,修改对应的vmx文件, 添加如下行,其中6可以根据情况自行制定。
scsi1:6.present = "TRUE"
scsi1:6.mode = "independent-persistent"
scsi1:6.filename = "G:\rac_sharedisk\testdisk01.vmdk"
scsi1:6.deviceType = "disk"
ps:一套rac两个节点都一样操作
3 操作系统扫描磁盘,若fdisk无法查看到对应磁盘,使用如下命令重新扫描磁盘(对正在运行的rac无影响)
[root@rac1 raw]#echo "- - -" > /sys/class/scsi_host/host0/scan
[root@rac1 raw]#echo "- - -" > /sys/class/scsi_host/host1/scan
...
[root@rac1 raw]# fdisk -l
Disk /dev/sdg: 524 MB, 524288000 bytes
64 heads, 32 sectors/track, 500 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
4 修改udev配置文件
[root@rac2 raw]# grep -v ^# /etc/udev/rules.d/60-raw.rules
ACTION=="add", KERNEL=="sdb1", RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add", KERNEL=="sdc1", RUN+="/bin/raw /dev/raw/raw2 %N"
ACTION=="add", KERNEL=="sdd1", RUN+="/bin/raw /dev/raw/raw3 %N"
ACTION=="add", KERNEL=="sde1", RUN+="/bin/raw /dev/raw/raw4 %N"
ACTION=="add", KERNEL=="sdf1", RUN+="/bin/raw /dev/raw/raw5 %N"
ACTION=="add", KERNEL=="sdg", RUN+="/bin/raw/dev/raw/raw6 %N"
KERNEL=="raw1", OWNER="grid", GROUP="asmadmin", MODE="660"
KERNEL=="raw2", OWNER="grid", GROUP="asmadmin", MODE="660"
KERNEL=="raw3", OWNER="grid", GROUP="asmadmin", MODE="660"
KERNEL=="raw4", OWNER="grid", GROUP="asmadmin", MODE="660"
KERNEL=="raw5", OWNER="grid", GROUP="asmadmin", MODE="660"
KERNEL=="raw6", OWNER="grid", GROUP="asmadmin", MODE="660"
5 重启udev(对正在运行的rac无影响)
/sbin/start_udev
6 确认盘已经存在
[root@rac1 raw]# pwd
/dev/raw
[root@rac1 raw]# ll
total 0
crw-rw---- 1 grid asmadmin 162, 1 Jun 14 05:01 raw1
crw-rw---- 1 grid asmadmin 162, 2 Jun 14 05:00 raw2
crw-rw---- 1 grid asmadmin 162, 3 Jun 14 05:00 raw3
crw-rw---- 1 grid asmadmin 162, 4 Jun 14 04:40 raw4
crw-rw---- 1 grid asmadmin 162, 5 Jun 14 04:40 raw5
crw-rw---- 1 grid asmadmin 162, 6 Jun 14 05:00 raw6
crw-rw---- 1 root disk 162, 0 Jun 14 04:40 rawctl
6 进入asm实例,添加磁盘。
SQL> select PATH,name,GROUP_NUMBER,STATE,MOUNT_STATUS,HEADER_STATUS from v$asm_disk;
PATH NAME GROUP_NUMBER STATE MOUNT_STATUS HEADER_STATUS
------------------------------ ---------- ------------ ---------------- -------------- ------------------------
/dev/raw/raw6 0 NORMAL CLOSED CANDIDATE
/dev/raw/raw3 DATA_0002 2 NORMAL CACHED MEMBER
/dev/raw/raw4 DATA1_0000 1 NORMAL CACHED MEMBER
/dev/raw/raw5 DATA1_0001 1 NORMAL CACHED MEMBER
/dev/raw/raw2 DATA_0001 2 NORMAL CACHED MEMBER
/dev/raw/raw1 DATA_0000 2 NORMAL CACHED MEMBER
SQL> alter diskgroup DATA add disk '/dev/raw/raw6';
Diskgroup altered.
文章名称:vmware创建共享磁盘给oraclerac使用(rhel系统)
标题链接:
http://cxhlcq.com/article/pgishc.html