Create a shared disk in Oracle VM and mount ASM

Source: Internet
Author: User

There are still many steps to generate a shared disk and mount it to asm when Oracle VM builds Oracle RAC. Record it. The premise is that a linux has been installed in the VM.
1. here I create five disks, cd C: \ Program Files \ Oracle \ VirtualBoxVBoxManage.exe createhd-filename D: \ OracleVM \ ASM \ asm1.vdi-size 5120-format VDI-variant FixedVBoxManage.exe createhd-filename D: \ OracleVM \ ASM \ asm2.vdi-size 5120-format VDI-variant FixedVBoxManage.exe createhd-filename D: \ OracleVM \ ASM \ asm3.vdi-size 5120-format VDI-variant FixedVBoxManage.exe createhd-filename D: \ OracleVM \ ASM \ asm4.vdi-siz E 5120-format VDI-variant FixedVBoxManage.exe createhd-filename D: \ OracleVM \ ASM \ asm5.vdi-size 5120-format VDI-variant Fixed 2. Add it to the Oracle VM. This VM can also use commands, but it is not easy to use. Settings-> Storage-> Controller: SATA-> Add Hard Disk3. change to a shared-mode vboxmanage.exe modifyhd D: \ OracleVM \ ASM \ asm1.vdi -- type specified ablevboxmanage.exe modifyhd D: \ OracleVM \ ASM \ asm2.vdi -- type implements ablevboxmanage.exe modifyhd D: \ OracleVM \ ASM \ asm3.vdi -- type implements modifyhd D: \ OracleVM \ ASM \ asm4.vdi -- type implements ablevboxmanage.exe modifyhd D: \ OracleVM \ ASM \ asm5.vdi -- type retriable 4. check status. VBoxManage list vms B. go to the linux system [root @ rac1 dev] # ls sd * sda sda1 sda2 sdb sdc sdd sde sdf // Where sdb sdc sdd sde sdf is the five disks mounted
5. fdisk. In sequence: fdisk sdb fdisk sdc fdisk sdd fdisk sde fdisk sdf attached example: [root @ rac1 dev] # fdisk sdbDevice contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabelBuilding a new DOS disklabel with disk identifier 0x1f132726. 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 partit Ion table 4 will be corrected by w (rite) WARNING: DOS-compatible mode is deprecated. it's stronugly recommended to switch off the mode (command 'C') and change display units to sectors (command 'U '). command (m for help): pDisk sdb: 5368 MB, 5368709120 bytes255 heads, 63 sectors/track, 652 cylindersUnits = cylinders of 16065*512 = 8225280 bytesSector size (logical/physical ): 512 bytes/512 bytesI/ O size (minimum/optimal): 512 bytes/512 bytesDisk identifier: 0x1f132726Device Boot Start End Blocks Id SystemCommand (m for help): nCommand action e extended p primary partition (1-4) pPartition number (1-4): 1 First cylinder (1-652, default 1): Using default value 1 Last cylinder, + cylinders or + size {K, M, g} (1-652, default 652): Using default value 652 Command (m for help): pDisk sdb: 5368 MB, 53687 09120 bytes255 heads, 63 sectors/track, 652 cylindersUnits = cylinders of 16065*512 = 8225280 bytesSector size (logical/physical): 512 bytes/512 bytesI/O size (minimum/optimal): 512 bytes/512 bytesDisk identifier: 0x1f132726Device Boot Start End Blocks Id System sdb1 1 652 5237158 + 83 LinuxCommand (m for help): wThe partition table has been altered! Calling ioctl () to re-read partition table. Syncing disks. [root @ rac1 dev] # ls sd * sda sda1 sda2 sdb sdb1 sdc sdd sde sdf
Final Result: [root @ rac1 dev] # ls sd * sda sda1 sda2 sdb sdb1 sdc sdc1 sdd sdd1 sde sde1 sdf sdf1

6. Create an asm disk in sequence [root @ xclrac1 ~] # Oracleasm createdisk DISK1/dev/sdb1Writing disk header: doneInstantiating disk: done [root @ xclrac1 ~] # Oracleasm createdisk DISK2/dev/sdc1Writing disk header: doneInstantiating disk: done [root @ xclrac1 ~] # Oracleasm createdisk DISK3/dev/sdd1Writing disk header: doneInstantiating disk: done [root @ xclrac1 ~] # Oracleasm createdisk DISK4/dev/sde1Writing disk header: doneInstantiating disk: done [root @ xclrac1 ~] # Oracleasm createdisk DISK5/dev/sdf1Writing disk header: doneInstantiating disk: done
7. Check the effect [root @ xclrac1 ~] # Oracleasm listdisksDISK1DISK2DISK3DISK4DISK5
8. Ask oracleasm to find the disk [root @ xclrac1 ~] # Oracleasm scandisksReloading disk partitions: doneCleaning any stale ASM disks... scanning system for ASM disks... 9. [root @ xclrac1 Packages] # oracleasm configure-imo-ing the Oracle asm library driver. default user to own the driver interface []: oracleDefault group to own the driver interface []: dba [root @ xclrac1 Packages] # oracleasm configureORACLEASM_ENABLED = trueORACLEASM_UID = oracleORACLEASM_GID = dbaORACLEASM_SCANBOOT = trueORACLEASM_SCANORDER = "" ORACLEASM_SCANEXCLUDE = "" false"
So far, the Linux asm has been mounted successfully. The rest is to Clone the OS. Then you will find out. These disks can be found and used by two operating systems. You can install RAC with confidence. C: \ Program Files \ Oracle \ VirtualBox> VBoxManage.exe clonehd D: \ OracleVM \ OLE_RAC1 \ O
LE_RAC1.vdi D: \ OracleVM \ OLE_RAC2 \ OLE_RAC2.vdi
0%... 10%... 20%... 30%... 40%... 50%... 60%... 70%... 80%... 90%... 100%
Clone hard disk created in format 'vdi '. UUID: c7f39d05-98b8-426f-8897-16a8e39ea
34f

The detailed steps for installing oracle asm are attached:
MAIL: xcl_168@aliyun.comBlog: http://blog.csdn.net/xcl168

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.