How To:Setup Oracle ASM 11gR2 on Oracle Enterprise Linux
---------------------------------------------------------
Software Used
---------------
Vmware
Oracle Enterprise Linux:
Oracle Database 11g Release2(11.2.0.4.0) For Linux x86-64
Oracle Grid Infracture 11g Release 2(11.2.0.4.0) for Linux x86-64
What Will We do?
---------------
Setup Oracle grid Infracture for standalone "ASM" -Under User grid
Setup Oracle Database -Under User oracle
Packages
----------
We will need to install Prerequisites packages for oracle database -Under User root
We will need to install Prerequisites packages for ASM for Oracle Linux 6 -Under User root
get them from:
http://www.oracle.com/technetwork/server-storage/linux/downloads
You have to choose the right rpm for your kernel
--Check your Kernel
uname -rm
Asm Packages
------------
--oracleasm-support
--oracleasm
--oracleasmlib
rpm -ivh "package name"
--Create groups for database
groupadd dba
groupadd oinstall
groupadd oper
------
--Create groups for ASM
groupadd asmadmin
groupadd asmdba
groupadd asmoper
--Create Users
useradd -g oinstall -G dba,oper,asmdba -d /home/oracle oracle --Oracle User
useradd -g oinstall -G dba,asmadmin,asmdba,asmoper -d /home/grid grid --Grid User
--Set passwords for users created above
passwd oracle
passwd grid
--Make directory structures for database and grid infracture installation
mkdir -p /u01/app/oracle/product/11.2.0/db_home1
mkdir -p /u01/app/grid/product/11.2.0/grid
--Change ownership for /u01 mount point to oracle and grid for installation
chown -R oracle:oinstall /u01
chown -R grid:oinstall /u01/app/grid/product/11.2.0/grid
--Change permision to /u01 to read,write,execute
chmod -R 775 /u01
--Set profile in .bash_profile from oracle user
export ORACLE_SID=ORCL
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/11.2.0/db_home1
export PATH=$ORACLE_HOME/bin:$PATH
--Set profile in .bash_profile from grid user
export ORACLE_SID=+ASM
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/grid/product/11.2.0/grid
export PATH=$ORACLE_HOME/bin:$PATH
--Create Linux Hard disk using VMware "Adding 3 Hard Disk minimum of 5 GB"
--To avoid rebooting the machine to mount the new Hard disks
echo "- - -" > /sys/class/scsi_host/host0/scan
echo "- - -" > /sys/class/scsi_host/host1/scan
echo "- - -" > /sys/class/scsi_host/host2/scan
echo "- - -" > /sys/class/scsi_host/host3/scan
--If still not dected reboot the server
--List the new Hard diske
fdisk -l
Disk /dev/sdb: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc9c7323b
Disk /dev/sdc: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xdac64d98
--Partition the newly added disk to primary partitions
fdisk /dev/sdb
fdisk /dev/sdc
fdisk /dev/sdd
--List the partitioned disks
fdisk -l
--Change the ownership to user grid on the partitioned disks
chown grid:asmadmin /dev/sdb1
chown grid:asmadmin /dev/sdc1
chown grid:asmadmin /dev/sdd1
--Change the permissions on the partitioned disks
chmod 660 /dev/sdb1
chmod 660 /dev/sdc1
chmod 660 /dev/sdd1
--Configure ASM and Create ASM Disks
--Configure
ll /dev/sd*
/etc/init.d/oracleasm configure
/etc/init.d/oracleasm scandisks
/etc/init.d/oracleasm listdisks
/etc/init.d/oracleasm status
Usage: /etc/init.d/oracleasm {start|stop|restart|enable|disable|configure|createdisk|deletedisk|querydisk|listdisks|scandisks|status}
--Create ASM Disk from the partioned disks
/etc/init.d/oracleasm createdisk VOL1 /dev/sdb1
/etc/init.d/oracleasm createdisk VOL2 /dev/sdc1
/etc/init.d/oracleasm createdisk VOL3 /dev/sdd1
---Check once the disks are created
[grid@oracle1 grid]$ ls -lrt /dev/oracleasm/disks/*
brw-rw----. 1 grid asmadmin 8, 17 Jan 19 18:59 /dev/oracleasm/disks/VOL1
brw-rw----. 1 grid asmadmin 8, 33 Jan 19 18:59 /dev/oracleasm/disks/VOL2
brw-rw----. 1 grid asmadmin 8, 49 Jan 19 19:00 /dev/oracleasm/disks/VOL3
============================================================================================================================
Display issue:
--------------
1> execute runinstaller and select no
2>new terminal type xhost+
3>new terminal execute runinstaller again
--> If still error make the below entry in hosts file with the servername
Server name:oracle1
[root@oracle1 ~]# cat /etc/hosts
127.0.0.1 oracle1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 oracle1 localhost localhost.localdomain localhost6 localhost6.localdomain6
=================================================================================================================================
---------------------------------------------------------
Software Used
---------------
Vmware
Oracle Enterprise Linux:
Oracle Database 11g Release2(11.2.0.4.0) For Linux x86-64
Oracle Grid Infracture 11g Release 2(11.2.0.4.0) for Linux x86-64
What Will We do?
---------------
Setup Oracle grid Infracture for standalone "ASM" -Under User grid
Setup Oracle Database -Under User oracle
Packages
----------
We will need to install Prerequisites packages for oracle database -Under User root
We will need to install Prerequisites packages for ASM for Oracle Linux 6 -Under User root
get them from:
http://www.oracle.com/technetwork/server-storage/linux/downloads
You have to choose the right rpm for your kernel
--Check your Kernel
uname -rm
Asm Packages
------------
--oracleasm-support
--oracleasm
--oracleasmlib
rpm -ivh "package name"
--Create groups for database
groupadd dba
groupadd oinstall
groupadd oper
------
--Create groups for ASM
groupadd asmadmin
groupadd asmdba
groupadd asmoper
--Create Users
useradd -g oinstall -G dba,oper,asmdba -d /home/oracle oracle --Oracle User
useradd -g oinstall -G dba,asmadmin,asmdba,asmoper -d /home/grid grid --Grid User
--Set passwords for users created above
passwd oracle
passwd grid
--Make directory structures for database and grid infracture installation
mkdir -p /u01/app/oracle/product/11.2.0/db_home1
mkdir -p /u01/app/grid/product/11.2.0/grid
--Change ownership for /u01 mount point to oracle and grid for installation
chown -R oracle:oinstall /u01
chown -R grid:oinstall /u01/app/grid/product/11.2.0/grid
--Change permision to /u01 to read,write,execute
chmod -R 775 /u01
--Set profile in .bash_profile from oracle user
export ORACLE_SID=ORCL
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/11.2.0/db_home1
export PATH=$ORACLE_HOME/bin:$PATH
--Set profile in .bash_profile from grid user
export ORACLE_SID=+ASM
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/grid/product/11.2.0/grid
export PATH=$ORACLE_HOME/bin:$PATH
--Create Linux Hard disk using VMware "Adding 3 Hard Disk minimum of 5 GB"
--To avoid rebooting the machine to mount the new Hard disks
echo "- - -" > /sys/class/scsi_host/host0/scan
echo "- - -" > /sys/class/scsi_host/host1/scan
echo "- - -" > /sys/class/scsi_host/host2/scan
echo "- - -" > /sys/class/scsi_host/host3/scan
--If still not dected reboot the server
--List the new Hard diske
fdisk -l
Disk /dev/sdb: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc9c7323b
Disk /dev/sdc: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xdac64d98
--Partition the newly added disk to primary partitions
fdisk /dev/sdb
fdisk /dev/sdc
fdisk /dev/sdd
--List the partitioned disks
fdisk -l
--Change the ownership to user grid on the partitioned disks
chown grid:asmadmin /dev/sdb1
chown grid:asmadmin /dev/sdc1
chown grid:asmadmin /dev/sdd1
--Change the permissions on the partitioned disks
chmod 660 /dev/sdb1
chmod 660 /dev/sdc1
chmod 660 /dev/sdd1
--Configure ASM and Create ASM Disks
--Configure
ll /dev/sd*
/etc/init.d/oracleasm configure
/etc/init.d/oracleasm scandisks
/etc/init.d/oracleasm listdisks
/etc/init.d/oracleasm status
Usage: /etc/init.d/oracleasm {start|stop|restart|enable|disable|configure|createdisk|deletedisk|querydisk|listdisks|scandisks|status}
--Create ASM Disk from the partioned disks
/etc/init.d/oracleasm createdisk VOL1 /dev/sdb1
/etc/init.d/oracleasm createdisk VOL2 /dev/sdc1
/etc/init.d/oracleasm createdisk VOL3 /dev/sdd1
---Check once the disks are created
[grid@oracle1 grid]$ ls -lrt /dev/oracleasm/disks/*
brw-rw----. 1 grid asmadmin 8, 17 Jan 19 18:59 /dev/oracleasm/disks/VOL1
brw-rw----. 1 grid asmadmin 8, 33 Jan 19 18:59 /dev/oracleasm/disks/VOL2
brw-rw----. 1 grid asmadmin 8, 49 Jan 19 19:00 /dev/oracleasm/disks/VOL3
============================================================================================================================
Display issue:
--------------
1> execute runinstaller and select no
2>new terminal type xhost+
3>new terminal execute runinstaller again
--> If still error make the below entry in hosts file with the servername
Server name:oracle1
[root@oracle1 ~]# cat /etc/hosts
127.0.0.1 oracle1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 oracle1 localhost localhost.localdomain localhost6 localhost6.localdomain6
=================================================================================================================================
No comments:
Post a Comment