首页 > 应用开发 > IT综合 > vb-sharedDisk
网络与存储
VirtualBox 安装node1 node2
网络规划
node1的网卡
eth0 Bridge 10.0.10.244
eth1 Host_only 192.168.56.101/102 --用于公共网口和VIP
GATEWAY=192.168.56.1
eth2 Host_only 192.168.46.101 --用于心跳网口
node2的网卡
eth0 Bridge 10.0.10.245
eth1 Host_only 192.168.56.103/104 --用于公共网口和VIP
GATEWAY=192.168.56.1
eth2 Host_only 192.168.46.103 --用于心跳网口
共享盘的规划
sda 2G Freenas的共享盘iscsi,随后要停掉
hdb 1G crsdisk
hdc 5G asmdisk
配置共享盘两块的过程
vboxmanage createhd --filename crsdisk.vdi --size 1048 --format VDI --variant Fixed
vboxmanage createhd --filename asmdisk.vdi --size 5000 --format VDI --variant Fixed
VBoxManage storageattach node1 --storagectl "SATA 控制器" --port 1 --device 0 --type hdd --medium crsdisk.vdi --mtype shareable
VBoxManage storageattach node1 --storagectl "SATA 控制器" --port 2 --device 0 --type hdd --medium asmdisk.vdi --mtype shareable
VBoxManage modifyhd crsdisk.vdi --type shareable
VBoxManage modifyhd asmdisk.vdi --type shareable
VBoxManage storageattach node2 --storagectl "SATA 控制器" --port 1 --device 0 --type hdd --medium crsdisk.vdi --mtype shareable
VBoxManage storageattach node2 --storagectl "SATA 控制器" --port 2 --device 0 --type hdd --medium asmdisk.vdi --mtype shareable
添加到SATA后,操作系统不能启动,改用IDE控制器
VBoxManage storageattach node1 --storagectl "IDE 控制器" --port 1 --device 0 --type hdd --medium crsdisk.vdi --mtype shareable
VBoxManage storageattach node1 --storagectl "IDE 控制器" --port 1 --device 0 --type hdd --medium asmdisk.vdi --mtype shareable
VBoxManage storageattach node2 --storagectl "IDE 控制器" --port 1 --device 0 --type hdd --medium crsdisk.vdi --mtype shareable
VBoxManage storageattach node2 --storagectl "IDE 控制器" --port 1 --device 0 --type hdd --medium asmdisk.vdi --mtype shareable
以上的操作结果,只能挂一个盘,所以改成手工在界面中添加。
IDE不分端口012... port中只能输入0 1
成功.
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/271063/viewspace-1057326/ ,如需转载,请注明出处,否则将追究法律责任。