星期六, 11月 15, 2014

使用Oracle Virtual Box 安裝Oracle 10g RAC的disk 環境設定

http://oracle-base.com/articles/12c/oracle-db-12cr1-rac-installation-on-oracle-linux-6-using-virtualbox.php#create_shared_disks

--Create Disks
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" createhd --filename ocr.vdi --size 256 --format VDI --variant Fixed
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" createhd --filename voting.vdi --size 256 --format VDI --variant Fixed
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" createhd --filename asmdisk1.vdi --size 4096 --format VDI --variant Fixed
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" createhd --filename asmdisk2.vdi --size 4096 --format VDI --variant Fixed

--Attach Disks to RAC1
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" storageattach RAC1 --storagectl "SATA" --port 1 --device 0 --type hdd --medium ocr.vdi --mtype shareable
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" storageattach RAC1 --storagectl "SATA" --port 1 --device 0 --type hdd --medium voting.vdi --mtype shareable
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" storageattach RAC1 --storagectl "SATA" --port 1 --device 0 --type hdd --medium asmdisk1.vdi --mtype shareable
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" storageattach RAC1 --storagectl "SATA" --port 1 --device 0 --type hdd --medium asmdisk2.vdi --mtype shareable

--Set disks to shareable
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyhd ocr.vdi --type shareable

"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyhd voting.vdi --type shareable

"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyhd asmdisk1.vdi --type shareable

"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyhd asmdisk2.vdi --type shareable

--Attach Disks to RAC2
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" storageattach RAC2 --storagectl "SATA" --port 1 --device 0 --type hdd --medium ocr.vdi --mtype shareable
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" storageattach RAC2 --storagectl "SATA" --port 1 --device 0 --type hdd --medium voting.vdi --mtype shareable
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" storageattach RAC2 --storagectl "SATA" --port 1 --device 0 --type hdd --medium asmdisk1.vdi --mtype shareable
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" storageattach RAC2 --storagectl "SATA" --port 1 --device 0 --type hdd --medium asmdisk2.vdi --mtype shareable


P.S.
如果要resize 某硬碟至30GB (thin provision)
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyhd G:\RAC1\RAC1.vdi --resize 30720

"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyhd G:\RAC2\RAC2.vdi --resize 30720

如果要複製虛擬機:
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" clonehd G:\RAC2\RAC2.vdi G:\RAC1\RAC1.vdi

沒有留言:

LinkWithin-相關文件

Related Posts Plugin for WordPress, Blogger...