在安装virtualbox上安装oracle rac时候需要创建共享磁盘作为数据存储
1、创建3块固定大小硬盘
磁盘大小设置最好不一样,这样容易区分
crs---->1.57G
fdisk ----->1.5G
data1 ---->15G
选择节点1虚拟机,进入其设置界面
2、设置硬盘可共享
管理--->虚拟介质管理--->选择对应硬盘,点击修改:
将以上三块硬盘设置成可共享
3、将共享磁盘加入到节点2虚拟机中
选择节点2虚拟机,进入其设置界面,将之前设置的共享磁盘勾选进来
4、确定该对应关系
根据硬盘大小,确定硬盘作用
node1 node2
/dev/sdb--->crs /dev/sdb
/dev/sdc--->fdisk /dev/sdd
/dev/sdd ---->data /dev/sdc
5、为共享磁盘设置一个主分区
只需要在节点1执行设置分区即可:
[root@node1 ~]# cd /dev
[root@node1 dev]# ls sd*
sdasda1sda2sda3sda4sda5sdbsdcsdd
[root@node1 dev]# fdisk sdc
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x480d1712.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-195, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-195, default 195):
Using default value 195
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
注意:三块共享磁盘都要设置一个主分区
6、查看效果
分区设置完成之后
[root@node1 dev]# pwd
/dev
[root@node1 dev]# ls sd*
sdasda1sda2sda3sda4sda5sdbsdb1sdcsdc1sddsdd1
但是发现节点2只发现:
[root@node2 dev]# ls sd*
sdasda1sda2sda3sda4sda5sdbsdcsdd
节点1和节点2重启之后一致了
[root@node2 dev]# ls sd*
sdasda1sda2sda3sda4sda5sdbsdb1sdcsdc1sddsdd1