Pre & post maintenance steps for App/ DB Maintenance in cluster environment


Pre maintenance 

1. Check the cluster status
   # cmviewcl –v

  Check the package status
   # cmviewcl –v –p <package_name>   ( node01)
  Ths out put will give package status and on which node package is running and also list the alternate
 node package can run.

For e, g
# cmviewcl -v -p pkg01 ( node01 )

    PACKAGE      STATUS       STATE        AUTO_RUN     NODE        
    pkg01               up                 running       disabled             node01    

      Policy_Parameters:
      POLICY_NAME     CONFIGURED_VALUE
      Failover        configured_node
      Failback        manual

      Script_Parameters:
      ITEM       STATUS   MAX_RESTARTS  RESTARTS   NAME
      Subnet     up                                10.35.73.0

      Node_Switching_Parameters:
      NODE_TYPE    STATUS       SWITCHING    NAME                      
      Primary      up           enabled      node01     (current)   
      Alternate    up           enabled      node02             

Looks for current in the NAME option that is considered to be primary node.
In the above package pkg01, the primary node is node01 and Alternate node is node02

2.display the mounted file system
#bdf  |grep /dev/ vg01_clutervg (cluster vg)

Collect all the  mounted File Systems  and its mount points in a  TEXT  file for the associated  package , here node01 ;This text file will be used for mounting and unmounting  the file systems asmay be needed by DBA.

3. Halt the package.
# cmhaltpkg –v  <package_name> node01
# cmhaltpkg –v node_02

Monitor the package log file:
# tail –f /etc/cmcluster/<OC pkg Name>/<Oc Pkg Name>.cntl.log

When package hs been successfully started, verify it:
#cmviewcl –v –p <OC Pkg Name>

4. Change Volume Group to Exclusive Mode:   #### This is to write into the disks
# vgchange –a e /dev/<vgname> (/dev/vg01_clutervg)

5.Mount the filesystesm
# mount /dev/vgname/lvol1   /mountpint

Detail list of mountpoints Information can be found on the MCSG control script    
Cat /etc/cmcluster/<pkgname>/<pkgname>.ctrl
OR  Use the Text file created  earlier in step # 3.

6. Verify all the file system has been mounted
   #bdf
=============================================================

Now we can ask DB/ app team to start the maintenance

=============================================================
Once activity done by DB team

Post maintenance

1. Unmount filesystesm
    # umount /mountpoint

Information can be found on the MCSG control script
/etc/cmcluster/<pkgname>/<pkgname>.ctrl

# bdf  /dev/vg01_clutervg*      #### Just to make sure that the file system is not being mounted.


#### Deactive the vg02_clustervg ######
# vgchange –a n /dev/vg01_s1

2. Start the package on the node

Start package when ready:

#cmrunpkg  <Package> <Node Name>

EX : cmrunpkg –v –n node02 node01

Monitor the package log file:
# tail –f /etc/cmcluster/<OC pkg Name>/<Oc Pkg Name>.cntl.log

# cmmodpkg  -v –e node01     #### To enable the package in auto enable mode

Monitor the package log file:
# tail –f /etc/cmcluster/<OC pkg Name>/<Oc Pkg Name>.cntl.log

When package hs been successfully started, verify it:
#cmviewcl –v –p <OC Pkg Name>

0 comments:

Post a Comment

Blogger Tips and TricksLatest Tips And TricksBlogger Tricks