I. As RDBMS and GI/ASM user: 1) Shutdown all Databases (as RDBMS user) utilizing the ASM instance(s) Identify the database need to be shutdown that is clients of ASM instance. SELECT instance_name, db_name FROM v$asm_client WHERE status = 'CONNECTED';
AS oracle User # sudo su - oracle # export ORACLE_SID=gridrep # sqlplus / as sysdba SQL> shutdown immdediate; 2) Shutdown all ASM instance(s) AS ASM User # sudo su - grid #export ORACLE_SID= +ASM # sqlplus / as sysdba SQL> shutdown immdediate;
I am doing this in OMS so stopping Agent and OMS: Stop Agent: ORACLE_CONFIG_HOME=/opt/oracle/Middleware/gc_inst/em/EMGC_OMS1 ORACLE_BASE=/opt/oracle ORACLE_HOME=/opt/oracle/Middleware/agent/agent_inst PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/oracle/bin export ORACLE_BASE ORACLE_HOME ORACLE_CONFIG_DIR PATH emctl stop agent Stop OMS: ORACLE_CONFIG_HOME=/opt/oracle/Middleware/gc_inst/em/EMGC_OMS1 ORACLE_BASE=/opt/oracle ORACLE_HOME=/opt/oracle/Middleware/oms PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/oracle/bin export ORACLE_BASE ORACLE_HOME ORACLE_CONFIG_DIR PATH emctl stop oms II. As root user:# /etc/init.d/oracleasm listdisks GRIDREP_0001 # ls -l /dev/oracleasm/disks/ total 0 brw-rw---- 1 grid asmadmin 105, 1 Jan 22 16:18 GRIDREP_0001 # for i in `/etc/init.d/oracleasm listdisks`
do ASM disk "GRIDREP_0001" based on /dev/ [105 1] Make a reference note of the ASM disk above which will be useful later for double check everything.
2) Make a backup copy of the file, /etc/sysconfig/oracleasm a. # ls -la /etc/sysconfig/oracleasm lrwxrwxrwx 1 root root 24 Mar 8 2012 /etc/sysconfig/oracleasm -> oracleasm-_dev_oracleasm b. # cp /etc/sysconfig/oracleasm-_dev_oracleasm /etc/sysconfig/oracleasm-_dev_oracleasm.orig 3) Shutdown all services: # /opt/grid/product/11.2.0.3/bin/crs_stat -t Name Type Target State Host ------------------------------------------------------------ ora.DATA.dg ora....up.type ONLINE ONLINE dbms2 ora....ER.lsnr ora....er.type ONLINE ONLINE dbms2 ora.asm ora.asm.type ONLINE ONLINE dbms2 ora.cssd ora.cssd.type ONLINE ONLINE dbms2 ora.diskmon ora....on.type OFFLINE OFFLINE ora.evmd ora.evm.type ONLINE ONLINE dbms2 ora.gridrep.db ora....se.type ONLINE ONLINE dbms2 ora.ons ora.ons.type OFFLINE OFFLINE
# /opt/grid/product/11.2.0.3/bin/crsctl stop resource -all 4) As root user:a) Stop HAS: # /opt/grid/product/11.2.0.3/bin/crsctl stop has b) Check HA to ensure it is down: #/opt/grid/product/11.2.0.3/bin/crsctl check has c) Disable HA for auto startup: #/opt/grid/product/11.2.0.3/bin/crsctl disable has d) Check /etc/inittab and comment out respawn of ohasd. 1.
# vi /etc/inittab e) Stop CRS: #/opt/grid/product/11.2.0.3/bin/crsctl stop crs f) Check CSS and CRS to ensure it is down: #/opt/grid/product/11.2.0.3/bin/crsctl check css III. Stop oracleasm (as root) 1) Stop oracleasm: a) # /etc/init.d/oracleasm stop 2) Disable oracleasm for not starting on reboot: # /etc/init.d/oracleasm disable IV. Upgrade OS Kernel (System Administrator will do this.): 1) Verify the new kernel version: The kernel module "oracleasm" is required to be an exact match to the running kernel version in order for ASMLib to operate. 2) Deinstall existing oracleasm driver packages (optional). 3) Download the correct ASMLib drivers and Install Oracle Enterprise Linux users of ASMLib should download the same product version for the new, upgrade kernel using up2date/ULN (http://linux.oracle.com) only. For steps to upgrade OS Linux Karnel, please check Doc ID 842775.1 Red Hat Enterprise Linux users ASMLib should download the same product version for the new, upgrade kernel from OSS and OTN i.e.: http://www.oracle.com/technetwork/server-storage/linux/downloads/index-088143.html You can use following commands to install drivers. To use the up2date you should register the system in the Unbreakable Linux Network if you have not registered then download the RPM's from above link and install using rpm -ivh # up2date -i oracleasm-support oracleasmlib oracleasm-`uname -r`
# rpm -qa | grep
oracleasm
Now the kernel and the ASMLib should have same version 5) Check the newly installed ASM Driver # ls -l /lib/modules/$(uname -r)/kernel/drivers/addon/oracleasm total 120 -rw-r--r-- 1 root root 116168 Jan 10 2015 oracleasm.ko V. Reboot server to test and verify the new kernel (System Administrator will do this.): Note:
To ensure complete and proper system initialization, revert any temporary file
modifications previously implemented, such as /boot/grub/grub.conf,
/etc/inittab, /etc/fstab. Where necessary, reboot the system again to verify
proper and expected on-boot load of all intended drivers. 1) The package versions should match. Run the following command after booting to verify that the oracleasm kernel module matches and will load correctly: # rpm -q oracleasm-`uname -r`
VI. Setup oracleasm (as root): 1) Configure oracleasm # /etc/init.d/oracleasm
configure
2) Verify oracleasm is installed (run on each node, if RAC): #
/etc/init.d/oracleasm status
3) Scan ASM disks: # /etc/init.d/oracleasm
scandisks
4) List ASM disks: # /etc/init.d/oracleasm
listdisks
# ls -l /dev/oracleasm/disks/ total 0 brw-rw---- 1 grid asmadmin 105, 1 Jan 22 16:18 GRIDREP_0001
5) Check the ASM device IDs: for i in `/etc/init.d/oracleasm listdisks` ASM disk "GRIDREP_0001" based on /dev/ [105 1]
6) Check the file, /etc/sysconfig/oracleasm: # cat /etc/sysconfig/oracleasm
VII. At this point, Oracle recommends running the "$ORACLE_HOME/bin/relink all" command for the Oracle binaries: NOTE: Ideally, updated libraries also would work
fine with Oracle binaries as OS vendors maintain backward compatibility...but
it wouldn't hurt to relink...it also checks missing RPMs. VIII. Enable all previously disabled services (as root): 1) Enable HA for auto startup: # /opt/grid/product/11.2.0.3/bin/crsctl enable has
1. # vi
/etc/inittab and then run "init q" as the the root user X. Reboot server to test and verify ASM disks: a) # rpm
-qa | grep oracleasm d) for i in `/etc/init.d/oracleasm listdisks` ASM disk "GRIDREP_0001" based on /dev/ [105 1]
XI. Verify all ASM disks mounted (as ASM user): SELECT NAME, DISK_NUMBER, MODE_STATUS, STATE, MOUNT_STATUS, HEADER_STATUS,PATH from v$asm_disk;
|