0% found this document useful (0 votes)
574 views

1.install ASM Using ASMLib 19c

The document describes the steps to install standalone ASM for a non-RAC database, also called Oracle Restart or High Availability Services (HAS). Key steps include: 1. Configuring operating system users, groups, and permissions for the Oracle Grid Infrastructure and database installation. 2. Installing the Oracle ASM library RPM and configuring the ASM library driver. 3. Provisioning raw disks and creating ASM disk partitions. 4. Installing the Oracle Grid Infrastructure software, which provisions the initial ASM disk group. 5. Installing the Oracle database software and creating a database that uses the ASM disk group for storage.

Uploaded by

Vivek Maramwar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
574 views

1.install ASM Using ASMLib 19c

The document describes the steps to install standalone ASM for a non-RAC database, also called Oracle Restart or High Availability Services (HAS). Key steps include: 1. Configuring operating system users, groups, and permissions for the Oracle Grid Infrastructure and database installation. 2. Installing the Oracle ASM library RPM and configuring the ASM library driver. 3. Provisioning raw disks and creating ASM disk partitions. 4. Installing the Oracle Grid Infrastructure software, which provisions the initial ASM disk group. 5. Installing the Oracle database software and creating a database that uses the ASM disk group for storage.

Uploaded by

Vivek Maramwar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 49

STANDALONE ASM INSTALLATION 19C ( ORACLE RESTART)

We will see how to install standalone ASM for NON RAC database
It is also called as oracle restart or HAS

1. Verify OS details like OS version , cpu , memory details

free -g

cat /proc/meminfo |grep -i mem


cat /proc/meminfo |grep -i swap
cat /proc/cpuinfo |grep -i processor
cat /etc/redhat-release
cat /etc/issue
uname -a

2. Check the certification for OS for GRID and database

3. Create groups , Users for GRID and RDBMS Installation

in our case they are already in place do no need to create

As root user:-

/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
/usr/sbin/groupadd oper
/usr/sbin/groupadd asmdba
/usr/sbin/groupadd asmadmin
/usr/sbin/groupadd asmoper

/usr/sbin/useradd -g oinstall -G dba,oper,asmdba,dba oracle—RDBMS


/usr/sbin/useradd -g oinstall -G asmadmin,asmdba,asmoper ,dba grid--- GRID

If users are already exists we can modify


/usr/sbin/usermod -g oinstall -G dba,oper,asmdba oracle
/usr/sbin/usermod -g oinstall -G asmadmin,asmdba,asmoper,dba grid

Verify once :

4. Install ASMLib RPM


cd /stage_software/rpm/
rpm -ivh ksh-20120801-139.0.1.el7.src.rpm
rpm -ivh oracleasm-support-2.1.11-2.el7.x86_64.rpm
rpm -ivh oracleasmlib-2.0.12-1.el7.x86_64.rpm
5. Configure kernel parameters , security limits

We can provision using preinstall rpm

[root@rac1 ~]# cd /stage_software/rpm/

[root@rac1 rpm]# rpm -ivh oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm

6. Configure ASM Lib

[root@rac1 ~]# /usr/sbin/oracleasm configure -i


Configuring the Oracle ASM library driver.

This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting <ENTER> without typing an
answer will keep that current value. Ctrl-C will abort.

Default user to own the driver interface []: grid


Default group to own the driver interface []: asmadmin
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done

[root@rac1 ~]# /usr/sbin/oracleasm init


Creating /dev/oracleasm mount point: /dev/oracleasm
Loading module "oracleasm": oracleasm
Configuring "oracleasm" to use device physical block size
Mounting ASMlib driver filesystem: /dev/oracleasm
[root@rac1 ~]#

[root@rac1 ~]# /usr/sbin/oracleasm status


Checking if ASM is loaded: yes
Checking if /dev/oracleasm is mounted: yes

7. Provision raw disk by doing partiton to existing disk or by adding virtual disk

Create Required partitions eg below

[root@rac1 ~]# fdisk /dev/sda


Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Command (m for help): p

Disk /dev/sda: 214.7 GB, 214748364800 bytes, 419430400 sectors


Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000aa65b

Device Boot Start End Blocks Id System


/dev/sda1 2048 61442047 30720000 83 Linux
/dev/sda2 61442048 122882047 30720000 83 Linux
/dev/sda3 * 122882048 163842047 20480000 83 Linux
/dev/sda4 163842048 419430399 127794176 5 Extended
/dev/sda5 163844096 204804095 20480000 83 Linux
/dev/sda6 204806144 217094143 6144000 82 Linux swap / Solaris
/dev/sda7 217096192 229384191 6144000 83 Linux
/dev/sda8 229386240 249866239 10240000 83 Linux

Command (m for help): n


All primary partitions are in use
Adding logical partition 9
First sector (249868288-419430399, default 249868288):
Using default value 249868288
Last sector, +sectors or +size{K,M,G} (249868288-419430399, default 419430399): +10G
Partition 9 of type Linux and of size 10 GiB is set

Command (m for help): p

Disk /dev/sda: 214.7 GB, 214748364800 bytes, 419430400 sectors


Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000aa65b

Device Boot Start End Blocks Id System


/dev/sda1 2048 61442047 30720000 83 Linux

/dev/sda2 61442048 122882047 30720000 83 Linux

/dev/sda3 * 122882048 163842047 20480000 83 Linux

/dev/sda4 163842048 419430399 127794176 5 Extended

/dev/sda5 163844096 204804095 20480000 83 Linux

/dev/sda6 204806144 217094143 6144000 82 Linux swap / Solaris

/dev/sda7 217096192 229384191 6144000 83 Linux

/dev/sda8 229386240 249866239 10240000 83 Linux

/dev/sda9 249868288 270839807 10485760 83 Linux

Command (m for help): wq

The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.

The kernel still uses the old table. The new table will be used at

the next reboot or after you run partprobe(8) or kpartx(8)

Syncing disks.

Run partprobe after required partitions are created

#partprobe

8. Create ASM disks using oracleasm


Here I have created /dev/sda9 /dev/sda10 /dev/sda11 partitions from /dev/sda
So we will use them for creating asm disks using oracleasm
9. Download the GRID and RDBMS Zip files

https://www.oracle.com/database/technologies/oracle19c-linux-downloads.html

LINUX.X64_193000_db_home.zip

LINUX.X64_193000_grid_home.zip

10. Copy these files to linux using winscp under /stage_software

11. Create GRID HOME, Inventory Location

mkdir -p /u002/app/oracle/product/19.3.0/grid
mkdir -p /u002/app/gridbase
mkdir -p /u002/app/oraInventory

chown -R grid:oinstall /u002/app/oracle/product/19.3.0/grid


chown -R grid:oinstall /u002/app/gridbase
chown -R grid:oinstall /u002/app/oraInventory

12. Unzip GRID software to GRID HOME Path


cd /stage_software
unzip LINUX.X64_193000_grid_home.zip -d /u002/app/oracle/product/19.3.0/grid

13. Invoke gridsetup.sh from GRID HOME now


Run the given scripts as a root user
[root@rac1 ~]# /u002/app/oraInventory/orainstRoot.sh
Changing permissions of /u002/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u002/app/oraInventory to oinstall.


The execution of the script is complete.

[root@rac1 ~]# /u002/app/oracle/product/19.3.0/grid/root.sh


Performing root user operation.

The following environment variables are set as:


ORACLE_OWNER= grid
ORACLE_HOME= /u002/app/oracle/product/19.3.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:


Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file:
/u002/app/oracle/product/19.3.0/grid/crs/install/crsconfig_params
The log of current session can be found at:
/u002/app/grid_base/crsdata/rac1/crsconfig/roothas_2020-07-26_01-13-47AM.log
2020/07/26 01:13:53 CLSRSC-363: User ignored prerequisites during installation
LOCAL ADD MODE
Creating OCR keys for user 'grid', privgrp 'oinstall'..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4664: Node rac1 successfully pinned.
2020/07/26 01:14:03 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'

rac1 2020/07/26 01:16:26


/u002/app/grid_base/crsdata/rac1/olr/backup_20200726_011626.olr 724960844
2020/07/26 01:16:28 CLSRSC-327: Successfully configured Oracle Restart for a standalone
server
Wait for the completion
So now we have successfully installed GRID , We have one diskgroup called as oradata
created as well . we can add disk to this or we can create new diskgroup using asmca or
sqlplus

RDBMS
Next is to Install RDBMS Software 19c

1. Unzip RDBMS software to ORACLE HOME Path

su - oracle

[oracle@rac1]$ mkdir -p /u008/app/oracle/product/19.3.0/dbhome_1

[oracle@rac1]$ unzip LINUX.X64_193000_db_home.zip -d


/u008/app/oracle/product/19.3.0/dbhome_1

2. Invoke runInstaller from RDBMS HOME Patch , where we have unzipped it


So now we have successfully installed RDBMS software
Next is create database using dbca
While selecting storage option we will select ASM diskgroup
Once the DB is crated successfully we can verify the details

[oracle@rac1 ~]$ srvctl status database -d PROD


Database is running.
[oracle@rac1 ~]$
[oracle@rac1 ~]$
[oracle@rac1 ~]$
[oracle@rac1 ~]$ srvctl status database -d PROD -v -f
Database PROD is running. Instance status: Open.
[oracle@rac1 ~]$
[oracle@rac1 ~]$ srvctl config database -d PROD
Database unique name: PROD
Database name: PROD
Oracle home: /u008/app/oracle/product/19.3.0/dbhome_1
Oracle user: oracle
Spfile: +ORADATA/PROD/PARAMETERFILE/spfile.266.1046782585
Password file:
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Disk Groups: ORADATA,ORAFRA
Services:
OSDBA group:
OSOPER group:
Database instance: PROD
[oracle@rac1 ~]$

You might also like