【vbox】ORACLE VBOX 共享磁盘组的创建、挂接、分区

27 篇文章 0 订阅

试了好几个版本

C:\Windows\system32>"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" storageattach rac1 --storagectl "SCSI Controller" --port 1 --device 0 --type hdd --medium "E:\rac\disk\votingdisk.vdi" --mtype shareable
VBoxManage.exe: error: Could not find a controller named 'SCSI Controller'

C:\Windows\system32>"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" storageattach rac1 --storagectl "SCSI Controller" --port 2 --device 0 --type hdd --medium "E:\rac\disk\ocr.vdi" --mtype shareable
VBoxManage.exe: error: Could not find a controller named 'SCSI Controller'

C:\Windows\system32>"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" storageattach rac1 --storagectl "SCSI Controller" --port 3 --device 0 --type hdd --medium "E:\rac\disk\asm1.vdi" --mtype shareable
VBoxManage.exe: error: Could not find a controller named 'SCSI Controller'

C:\Windows\system32>"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" storageattach rac1 --storagectl "SCSI Controller" --port 4 --device 0 --type hdd --medium "E:\rac\disk\asm2.vdi" --mtype shareable
VBoxManage.exe: error: Could not find a controller named 'SCSI Controller'
C:\Windows\system32>"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" storageattach rac1 --storagectl "LsiLogic" --port 1 --device 0 --type hdd --medium "E:\rac\disk\votingdisk.vdi" --mtype shareable
VBoxManage.exe: error: Could not find a controller named 'LsiLogic'

C:\Windows\system32>"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" storageattach rac1 --storagectl "LsiLogic" --port 2 --device 0 --type hdd --medium "E:\rac\disk\ocr.vdi" --mtype shareable
VBoxManage.exe: error: Could not find a controller named 'LsiLogic'

C:\Windows\system32>"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" storageattach rac1 --storagectl "LsiLogic" --port 3 --device 0 --type hdd --medium "E:\rac\disk\asm1.vdi" --mtype shareable
VBoxManage.exe: error: Could not find a controller named 'LsiLogic'

C:\Windows\system32>"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" storageattach rac1 --storagectl "LsiLogic" --port 4 --device 0 --type hdd --medium "E:\rac\disk\asm2.vdi" --mtype shareable
VBoxManage.exe: error: Could not find a controller named 'LsiLogic'
C:\Windows\system32>"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" storageattach rac1 --storagectl "SATA Controller" --port 1 --device 0 --type hdd --medium "E:\rac\disk\votingdisk.vdi" --mtype shareable
VBoxManage.exe: error: Could not find a controller named 'SATA Controller'

C:\Windows\system32>"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" storageattach rac1 --storagectl "SATA Controller" --port 2 --device 0 --type hdd --medium "E:\rac\disk\ocr.vdi" --mtype shareable
VBoxManage.exe: error: Could not find a controller named 'SATA Controller'

C:\Windows\system32>"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" storageattach rac1 --storagectl "SATA Controller" --port 3 --device 0 --type hdd --medium "E:\rac\disk\asm1.vdi" --mtype shareable
VBoxManage.exe: error: Could not find a controller named 'SATA Controller'

C:\Windows\system32>"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" storageattach rac1 --storagectl "SATA Controller" --port 4 --device 0 --type hdd --medium "E:\rac\disk\asm2.vdi" --mtype shareable
VBoxManage.exe: error: Could not find a controller named 'SATA Controller'

都无果,最后决定使用菜单挂磁盘

"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" createhd -filename "E:\rac\disk\votingdisk.vdi"    -size 100 -format VDI -variant Fixed 
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" createhd -filename "E:\rac\disk\ocr.vdi"    -size 110 -format VDI -variant Fixed 
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" createhd -filename "E:\rac\disk\asm1.vdi"    -size 5120 -format VDI -variant Fixed 
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" createhd -filename "E:\rac\disk\asm2.vdi"    -size 6142 -format VDI -variant Fixed 

rac1节点挂接四个盘

挂接完毕后设置共享属性

然后再linux下查看fdsk -l看是否挂接

[root@rac1 ~]# fdisk -l

Disk /dev/sda: 43.2 GB, 43278630912 bytes
255 heads, 63 sectors/track, 5261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14        5261    42154560   8e  Linux LVM

Disk /dev/sdb: 104 MB, 104857600 bytes
255 heads, 63 sectors/track, 12 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb doesn't contain a valid partition table

Disk /dev/sdc: 115 MB, 115343360 bytes
255 heads, 63 sectors/track, 14 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdc doesn't contain a valid partition table

Disk /dev/sdd: 6440 MB, 6440353792 bytes
255 heads, 63 sectors/track, 782 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdd doesn't contain a valid partition table

Disk /dev/sde: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sde doesn't contain a valid partition table

然后创建四个盘分区

[root@rac1 ~]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. 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)

Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-12, default 1): 
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-12, default 12): 
Using default value 12

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: 设备或资源忙.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.

最后查看一下

[root@rac1 ~]# fdisk -l

Disk /dev/sda: 43.2 GB, 43278630912 bytes
255 heads, 63 sectors/track, 5261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14        5261    42154560   8e  Linux LVM

Disk /dev/sdb: 104 MB, 104857600 bytes
255 heads, 63 sectors/track, 12 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1          12       96358+  83  Linux

Disk /dev/sdc: 115 MB, 115343360 bytes
255 heads, 63 sectors/track, 14 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1          14      112423+  83  Linux

Disk /dev/sdd: 6440 MB, 6440353792 bytes
255 heads, 63 sectors/track, 782 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1         782     6281383+  83  Linux

Disk /dev/sde: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1               1         652     5237158+  83  Linux

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值