Configuring Oracle 18c RAC Using NFS with ASM

Source: Internet
Author: User

For environments that do not have shared storage, you can use the NFS-based ASM to configure the RAC. Here is a brief description of how to configure an NFS-based ASM service in an Oracle 18c RAC environment.

1. Introduction to the Environment

As shown in the host information used:

2. NFS Server Configuration
[[email protected] ~]# vi /etc/exports/u02    *(rw,sync,no_wdelay,insecure_locks,no_root_squash)[[email protected] ~]# systemctl restart nfs[[email protected] ~]# showmount -eExport list for onas:/u02 *
3. RAC Node mount NFS Share

The RAC node edits the/etc/fstab file separately, adding the following:

[[email protected] ~]# vi /etc/fstabonas:/u02               /u02            nfs     rw,bg,hard,nointr,tcp,vers=3,timeo=600,rsize=32768,wsize=32768,actimeo=0  0 0[[email protected] ~]# mount -a[[email protected] ~]# vi /etc/fstabonas:/u02               /u02            nfs     rw,bg,hard,nointr,tcp,vers=3,timeo=600,rsize=32768,wsize=32768,actimeo=0  0 0[[email protected] ~]# mount -a
4. Installing the Grid Component 4.1 initial installation

The specific installation process does not describe too much, only a few ASM parts.
The second option, Configure ASM on NFS, is used here, and when this option is used, the system automatically creates the shared disk.


Specify the location of OCR, next. When the grid component is installed and configured, the default is to create a 30G size disk ocrvfdgdisk0 for the OCRVFDG disk group, as follows:

[[email protected] ~]# la /u02/asmrac/total 33Gdrwxr-xr-x 2 grid oinstall   40 Sep  4 17:05 .drwxr-xr-x 8 root root     4.0K Sep  4 15:09 ..-rw-rw---- 1 grid asmadmin  28G Sep  5 09:52 ocrvfdgdisk0

Viewed through the ASMCA graphical interface, as shown in:

4.2 Creating a disk group

In the shared directory, 10 virtual disks were created: ASMDISK1~ASMDISK10, which demonstrates the creation of disk groups using ASMCA and the command line, respectively. Create a data disk group from the ASMCA graphical interface and create a FRA disk group with the ASMCA command.

[[email protected] ~]$ asmca -silent -sysAsmPassword abcABC12 -asmsnmpPassword abcABC12 -createDiskGroup -diskString ‘/u02/asmrac‘ -diskGroupName fra -diskList /u02/asmrac/asmdisk6 -redundancy external -au_size 4[INFO] [DBT-30001] Disk groups created successfully. Check /u01/app/grid/cfgtoollogs/asmca/asmca-180905AM105833.log for details.//添加磁盘[[email protected] ~]$ asmca -silent -sysAsmPassword abcABC12 -asmsnmpPassword abcABC12 -addDisk -diskString ‘/u02/asmrac‘ -diskGroupName fra -diskList /u02/asmrac/asmdisk7,/u02/asmrac/asmdisk8,/u02/asmrac/asmdisk9 [[email protected] ~]$ asmcmd lsdsk -t -G fraCreate_Date  Mount_Date  Repair_Timer  Path05-SEP-18    05-SEP-18   0             /u02/asmrac/asmdisk605-SEP-18    05-SEP-18   0             /u02/asmrac/asmdisk705-SEP-18    05-SEP-18   0             /u02/asmrac/asmdisk805-SEP-18    05-SEP-18   0             /u02/asmrac/asmdisk9
5. Create a virtual shared disk using Asmlib configuration 5.1
[[email protected] asmdisks]# for i in  {1..10};do dd if=/dev/zero of=/u02/asmrac/asmdisk$i bs=1024k count=10000;done[[email protected] ~]# ll /u02/asmrac/total 102400000-rw-r--r-- 1 root root 10485760000 Sep  4 11:41 asmdisk1-rw-r--r-- 1 root root 10485760000 Sep  4 11:41 asmdisk2-rw-r--r-- 1 root root 10485760000 Sep  4 11:41 asmdisk3-rw-r--r-- 1 root root 10485760000 Sep  4 11:41 asmdisk4-rw-r--r-- 1 root root 10485760000 Sep  4 11:41 asmdisk5-rw-r--r-- 1 root root 10485760000 Sep  4 11:41 asmdisk6-rw-r--r-- 1 root root 10485760000 Sep  4 11:41 asmdisk7-rw-r--r-- 1 root root 10485760000 Sep  4 11:41 asmdisk8-rw-r--r-- 1 root root 10485760000 Sep  4 11:41 asmdisk9-rw-r--r-- 1 root root 10485760000 Sep  4 11:41 asmdisk10
5.2 Configuring the Asmlib service

Configure the Asmlib service on each of the RAC nodes as follows:

[email protected] ~]# oracleasm configure -iConfiguring the Oracle ASM library driver.This will configure the on-boot properties of the Oracle ASM librarydriver.  The following questions will determine whether the driver isloaded on boot and what permissions it will have.  The current valueswill be shown in brackets (‘[]‘).  Hitting <ENTER> without typing ananswer will keep that current value.  Ctrl-C will abort.Default user to own the driver interface []: gridDefault group to own the driver interface []: dbaStart Oracle ASM library driver on boot (y/n) [n]: yScan for Oracle ASM disks on boot (y/n) [y]: Writing Oracle ASM library driver configuration: done[[email protected] ~]# oracleasm initCreating /dev/oracleasm mount point: /dev/oracleasmLoading module "oracleasm": oracleasmConfiguring "oracleasm" to use device physical block sizeMounting ASMlib driver filesystem: /dev/oracleasm
5.3 Creating a block device

If you use Asmlib, you must create a block device using the Losetup command, as follows:

[[email protected] ~]# for i in {1..10};do losetup /dev/loop$i /u02/asmdisks/asmdisk$i;done[[email protected] ~]# ll /dev/loop*brw-rw---- 1 root disk  7,   1 Sep  4 14:35 /dev/loop1brw-rw---- 1 root disk  7,  10 Sep  4 14:35 /dev/loop10brw-rw---- 1 root disk  7,   2 Sep  4 14:35 /dev/loop2brw-rw---- 1 root disk  7,   3 Sep  4 14:35 /dev/loop3brw-rw---- 1 root disk  7,   4 Sep  4 14:35 /dev/loop4brw-rw---- 1 root disk  7,   5 Sep  4 14:35 /dev/loop5brw-rw---- 1 root disk  7,   6 Sep  4 14:35 /dev/loop6brw-rw---- 1 root disk  7,   7 Sep  4 14:35 /dev/loop7brw-rw---- 1 root disk  7,   8 Sep  4 14:35 /dev/loop8brw-rw---- 1 root disk  7,   9 Sep  4 14:35 /dev/loop9crw-rw---- 1 root disk 10, 237 Sep  4 14:35 /dev/loop-control[[email protected] ~]# for i in {1..10};do losetup /dev/loop$i /u02/asmdisks/asmdisk$i;done[[email protected] ~]# ll /dev/loop*
5.4 Creating an ASM disk
[[email protected] ~]# for i in {1..10};do oracleasm createdisk vol$i /dev/loop$i;done[[email protected] ~]# oracleasm scandisksReloading disk partitions: doneCleaning any stale ASM disks...Scanning system for ASM disks...Instantiating disk "VOL1"Instantiating disk "VOL2"Instantiating disk "VOL3"Instantiating disk "VOL4"Instantiating disk "VOL5"Instantiating disk "VOL6"Instantiating disk "VOL7"Instantiating disk "VOL8"Instantiating disk "VOL9"Instantiating disk "VOL10"
5.5 Using ASM Disks

When installing the grid component, in Configure Storage option, select the first option "Configure ASM using block devices", such as:


Configuring Oracle 18c RAC Using NFS with ASM

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.