·
INSTANCE_TYPE - ASM
· ASM_DISKGROUP [Disk discovery path] - DATA, FRA
· ASM_DISKSTRING [String(s) that limits the set of disks that an oracle ASM instance discovers] - /dev/sdb*/
· ASM Configuration Assistant (asmca)
· ASM Command-line Utility (asmcmd)
· srvctl [Disk group management]
v
Supports 3 redundancy levels:
o Normal
- 2 way mirroring
o High - internal 3 way mirroring
o External - relies on third party mirroring like RAID
v
ASM Disks:
o Logical
volumes (LV)
o Logical units (LUN)
o Network-Attached Files (NFS)
o Allocation units (AU) of sizes - 1,2,4,8,16,32,64 M
o Each file extent is allocated to a single ASM disk
v
ASM Storage Components Hierarchy:
o +DATA/oradb/datafile/users.256.123456789
o ASM disk group
o ASM file
o ASM disk
o Allocation unit (AU)
o Physical Block
v
ASM System Privileges:
o Privilege
[SYSASM,SYSDBA,SYSOPER]
o Group [asmadmin,asmdba,asmoper]
¥
LOGIN as ROOT user
Ü
Prerequisites
yum install -y oracleasm
yum install -y kmod-oracleasm
yum install -y oracleasm-support
yum install -y kmod*
Ü
Create required groups and the grid user
groupadd -g 54327 asmdba
groupadd -g 54328 asmoper
groupadd -g 54329 asmadmin
useradd -u 54322 -g oinstall -G dba,oper,asmdba,asmoper,asmadmin
grid
passwd grid
usermod -u 54321 -g oinstall -G dba,oper,asmdba,asmoper,asmadmin
oracle
passwd oracle
Ü
Create directories for grid home, oracle home
and oracle inventory
mkdir -p /u01/app/oracle/product/19.0.0/db_home
mkdir -p /u01/app/grid/product/19.0.0/grid_home
mkdir -p /u01/app/oraInventory
Ü
Give ownership of each directory to respective
users
chown -R oracle:oinstall /u01/app/oracle
chown -R grid:oinstall /u01/app/grid
chown -R grid:oinstall /u01/app/oraInventory
chmod -R 775 /u01
¥
ASM Disk
Add & Disk Partition:
DATADISK1
DATADISK2
FRADISK1
Ü
fdisk -l [Disk check for all Disk]
Disk /dev/sdb: 32.2 GB, 32212254720 bytes, 62914560
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 /dev/sdc: 32.2 GB, 32212254720 bytes, 62914560
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 /dev/sdd: 32.2 GB, 32212254720 bytes, 62914560
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
fdisk /dev/sdb [disk portioning for individual]
fdisk /dev/sdc [disk portioning for individual]
fdisk /dev/sdd [disk portioning for individual]
Ü
Check oracleasm configure
oracleasm configure
Ü
configure oracleasm
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 []: oinstall
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
Ü
manually start oracleasm
systemctl start oracleasm
Ü
check ASM Disk list
oracleasm listdisks
--Disk group DATA [normal redundancy]
·
DATADISK1
· DATADISK2
--Disk group FRA [External Redundancy]
·
FRADISK1
Ü
Create ASM disk
[root@dbserver ~]# oracleasm createdisk DATADISK1
/dev/sdb1
Writing disk header: done
Instantiating disk: done
[root@dbserver ~]# oracleasm createdisk DATADISK2 /dev/sdc1
Writing disk header: done
Instantiating disk: done
[root@dbserver ~]# oracleasm createdisk FRA1 /dev/sdd1
Writing disk header: done
Instantiating disk: done
Ü
Check ASM Disk list
[root@dbserver ~]# oracleasm listdisks
· ASM_DISKGROUP [Disk discovery path] - DATA, FRA
· ASM_DISKSTRING [String(s) that limits the set of disks that an oracle ASM instance discovers] - /dev/sdb*/
· ASM Configuration Assistant (asmca)
· ASM Command-line Utility (asmcmd)
· srvctl [Disk group management]
o High - internal 3 way mirroring
o External - relies on third party mirroring like RAID
o Logical units (LUN)
o Network-Attached Files (NFS)
o Allocation units (AU) of sizes - 1,2,4,8,16,32,64 M
o Each file extent is allocated to a single ASM disk
o ASM disk group
o ASM file
o ASM disk
o Allocation unit (AU)
o Physical Block
o Group [asmadmin,asmdba,asmoper]
yum install -y kmod-oracleasm
yum install -y oracleasm-support
yum install -y kmod*
groupadd -g 54328 asmoper
groupadd -g 54329 asmadmin
passwd grid
passwd oracle
mkdir -p /u01/app/grid/product/19.0.0/grid_home
mkdir -p /u01/app/oraInventory
chown -R grid:oinstall /u01/app/grid
chown -R grid:oinstall /u01/app/oraInventory
DATADISK2
FRADISK1
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
fdisk /dev/sdc [disk portioning for individual]
fdisk /dev/sdd [disk portioning for individual]
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 group to own the driver interface []: oinstall
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
· DATADISK2
Writing disk header: done
Instantiating disk: done
[root@dbserver ~]# oracleasm createdisk DATADISK2 /dev/sdc1
Writing disk header: done
Instantiating disk: done
[root@dbserver ~]# oracleasm createdisk FRA1 /dev/sdd1
Writing disk header: done
Instantiating disk: done
DATADISK1
DATADISK2
FRA1
export ORACLE_HOME=/u01/app/oracle/product/19.0.0/db_home
export ORACLE_SID=maxcdb
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_HOME=/u01/app/grid/product/19.0.0/grid_home
export ORACLE_SID=+ASM
export PATH=$ORACLE_HOME/bin:$PATH
unzip LINUX.X64_193000_grid_home.zip
unzip LINUX.X64_193000_db_home.zip
· Disk group name - DATA
· Redundancy - Normal
· Change discovery path (/dev/oracleasm/disk*)
· Select two datadisk into DATA disk group
· External
v software only
v single instance database
netmgr - create listener
dbca
dbca
Tags
SCRIPT