Tuesday, September 17, 2013

Creating fdisk partition - Through script

fdisk command operation can be done through script (or) in a command line method. fdisk accepts commands through stdin. Below appropriate command can used with fdisk
  • fdisk to clear a partition (if exists) and create a new partition which is entire disk 
                  (echo o; echo n; echo p; echo 1; echo ; echo; echo w) | fdisk
  • fdisk to create a partition of 200MB size
                  (echo n; echo p; echo 1; echo 1; echo 200; echo w) | fdisk /dev/sdc

Saturday, September 14, 2013

Sequence of Red Hat Cluster Services to be stopped during maintenance

Consider you have 2 node Red Hat cluster server with an an Oracle RAC DB whose storage /u02 is mounted in a GFS2 filesystem.When you wanted to do patching in one of the node in the cluster you normally follow the below sequence steps:
  • Take backup of DB.
Activity in Node1
  • Note down the pmon process "ps -aef | grep pmon".
  • Stop the DB instances.
  • Stop the crs service (ie., ASM pmon) as root user.
  • Stop the GFS2 service "/etc/init.d/gfs2 stop"
  • Stop the Cluster Resource Manager service "/etc/init.d/rgmanager stop"
  • Stop the Cluster Volume Manager service "/etc/init.d/clvmd stop"
  • Stop the Cluster manager service "/etc/init.d/cman stop"
  • Now node1  has been separated from Red Hat and Oracle DB cluster.
  • Patch the node1 server and reboot.
Follow similar steps as above in Node2, once the Node1 DB connectivity is up and running.