歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> VirtualBox搭建RAC共享存儲劃分

VirtualBox搭建RAC共享存儲劃分

日期:2017/2/28 15:58:06   编辑:Linux教程
使用VirtualBox工具在個人電腦上搭建RAC測試環境,共享存儲設計方法如下:
1.利用VirtualBox中的VBoxManage工具創建磁盤,此工具在VirtualBox安裝目錄中可以找到
VBoxManage createhd --filename D:\VirOS\sharedisks\crs.vdi --size 1048 --format VDI --variant Fixed
VBoxManage createhd --filename D:\VirOS\sharedisks\asm1.vdi --size 5120 --format VDI --variant Fixed
VBoxManage createhd --filename D:\VirOS\sharedisks\asm2.vdi --size 5120 --format VDI --variant Fixed
VBoxManage createhd --filename D:\VirOS\sharedisks\asm3.vdi --size 5120 --format VDI --variant Fixed
VBoxManage createhd --filename D:\VirOS\sharedisks\asm4.vdi --size 5120 --format VDI --variant Fixed

2.將創建完的磁盤連接至虛擬機上,注意中文部分“SATA 控制器”,這是一串標識符,如果你的VirtualBox使用英文界面,這裡要調成英文對的控制器名
VBoxManage storageattach rac1 --storagectl "SATA 控制器" --port 1 --device 0 --type hdd --medium D:\VirOS\sharedisks\crs.vdi --mtype shareable
VBoxManage storageattach rac1 --storagectl "SATA 控制器" --port 2 --device 0 --type hdd --medium D:\VirOS\sharedisks\asm1.vdi --mtype shareable
VBoxManage storageattach rac1 --storagectl "SATA 控制器" --port 3 --device 0 --type hdd --medium D:\VirOS\sharedisks\asm2.vdi --mtype shareable
VBoxManage storageattach rac1 --storagectl "SATA 控制器" --port 4 --device 0 --type hdd --medium D:\VirOS\sharedisks\asm3.vdi --mtype shareable
VBoxManage storageattach rac1 --storagectl "SATA 控制器" --port 5 --device 0 --type hdd --medium D:\VirOS\sharedisks\asm4.vdi --mtype shareable

3.讓這些磁盤能夠共享,此信息將被記入到每個虛擬磁盤文件的文件頭中,故其他其他再使用的時候就無需再設置成共享了
VBoxManage modifyhd D:\VirOS\sharedisks\crs.vdi --type shareable
VBoxManage modifyhd D:\VirOS\sharedisks\asm1.vdi --type shareable
VBoxManage modifyhd D:\VirOS\sharedisks\asm2.vdi --type shareable
VBoxManage modifyhd D:\VirOS\sharedisks\asm3.vdi --type shareable
VBoxManage modifyhd D:\VirOS\sharedisks\asm4.vdi --type shareable

4.將這些磁盤用如下命令加入到其他節點,同樣的注意中文部分“SATA 控制器”標識名
VBoxManage storageattach rac2 --storagectl "SATA 控制器" --port 1 --device 0 --type hdd --medium D:\VirOS\sharedisks\crs.vdi --mtype shareable
VBoxManage storageattach rac2 --storagectl "SATA 控制器" --port 2 --device 0 --type hdd --medium D:\VirOS\sharedisks\asm1.vdi --mtype shareable
VBoxManage storageattach rac2 --storagectl "SATA 控制器" --port 3 --device 0 --type hdd --medium D:\VirOS\sharedisks\asm2.vdi --mtype shareable
VBoxManage storageattach rac2 --storagectl "SATA 控制器" --port 4 --device 0 --type hdd --medium D:\VirOS\sharedisks\asm3.vdi --mtype shareable
VBoxManage storageattach rac2 --storagectl "SATA 控制器" --port 5 --device 0 --type hdd --medium D:\VirOS\sharedisks\asm4.vdi --mtype shareable

Copyright © Linux教程網 All Rights Reserved