Use the following steps to set up and configure your virtual machine.
- Create VM from a Red Hat Enterprise Linux 8.5 ISO image to orabp22-vm1-os-ds data store.
Figure 4: Create VM with Red Hat Enterprise Linux 8.5 ISO image
- Select Minimal Installation as base environment.
Figure 5: Software selection display page
- Configure public network from the Distributed switch.
Figure 6: Select the Distributed switch for Public Network
- Add three additional SCSI drivers.
- From VCenter, select the VM and click Edit Settings > Add Devices > SCSI controller.
- Add three more SCSI controllers to SCSI controller 1 through 3.
Figure 7: Select SCSI controllers
- Add hard disks.
- From vCenter, select the VM and click Edit Settings > Add Devices > Hard disks.
- Add all the VM hard disks on the list.
Figure 8: Add hard disks
VM operating system devices partition and prepare the volumes for Oracle ASM
- For each virtual disk, create a single partition that spans the entire disk and has a starting offset of 2,048 sectors. This ensures that the disk is correctly aligned, such that the start of each partition that is created on volume is aligned with the start of a physical sector of a disk or logical block of a LUN. Creating a partition on a disk also marks the disk that is used and can prevent the disk from being used for other purposes.
parted -s /dev/sdh mklabel msdos
parted -s /dev/sdh mkpart primary 2048s 100%
- Use the UDEV rule to assign Linux 0660 permission and ownership of these disks to the grid user, that is, the owner of the Oracle GI and Oracle ASM instance. In the following code sample, the UDEV rule is set for one of the disks as an entry of the custom UDEV rule script in /etc/udev/rules.d/95oracleasm.rules:
KERNEL=="sd[a-z]*[1-9]", SUBSYSTEM=="block", OPTIONS:= "nowatch", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="368ccf09800cd6a0eaf106e5a2155cf92", SYMLINK+="oraudev/disks/ora-data1", OWNER="grid", GROUP="asmadmin", MODE="0660"
The string “368ccf09800cd6a0eaf106e5a2155cf92” is the SCSI ID of the device.
SCSI ID of devices can be found using the following command:
/usr/lib/udev/scsi_id -g -u -d /dev/sdX
Note: Oracle also provides ASMLIB and ASM Filter driver, which supersedes ASMLIB to configure disks. This driver is required to install the additional oraclesm kernel driver, oracleasm-support package, and oracleasmlib library.
- Run the Linux command # udevadm trigger and set the ownership of the device /dev/sdh1 as the following:
grid:asmadmin with 0660 permission and also create a soft link alias /dev/oraudev/disks/ora-data1 that points to /dev/sdh1.
You can use this soft link alias as the path of this device to create an Oracle ASM disk.
- Repeat step 2 and step 3 to create UDEV rules for all the database disks in the custom UDEV rule script.
/etc/udev/rules.d/95oracleasm.rules.
For example, creating these rules creates the device links:
/dev/oraudev/disks/ora-XXX as the following list.