ASM_11g.pdf
Short Description
k...
Description
Oracle 11g ASM
ORACLE 11g AUTOMATIC STORAGE MANAGEMENT
NAME PLATFORM VERSION DATE
: : : :
SURESH.V ORACLE ENTERPRISE LINUX 4.0 - 64Bit 11.1.0.6.0 27.07.2010
1
ORAFACT
Oracle 11g ASM
Table of Contents 1. Oracle 11g Automatic Storage Management.........................................................................................3 1.1 Server Configuration ......................................................................................................................3 1.2 Pre-Requisite Tasks.........................................................................................................................3 1.3 Creating Necessary Directories.......................................................................................................5 1.4 Setting Environment Variables........................................................................................................5 1.5 Oracle Software Installation............................................................................................................6 1.6 Preparing ASM Disks......................................................................................................................9 1.7 Installing ASM and Database Instance..........................................................................................13
2
ORAFACT
Oracle 11g ASM
1. Oracle 11g Automatic Storage Management 1.1 Server Configuration Operating System Server Name Oracle Software IP Address
: : : :
Oracle Enterprise Linux 4.0 - 64Bit of81.orafact.com 11g R1 ( 11.1.0.6.0 ) 192.168.1.81
1.2 Pre-Requisite Tasks Edit host file with IP, hostname and Domainname [root@of81 ~]# vi /etc/hosts # Do not remove the following line, or various programs # that require network functionality will fail. 192.168.1.81 of81 of81.orafact.com 127.0.0.1 localhost.localdomain localhost Set Kernel Parameters in /etc/sysctl.conf file [root@of81 ~]# vi /etc/sysctl.conf kernel.shmall = 2097152 kernel.shmmax = 1024000000 kernel.shmmni = 4096 # semaphores: semmsl, semmns, semopm, semmni kernel.sem = 250 32000 100 128 fs.file-max = 65536 net.ipv4.ip_local_port_range = 1024 65000 net.core.rmem_default=262144 net.core.rmem_max=262144 net.core.wmem_default=262144 net.core.wmem_max=262144 Run the command to reflect the current kernel parameters [root@of81 ~]# sysctl -p Add the following lines to the /etc/security/limits.conf file [root@of81 ~]# vi /etc/security/limits.conf * soft nproc 2047 * hard nproc 16384 * soft nofile 1024 * hard nofile 65536 Add the following line to the /etc/pam.d/login file [root@of81 ~]# vi /etc/pam.d/login session required pam_limits.so 3
ORAFACT
Oracle 11g ASM Disable secure linux by editing the /etc/selinux/config file [root@of81 ~]# vi /etc/selinux/config SELINUX=disabled Verify necessary RPM and confirm it [root@of81 ~]# rpm -qa setarch setarch-1.6-1 [root@of81 ~]# rpm -qa make make-3.80-6.EL4 [root@of81 ~]# rpm -qa glibc glibc-2.3.4-2.39 [root@of81 ~]# rpm -qa openmotif openmotif-2.2.3-10.1.el4 [root@of81 ~]# rpm -qa compat-db compat-db-4.1.25-9 [root@of81 ~]# rpm -qa libaio libaio-0.3.105-2 [root@of81 ~]# rpm -qa gcc gcc-3.4.6-9.0.1 [root@of81 ~]# rpm -qa compat-gcc compat-gcc-32-3.2.3-47.3 compat-gcc-32-c++-3.2.3-47.3 [root@of81 ~]# rpm -qa compat-libstdc++ compat-libstdc++-296-2.96-132.7.2 Create Primary and secondary group and add user to that group. [root@of81 ~]# groupadd oinstall [root@of81 ~]# groupadd dba [root@of81 ~]# useradd -g oinstall -G dba -d /home/oracle oracle Set password to the user [root@of81 ~]# passwd oracle Changing password for user oracle. New UNIX password: BAD PASSWORD: it is based on a dictionary word Retype new UNIX password: passwd: all authentication tokens updated successfully.
4
ORAFACT
Oracle 11g ASM
1.3 Creating Necessary Directories Create necessary directories and Change the ownership and permissions [root@of81 ~]# mkdir -p /d01/oracle/11.1.0 [root@of81 ~]# chown -R oracle:oinstall /d01/oracle/ [root@of81 ~]# chmod 775 -R /d01/oracle/ Switch to oracle user and add the following lines at the end of the .bash_profile file [root@of81 ~]# su - oracle [oracle@of81 ~]$ vi .bash_profile if [ $USER = "oracle" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi fi
1.4 Setting Environment Variables Set Environment Variable for ASM and Database Instances [oracle@of81 ~]$ vi asm.env export ORACLE_BASE=/d01/oracle export ORACLE_HOME=$ORACLE_BASE/11.1.0/db_1 export ORACLE_SID=+ASM export PATH=$ORACLE_HOME/bin:$PATH export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib export LD_ASSUME_KERNEL=2.4.19 [oracle@of81 ~]$ vi star.env export ORACLE_BASE=/d01/oracle export ORACLE_HOME=$ORACLE_BASE/11.1.0/db_1 export ORACLE_SID=star export PATH=$ORACLE_HOME/bin:$PATH export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib export LD_ASSUME_KERNEL=2.4.19 To get GUI run the following command [root@of81 ~]# xhost + access control disabled, clients can connect from any host
5
ORAFACT
Oracle 11g ASM
1.5 Oracle Software Installation Start the Universal Installer(OUI) to install Oracle Software [oracle@of81 ~]$ cd /d01/stage/database/ [oracle@of81 database]$ ./runInstaller Select Oracle Database 11g and click Next
Specify Oracle Base & Oracle Home and click Next
6
ORAFACT
Oracle 11g ASM Prerequisite checks – make sure all are succeed and click Next
Summary window. Click Install
7
ORAFACT
Oracle 11g ASM Installation ongoing.......
Run the configuration script as root user.
8
ORAFACT
Oracle 11g ASM
After run the scripts click OK and Exit. Oracle Software Installation Completed Successfully.
1.6 Preparing ASM Disks User fdisk command to verify mounted disk [root@of81 ~]# fdisk -l Disk /dev/sda: 16.1 GB, 16106127360 bytes 255 heads, 63 sectors/track, 1958 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 13 104391 83 Linux /dev/sda2 14 274 2096482+ 82 Linux swap /dev/sda3 275 405 1052257+ 83 Linux /dev/sda4 406 1958 12474472+ 5 Extended /dev/sda5 406 1958 12474441 83 Linux Disk /dev/sdb: 21.4 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 2610 20964793+ 83 Linux
9
ORAFACT
Oracle 11g ASM Disk /dev/sdc: 3221 MB, 3221225472 bytes 255 heads, 63 sectors/track, 391 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/sdc doesn't contain a valid partition table Disk /dev/sdd: 3221 MB, 3221225472 bytes 255 heads, 63 sectors/track, 391 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/sdd doesn't contain a valid partition table Disk /dev/sde: 3221 MB, 3221225472 bytes 255 heads, 63 sectors/track, 391 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/sde doesn't contain a valid partition table Disk /dev/sdf: 3221 MB, 3221225472 bytes 255 heads, 63 sectors/track, 391 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/sdf doesn't contain a valid partition table Make the partition on available disks(/dev/sdc). [root@of81 ~]# fdisk /dev/sdc Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-391, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-391, default 391): Using default value 391 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. Follow the same steps to make partition for other disks also(/dev/sdd, /dev/sde, /dev/sdf) 10
ORAFACT
Oracle 11g ASM Verify Kernel version of OS [root@of81 ~]# uname –r 2.6.9-67.0.0.0.1.EL Verify necessary RPM's for Oracle ASM [root@of81 ~]# rpm -qa oracleasm* oracleasm-2.6.9-67.0.0.0.1.ELlargesmp-2.0.3-2 oracleasm-2.6.9-67.0.0.0.1.ELsmp-2.0.3-2 oracleasm-2.6.9-67.0.0.0.1.ELxenU-2.0.3-2 oracleasm-2.6.9-67.0.0.0.1.EL-2.0.3-2 oracleasm-support-2.0.3-2 Install nessary RPM for Oracle ASM [root@of81 ~]# cd /d01/stage/ [root@of81 stage]# rpm -ivh oracleasmlib-2.0.2-1.x86_64.rpm Preparing... ######################################### [100%] 1:oracleasmlib #################################### [100%] Configure ASM kernel using oracleasm Utility [root@of81 ~]# /etc/init.d/oracleasm configure 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 without typing an answer will keep that current value. Ctrl-C will abort. Default user to own the driver interface []: oracle Default group to own the driver interface []: oinstall Start Oracle ASM library driver on boot (y/n) [n]: y Fix permissions of Oracle ASM disks on boot (y/n) [y]: y Writing Oracle ASM library driver configuration: [ OK ] Loading module "oracleasm": [ OK ] Mounting ASMlib driver filesystem: [ OK ] Scanning system for ASM disks: [ OK ] Verify all disks and partitions [root@of81 ~]#fdisk -l Disk /dev/sdc: 3221 MB, 3221225472 bytes 255 heads, 63 sectors/track, 391 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdc1 1 391 3140676 83 Linux
11
ORAFACT
Oracle 11g ASM Disk /dev/sdd: 3221 MB, 3221225472 bytes 255 heads, 63 sectors/track, 391 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdd1 1 391 3140676 83 Linux Disk /dev/sde: 3221 MB, 3221225472 bytes 255 heads, 63 sectors/track, 391 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sde1 1 391 3140676 83 Linux Disk /dev/sdf: 3221 MB, 3221225472 bytes 255 heads, 63 sectors/track, 391 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdf1 1 391 3140676 83 Linux Label the created partitions as ASM Disks(/dev/sdc1, /dev/sdd1, /dev/sde1) [root@of81 ~]# /etc/init.d/oracleasm createdisk DISK1 /dev/sdc1 Marking disk "/dev/sdc1" as an ASM disk: [ OK ] [root@of81 ~]# /etc/init.d/oracleasm createdisk DISK2 /dev/sdd1 Marking disk "/dev/sdd1" as an ASM disk: [ OK ] [root@of81 ~]# /etc/init.d/oracleasm createdisk DISK3 /dev/sde1 Marking disk "/dev/sde1" as an ASM disk: [ OK ] [root@of81 ~]# /etc/init.d/oracleasm createdisk DISK4 /dev/sdf1 Marking disk "/dev/sdf1" as an ASM disk: [ OK ] Verify the labeled partitions [root@of81 ~]# /etc/init.d/oracleasm scandisks Scanning system for ASM disks:
[ OK ]
[root@of81 ~]# /etc/init.d/oracleasm listdisks DISK1 DISK2 DISK3 DISK4
12
ORAFACT
Oracle 11g ASM
1.7 Installing ASM and Database Instance Set ASM Environment Variables, Start Listener Service and Use DBCA to create [oracle@of81 ~]$ lsnrctl start [oracle@of81 ~]$ dbca Welcome window. Click Next
Select the Create Database and click Next
13
ORAFACT
Oracle 11g ASM
Select General Purpose or Transaction Processing and Click Next
Set Global Database name and SID and Click Next
14
ORAFACT
Oracle 11g ASM Select the Management option and Click Next
Set Password for the database and Click Next
15
ORAFACT
Oracle 11g ASM
Select Automatic Store Management and Click Next
Reset Cluster Synchronization Service (CSS) [root@of81 ]# /d01/oracle/11.1.0/db_1/bin/localconfig reset Successfully accumulated necessary OCR keys. Creating OCR keys for user 'root', privgrp 'root'.. Operation successful. Configuration for local CSS has been initialized Stale CSS daemon is running... killing it now Cleaning up Network socket directories Setting up Network socket directories Adding to inittab Startup will be queued to init within 30 seconds. Checking the status of new Oracle init process... Expecting the CRS daemons to be up within 600 seconds. Cluster Synchronization Services is active on these nodes. of81 Cluster Synchronization Services is active on all the nodes. Oracle CSS service is installed and running under init(1M)
16
ORAFACT
Oracle 11g ASM
ASM instance is not running currently. Click YES to recreate the ASM instance
Enter a password for the ASM instance and then click Next.
17
ORAFACT
Oracle 11g ASM
Click OK to create and Start the ASM instance
To create disk groups click Create new
18
ORAFACT
Oracle 11g ASM
Enter Disk Group name, select Redundancy type and select disks for this disk group and Click OK
Created disk group name will be displayed. Select Disk group Click Next
ASM Instance Installation completed successfully. 19
ORAFACT
Oracle 11g ASM
Select Oracle Managed Files to create database and Click Next
Select Flash Recovery Area, Enable Archivelog and Click Next
20
ORAFACT
Oracle 11g ASM
Click Next
Select Typical Memory Allocation and Click Next
21
ORAFACT
Oracle 11g ASM
Select the security settings and Click Next
Select Enable automatic maintenance tasks and Click Next
22
ORAFACT
Oracle 11g ASM
Verify Database Storage Information and Click Next
Select Create Database option and Click Finish
23
ORAFACT
Oracle 11g ASM Click OK to confirm database installation
Database Creation Ongoing.....
24
ORAFACT
Oracle 11g ASM
Click Exit.
Database Creation completed successfully. Verify the Database SQL> select name from v$datafile; NAME -------------------------------------------------------------------------------+DG1/star/datafile/system.256.725470573 +DG1/star/datafile/sysaux.257.725470573 +DG1/star/datafile/undotbs1.258.725470575 +DG1/star/datafile/users.259.725470575 SQL> select name from v$controlfile; NAME -------------------------------------------------------------------------------+DG1/star/controlfile/current.260.725470703 +DG2/star/controlfile/current.256.725470703
******END******
25
ORAFACT
View more...
Comments