{"id":304,"date":"2014-03-06T12:05:48","date_gmt":"2014-03-06T17:05:48","guid":{"rendered":"http:\/\/www.hpux.ws\/?p=304"},"modified":"2014-03-06T12:13:18","modified_gmt":"2014-03-06T17:13:18","slug":"serviceguard-complete-cluster-standup-long-article","status":"publish","type":"post","link":"https:\/\/www.hpux.ws\/?p=304","title":{"rendered":"Serviceguard complete cluster standup (Long article)"},"content":{"rendered":"<p>Serviceguard stand up Notes:<\/p>\n<p>Important parts of the .ascii file.<\/p>\n<p>CLUSTER_NAME prod_sgcluster<\/p>\n<p>HOSTNAME_ADDRESS_FAMILY IPV4<\/p>\n<p>FIRST_CLUSTER_LOCK_VG \/dev\/vgsgpackagename<\/p>\n<p>## Is it safer to maybe use a dedicated SG Lock disk.<\/p>\n<p>NODE_NAME sgclusternode01<\/p>\n<p>NETWORK_INTERFACE lan900<\/p>\n<p>HEARTBEAT_IP 192.168.208.209<\/p>\n<p>NETWORK_INTERFACE lan901<\/p>\n<p>HEARTBEAT_IP 10.43.128.209<\/p>\n<p># CLUSTER_LOCK_LUN<\/p>\n<p>FIRST_CLUSTER_LOCK_PV \/dev\/disk\/disk20<\/p>\n<p># Link Aggregate lan900 contains the following port(s): lan0,lan4<\/p>\n<p># Warning: There are no standby network interfaces for lan900.<\/p>\n<p># Link Aggregate lan901 contains the following port(s): lan8,lan12<\/p>\n<p># Warning: There are no standby network interfaces for lan901.<\/p>\n<p>NODE_NAME sgclusternode02<\/p>\n<p>NETWORK_INTERFACE lan900<\/p>\n<p>HEARTBEAT_IP 192.168.209.98<\/p>\n<p>NETWORK_INTERFACE lan901<\/p>\n<p>HEARTBEAT_IP 10.43.128.210<\/p>\n<p># CLUSTER_LOCK_LUN<\/p>\n<p>FIRST_CLUSTER_LOCK_PV \/dev\/disk\/disk59<\/p>\n<p>MEMBER_TIMEOUT 14000000<\/p>\n<p># Configuration\/Reconfiguration Timing Parameters (microseconds).<\/p>\n<p>AUTO_START_TIMEOUT 600000000<\/p>\n<p>NETWORK_POLLING_INTERVAL 2000000<\/p>\n<p>NETWORK_FAILURE_DETECTION INOUT<\/p>\n<p># NETWORK_AUTO_FAILBACK<\/p>\n<p># When set to YES a recovery of the primary LAN interface will cause failback<\/p>\n<p># from the standby LAN interface to the primary.<\/p>\n<p># When set to NO a recovery of the primary LAN interface will do nothing and<\/p>\n<p># the standby LAN interface will continue to be used until cmmodnet -e lanX<\/p>\n<p># is issued for the primary LAN interface.<\/p>\n<p>NETWORK_AUTO_FAILBACK YES<\/p>\n<p>SUBNET 192.168.208.0<\/p>\n<p>IP_MONITOR ON<\/p>\n<p>POLLING_TARGET 192.168.208.1<\/p>\n<p>SUBNET 192.168.0.0<\/p>\n<p>IP_MONITOR OFF<\/p>\n<p># Package Configuration Parameters.<\/p>\n<p># Enter the maximum number of packages which will be configured in the cluster.<\/p>\n<p># You can not add packages beyond this limit.<\/p>\n<p># This parameter is required.<\/p>\n<p>MAX_CONFIGURED_PACKAGES 300<\/p>\n<p>You will want to make sure both nodes of the cluster are running and the volume group that the lock disks belongs to is cluster aware.<\/p>\n<p>NOTE: When standing up a one node cluster cmquerycl will remove lock disk configuration and a lock disk is not needed for such a configuration.<\/p>\n<p>cmrunnode #on each node<\/p>\n<p>vgchange \u2013a n vgsgpackagename<\/p>\n<p>vgchange \u2013c y vgsgpackagename<\/p>\n<p>cmquerycl -v -C prod_sgcluster.ascii -n sgclusternode01 -n sgclusternode02<\/p>\n<p>cmcheckconf -v -C prod_sgcluster.ascii<\/p>\n<p>cmapplyconf -v -C prod_sgcluster.ascii<\/p>\n<p>Cluster should look roughly like this:<\/p>\n<p>root@sgclusternode02:\/root&gt; cmviewcl<\/p>\n<p>CLUSTER STATUS<\/p>\n<p>prod_sgcluster up<\/p>\n<p>NODE STATUS STATE<\/p>\n<p>sgclusternode01 up running<\/p>\n<p>sgclusternode02 up running<\/p>\n<p>PACKAGE STATUS STATE AUTO_RUN NODE<\/p>\n<p>root@sgclusternode02:\/root&gt;<\/p>\n<p>Standing up your first package.<\/p>\n<p>Scenario assumes you are standing up a package named sgpackagename.<\/p>\n<p>mkdir \u2013p \/etc\/cmcluster\/packages\/sgpackagename<\/p>\n<p>cd \/etc\/cmcluster\/packages\/sgpackagename<\/p>\n<p>Using your method of choice, copy in a package conference file and a task0 (external script to start Oracle. Choose your clone source carefully. Make sure you choose a working package to template. If you are standing up an SAP instance choose an SAP package to clone, sgpackagename is a standard database package and a better template candidate.<\/p>\n<p>Permissions may matter:<\/p>\n<p>oot@sgclusternode02:\/etc\/cmcluster\/packages\/sgpackagename&gt; ll<\/p>\n<p>total 176<\/p>\n<p>-rw&#8212;&#8212;- 1 root sys 71668 Dec 3 16:12 sgpackagename.conf<\/p>\n<p>-r-x&#8212;&#8212; 1 root sys 11005 Dec 9 11:35 task0<\/p>\n<p>root@sgclusternode02:\/etc\/cmcluster\/packages\/sgpackagename&gt;<\/p>\n<p>Use the method of choice to modify your configuration files:<\/p>\n<p>Here is what needs to be changed ( In bold ):<\/p>\n<p>package_name sgpackagename<\/p>\n<p>package_description &#8220;sgpackagename Instance&#8221;<\/p>\n<p>package_type failover<\/p>\n<p>node_name sgclusternode01<\/p>\n<p>node_name sgclusternode02<\/p>\n<p>ip_subnet 192.168.208.0<\/p>\n<p>ip_address 192.168.209.48<\/p>\n<p>Change the bold values below for each file system.<\/p>\n<p>fs_name \/dev\/vgsgpackagename\/oraarch<\/p>\n<p>fs_server &#8220;&#8221;<\/p>\n<p>fs_directory \/data\/oracle\/sgpackagename\/arch<\/p>\n<p>fs_type &#8220;vxfs&#8221;<\/p>\n<p>fs_mount_opt &#8220;-o ioerror=mwdisable,largefiles,delaylog,cio&#8221;<\/p>\n<p>fs_umount_opt &#8220;&#8221;<\/p>\n<p>fs_fsck_opt &#8220;&#8221;<\/p>\n<p>The actual data may vary. The fs_mount_opt are important and may change. The parameter cio is necessary for Oracle to have asynchronous I\/O.<\/p>\n<p>external_script \/etc\/cmcluster\/packages\/sgpackagename\/task0<\/p>\n<p>Create the mount points and change permission to oracle:dba. Again there are many ways to do this, your mileage may vary. You can check return codes if you are particularly precise, echo $?<\/p>\n<p>awk &#8216;\/^fs_dir\/{print $NF}&#8217; sgpackagename.conf | while read \u2013r mp<\/p>\n<p>do<\/p>\n<p>mkdir \u2013p $mp<\/p>\n<p>ll \u2013d $mp<\/p>\n<p>chown oracle:dba $mp<\/p>\n<p>ll \u2013d $mp<\/p>\n<p>done<\/p>\n<p>Your final output from the ll \u2013d command should look this<\/p>\n<p>drwxr-xr-x 3 oracle dba 96 Dec 9 11:04 \/data\/oracle\/sgpackagename\/arch<\/p>\n<p>drwxr-xr-x 4 oracle dba 96 Dec 10 11:40 \/data\/oracle\/sgpackagename\/export<\/p>\n<p>drwxr-xr-x 3 oracle dba 96 Dec 9 11:04 \/data\/oracle\/sgpackagename\/undo1<\/p>\n<p>drwxr-xr-x 3 oracle dba 96 Dec 9 11:04 \/data\/oracle\/sgpackagename\/redo1<\/p>\n<p>drwxr-xr-x 3 oracle dba 96 Dec 9 11:04 \/data\/oracle\/sgpackagename\/redo2<\/p>\n<p>drwxr-xr-x 3 oracle dba 96 Dec 9 11:04 \/data\/oracle\/sgpackagename\/ctrl1<\/p>\n<p>drwxr-xr-x 3 oracle dba 96 Dec 9 11:04 \/data\/oracle\/sgpackagename\/ctrl2<\/p>\n<p>drwxr-xr-x 3 oracle dba 96 Dec 9 11:04 \/data\/oracle\/sgpackagename\/data1<\/p>\n<p>drwxr-xr-x 3 oracle dba 96 Dec 9 11:04 \/data\/oracle\/sgpackagename\/index1<\/p>\n<p>drwxr-xr-x 4 oracle dba 96 Dec 10 13:59 \/apps\/oracle\/sgpackagename<\/p>\n<p>drwxr-xr-x 3 oracle dba 96 Dec 9 11:04 \/data\/oracle\/sgpackagename\/system<\/p>\n<p>drwxr-xr-x 3 oracle dba 96 Dec 9 11:04 \/data\/oracle\/sgpackagename\/temp1<\/p>\n<p>drwxr-xr-x 3 oracle dba 96 Dec 9 11:04 \/data\/oracle\/sgpackagename\/users<\/p>\n<p>drwxr-xr-x 3 oracle dba 96 Dec 9 11:04 \/data\/oracle\/sgpackagename\/tools<\/p>\n<p>drwxr-xr-x 3 oracle dba 96 Dec 9 11:04 \/data\/oracle\/sgpackagename\/fra<\/p>\n<p>drwxr-xr-x 3 oracle dba 96 Dec 9 11:04 \/data\/oracle\/sgpackagename\/diag<\/p>\n<p>drwxr-xr-x 3 oracle dba 96 Dec 9 11:04 \/data\/oracle\/sgpackagename\/admin<\/p>\n<p>edit the task0 file<\/p>\n<p>function start_commmand<\/p>\n<p>su oracle -c &#8220;\/apps\/oracle\/general\/sh\/change_backup_mode.ksh sgpackagename cold end&#8221;<\/p>\n<p>Note this section is different for SAP. Change the instance name.<\/p>\n<p>function stop_command<\/p>\n<p>#### Database startup script, normally created by dba#####<\/p>\n<p><b>su oracle -c &#8220;\/apps\/oracle\/general\/sh\/change_backup_mode.ksh <\/b>sgpackagename cold begin&#8221;<\/p>\n<p>Comment out (in bold) the start\/stop code so first package run only stands up the filesystems:<\/p>\n<p>case ${1} in<\/p>\n<p>start)<\/p>\n<p># start_command $*<\/p>\n<p># exit_val=$?<\/p>\n<p>;;<\/p>\n<p>stop)<\/p>\n<p># stop_command $*<\/p>\n<p># exit_val=$?<\/p>\n<p>;;<\/p>\n<p>Detect your storage from storage system.<\/p>\n<p>ioscan \u2013fnNC disk<\/p>\n<p># detects the storage<\/p>\n<p>For this example we detected the following agile devices:<\/p>\n<p>disk59<\/p>\n<p>disk60<\/p>\n<p>disk61<\/p>\n<p>disk62<\/p>\n<p>disk63<\/p>\n<p>disk64<\/p>\n<p>disk65<\/p>\n<p>disk66<\/p>\n<p>get the EMC serial number of each of the disks and match it against the serial number list given to you by storage in the dashboard request.<\/p>\n<p>This is a bit tedious so I created a simple script for the job:<\/p>\n<p>dislev.ksh<\/p>\n<p>#!\/usr\/bin\/ksh<\/p>\n<p>args=$#<\/p>\n<p>if [ $args -ne 1 ];then echo &#8220;1 argument last part of disk ex disk60&#8221;;exit 1;fi<\/p>\n<p>dv=$1<\/p>\n<p>diskinfo \/dev\/rdisk\/${dv}<\/p>\n<p>ldev=$(\/usr\/bin\/inq -nodots -sym_wwn | grep &#8220;$dv &#8221; | grep -v rdsk |awk &#8216;{print $3}&#8217; |awk &#8216;{print substr($0,length($0) &#8211; 3,length($0))}&#8217;);<\/p>\n<p>echo &#8220;LDEV is: ${ldev}&#8221;<\/p>\n<p>root@sgclusternode02:\/root\/shuffle&gt; .\/disldev.ksh disk59<\/p>\n<p>SCSI describe of \/dev\/rdisk\/disk59:<\/p>\n<p>vendor: EMC<\/p>\n<p>product id: SYMMETRIX<\/p>\n<p>type: direct access<\/p>\n<p>size: 154176000 Kbytes<\/p>\n<p>bytes per sector: 512<\/p>\n<p>LDEV is: 4F2F<\/p>\n<p>The size is a reality check. You can also use inq utility to get the size. By using a second utility (diskinfo) this creates a natural double check. There are probably a dozen different right ways to complete this task.<\/p>\n<p>My disk list is kept for verification purposes in a text file root@sgclusternode02:\/root\/shuffle&gt; cat request.610.dlist.txt<\/p>\n<p>610 is the request from the stand up rquest.<\/p>\n<p>awk \u2018{print $NF}\u2019 request.610.dlist.txt | while read \u2013r dvn<\/p>\n<p>do<\/p>\n<p>pvcreate $dvn<\/p>\n<p>rc=$?<\/p>\n<p>echo &#8220;RC from pvcreate is ${rc}&#8221;<\/p>\n<p>done<\/p>\n<p>Create the volume group using LVM 2.2<\/p>\n<p>vgcreate \u2013V &lt;version number&gt; -s &lt;pe size&gt; -S &lt;Max size in TB&gt; &lt;volume group name&gt; &lt;disk list&gt;<\/p>\n<p>vgcreate -V 2.2 -s 32 -S 2t vgsgpackagename \/dev\/disk\/disk59 \u2026. \/dev\/disk\/disk66<\/p>\n<p>The next step is best scripted:<\/p>\n<p>&lt;command&gt; -n name \u2013L &lt;size in MB&gt; &lt;volume group name&gt;<\/p>\n<p>lvcreate -n oraadmin -L 10000 vgsgpackagename<\/p>\n<p>echo $?<\/p>\n<p>newfs -F vxfs -o largefiles \/dev\/sgpackagename\/roraadmin<\/p>\n<p>echo $?<\/p>\n<p>.. repeat for every file system defined in the storage dashboard request .. I have scripted this entire process based on dashboard input and will provide the script as an appendix.<\/p>\n<p>Volume group must be exported in preview mode:<\/p>\n<p>vgexport -v -s -p -m vgsgpackagename.map vgsgpackagename<\/p>\n<p>Use scp to copy the map file to the failover node<\/p>\n<p>On failover node:<\/p>\n<p>vgimport -v -s -N -m vgsgpackagename.map vgsgpackagename<\/p>\n<p>vgchange \u2013a y vgsgpackagename<\/p>\n<p>vgdisplay \u2013v vgsgpackagename (Look for logical volumes disks being correct)<\/p>\n<p>vgchange \u2013a n vgsgpackagename<\/p>\n<p>vgchange \u2013c y vgsgpackagename (Must be successful check return code $? )<\/p>\n<p>vgchange \u2013c n vgsgpackagename<\/p>\n<p>On primary node (either will work but being consistent is helpful).<\/p>\n<p>vgchange \u2013c y vgsgpackagename<\/p>\n<p>cd \/etc\/cmcluster\/packages\/sgpackagename<\/p>\n<p>cmcheckconf \u2013P sgpackagename.conf<\/p>\n<p>(When all cmcheckconf issues are resolved)<\/p>\n<p>cmapplyconf \u2013P sgpackagename.conf<\/p>\n<p>cmrunpckg \u2013v \u2013n &lt;node_hostname&gt; sgpackagename<\/p>\n<p>cmmodpkg \u2013e sgpackagename<\/p>\n<p>cmviewcl (Look for your package to be running)<\/p>\n<p>Error logs live: \/var\/adm\/cmcluster\/log\/&lt;packagename&gt;.log<\/p>\n<p>Setting up asynchronous I\/O<\/p>\n<p>root@sat1hcmdb090:\/root&gt; getprivgrp<\/p>\n<p>global privileges: CHOWN<\/p>\n<p>dba: MLOCK<\/p>\n<p>getprivgroup is a display command use command:<\/p>\n<p>setprivgrp dba MLOCK<\/p>\n<p>Standing up your first package:<\/p>\n<p>Make sure you are in the directory: \/etc\/cmcluster\/packages\/sgpackagename<\/p>\n<p>root@sgclusternode02:\/etc\/cmcluster\/packages\/sgpackagename&gt; cmcheckconf -P sgpackagename.conf<\/p>\n<p>cmcheckconf: Verification completed. No errors found.<\/p>\n<p>Use the cmapplyconf command to apply the configuration.<\/p>\n<p>root@sgclusternode02:\/etc\/cmcluster\/packages\/sgpackagename&gt; cmapplyconf -P sgpackagename.conf<\/p>\n<p>One or more of the specified packages are running. Any error in the<\/p>\n<p>proposed configuration change could cause these packages to fail.<\/p>\n<p>Ensure configuration changes have been tested before applying them.<\/p>\n<p>Modify the package configuration ([y]\/n)? y<\/p>\n<p>Completed the cluster update<\/p>\n<p>root@sgclusternode02:\/etc\/cmcluster\/packages\/sgpackagename&gt; cmmodpkg -e sgpackagename<\/p>\n<p>cmmodpkg: Completed successfully on all packages specified<\/p>\n<p>root@sgclusternode02:\/etc\/cmcluster\/packages\/sgpackagename&gt; cmviewcl -v<\/p>\n<p>CLUSTER STATUS<\/p>\n<p>prod_sgcluster up<\/p>\n<p>NODE STATUS STATE<\/p>\n<p>sgclusternode01 up running<\/p>\n<p>Cluster_Lock_LVM:<\/p>\n<p>VOLUME_GROUP PHYSICAL_VOLUME STATUS<\/p>\n<p>\/dev\/vgsgpackagename \/dev\/disk\/disk20 up<\/p>\n<p>Network_Parameters:<\/p>\n<p>INTERFACE STATUS PATH NAME<\/p>\n<p>PRIMARY up LinkAgg0 lan900<\/p>\n<p>PRIMARY up LinkAgg1 lan901<\/p>\n<p>NODE STATUS STATE<\/p>\n<p>sgclusternode02 up running<\/p>\n<p>Cluster_Lock_LVM:<\/p>\n<p>VOLUME_GROUP PHYSICAL_VOLUME STATUS<\/p>\n<p>\/dev\/vgsgpackagename \/dev\/disk\/disk59 up<\/p>\n<p>Network_Parameters:<\/p>\n<p>INTERFACE STATUS PATH NAME<\/p>\n<p>PRIMARY up LinkAgg0 lan900<\/p>\n<p>PRIMARY up LinkAgg1 lan901<\/p>\n<p>PACKAGE STATUS STATE AUTO_RUN NODE<\/p>\n<p>sgpackagename up running enabled sgclusternode02<\/p>\n<p>Policy_Parameters:<\/p>\n<p>POLICY_NAME CONFIGURED_VALUE<\/p>\n<p>Failover configured_node<\/p>\n<p>Failback manual<\/p>\n<p>Node_Switching_Parameters:<\/p>\n<p>NODE_TYPE STATUS SWITCHING NAME<\/p>\n<p>Primary up enabled sgclusternode01<\/p>\n<p>Alternate up enabled sgclusternode02 (current)<\/p>\n<p>Other_Attributes:<\/p>\n<p>ATTRIBUTE_NAME ATTRIBUTE_VALUE<\/p>\n<p>Style modular<\/p>\n<p>Priority no_priority<\/p>\n<p>Check that your file systems are mounted (About a dozen different ways to do this):<\/p>\n<p>root@sgclusternode02:\/etc\/cmcluster\/packages\/sgpackagename&gt; bdf | grep sgpackagename<\/p>\n<p>102400000 91742 95913999 0% \/data\/oracle\/sgpackagename\/arch<\/p>\n<p>102400000 13178819 83644864 14% \/data\/oracle\/sgpackagename\/export<\/p>\n<p>102400000 91742 95913999 0% \/data\/oracle\/sgpackagename\/undo1<\/p>\n<p>10256384 20006 9596612 0% \/data\/oracle\/sgpackagename\/redo1<\/p>\n<p>10256384 20006 9596612 0% \/data\/oracle\/sgpackagename\/redo2<\/p>\n<p>10256384 20006 9596612 0% \/data\/oracle\/sgpackagename\/ctrl1<\/p>\n<p>10256384 20006 9596612 0% \/data\/oracle\/sgpackagename\/ctrl2<\/p>\n<p>307200000 141939 287866940 0% \/data\/oracle\/sgpackagename\/data1<\/p>\n<p>204800000 116841 191890469 0% \/data\/oracle\/sgpackagename\/index1<\/p>\n<p>20480000 3972498 15475861 20% \/apps\/oracle\/sgpackagename<\/p>\n<p>10256384 20006 9596612 0% \/data\/oracle\/sgpackagename\/system<\/p>\n<p>102400000 91742 95913999 0% \/data\/oracle\/sgpackagename\/temp1<\/p>\n<p>10256384 20006 9596612 0% \/data\/oracle\/sgpackagename\/users<\/p>\n<p>10256384 20006 9596612 0% \/data\/oracle\/sgpackagename\/tools<\/p>\n<p>102400000 91742 95913999 0% \/data\/oracle\/sgpackagename\/fra<\/p>\n<p>10256384 20006 9596612 0% \/data\/oracle\/sgpackagename\/diag<\/p>\n<p>10256384 20006 9596612 0% \/data\/oracle\/sgpackagename\/admin<\/p>\n<p>root@sgclusternode02:\/etc\/cmcluster\/packages\/sgpackagename&gt; mount | grep sgpackagename<\/p>\n<p>\/data\/oracle\/sgpackagename\/arch on \/dev\/vgsgpackagename\/oraarch ioerror=mwdisable,largefiles,delaylog,cio,dev=80000002 on Mon Dec 9 11:41:17 2013<\/p>\n<p>\/data\/oracle\/sgpackagename\/export on \/dev\/vgsgpackagename\/oraexport ioerror=mwdisable,largefiles,delaylog,cio,dev=80000009 on Mon Dec 9 11:41:17 2013<\/p>\n<p>\/data\/oracle\/sgpackagename\/undo1 on \/dev\/vgsgpackagename\/oraundo1 ioerror=mwdisable,largefiles,delaylog,cio,dev=8000000c on Mon Dec 9 11:41:17 2013<\/p>\n<p>\/data\/oracle\/sgpackagename\/redo1 on \/dev\/vgsgpackagename\/oraredo1 ioerror=mwdisable,largefiles,delaylog,cio,dev=80000005 on Mon Dec 9 11:41:17 2013<\/p>\n<p>\/data\/oracle\/sgpackagename\/redo2 on \/dev\/vgsgpackagename\/oraredo2 ioerror=mwdisable,largefiles,delaylog,cio,dev=80000004 on Mon Dec 9 11:41:17 2013<\/p>\n<p>\/data\/oracle\/sgpackagename\/ctrl1 on \/dev\/vgsgpackagename\/oractrl1 ioerror=mwdisable,largefiles,delaylog,cio,dev=80000006 on Mon Dec 9 11:41:18 2013<\/p>\n<p>\/data\/oracle\/sgpackagename\/ctrl2 on \/dev\/vgsgpackagename\/oractrl2 ioerror=mwdisable,largefiles,delaylog,cio,dev=80000007 on Mon Dec 9 11:41:18 2013<\/p>\n<p>\/data\/oracle\/sgpackagename\/data1 on \/dev\/vgsgpackagename\/oradata1 ioerror=mwdisable,largefiles,delaylog,cio,dev=80000003 on Mon Dec 9 11:41:18 2013<\/p>\n<p>\/data\/oracle\/sgpackagename\/index1 on \/dev\/vgsgpackagename\/oraindex1 ioerror=mwdisable,largefiles,delaylog,cio,dev=80000008 on Mon Dec 9 11:41:18 2013<\/p>\n<p>\/apps\/oracle\/sgpackagename on \/dev\/vgsgpackagename\/orabin ioerror=mwdisable,largefiles,delaylog,nodatainlog,dev=80000001 on Mon Dec 9 11:41:18 2013<\/p>\n<p>\/data\/oracle\/sgpackagename\/system on \/dev\/vgsgpackagename\/orasystem ioerror=mwdisable,largefiles,delaylog,cio,dev=8000000a on Mon Dec 9 11:41:18 2013<\/p>\n<p>\/data\/oracle\/sgpackagename\/temp1 on \/dev\/vgsgpackagename\/oratemp1 ioerror=mwdisable,largefiles,delaylog,cio,dev=8000000b on Mon Dec 9 11:41:18 2013<\/p>\n<p>\/data\/oracle\/sgpackagename\/users on \/dev\/vgsgpackagename\/orausers ioerror=mwdisable,largefiles,delaylog,cio,dev=8000000d on Mon Dec 9 11:41:18 2013<\/p>\n<p>\/data\/oracle\/sgpackagename\/tools on \/dev\/vgsgpackagename\/oratools ioerror=mwdisable,largefiles,delaylog,cio,dev=8000000e on Mon Dec 9 11:41:19 2013<\/p>\n<p>\/data\/oracle\/sgpackagename\/fra on \/dev\/vgsgpackagename\/orafra ioerror=mwdisable,largefiles,delaylog,cio,dev=8000000f on Mon Dec 9 11:41:19 2013<\/p>\n<p>\/data\/oracle\/sgpackagename\/diag on \/dev\/vgsgpackagename\/oradiag ioerror=mwdisable,largefiles,delaylog,cio,dev=80000010 on Mon Dec 9 11:41:19 2013<\/p>\n<p>\/data\/oracle\/sgpackagename\/admin on \/dev\/vgsgpackagename\/oraadmin ioerror=mwdisable,largefiles,delaylog,cio,dev=80000011 on Mon Dec 9 11:41:19 2013<\/p>\n<p>Conduct failover test (Pre-installation)<\/p>\n<p>root@sgclusternode02:\/etc\/cmcluster\/packages\/sgpackagename&gt; cmhaltpkg -v sgpackagename<\/p>\n<p>Disabling automatic failover for failover packages to be halted.<\/p>\n<p>Halting package sgpackagename<\/p>\n<p>Successfully halted package sgpackagename<\/p>\n<p>One or more packages or package instances have been halted.<\/p>\n<p>The failover packages have AUTO_RUN disabled and no new instance can start automatically. To allow automatic start, enable AUTO_RUN via cmmodpkg -e &lt;package_name&gt;<\/p>\n<p>cmhaltpkg: Completed successfully on all packages specified<\/p>\n<p>root@sgclusternode02:\/etc\/cmcluster\/packages\/sgpackagename&gt; cmviewcl<\/p>\n<p>CLUSTER STATUS<\/p>\n<p>prod_sgcluster up<\/p>\n<p>NODE STATUS STATE<\/p>\n<p>sgclusternode01 up running<\/p>\n<p>sgclusternode02 up running<\/p>\n<p>UNOWNED_PACKAGES<\/p>\n<p>PACKAGE STATUS STATE AUTO_RUN NODE<\/p>\n<p>sgpackagename down halted disabled unowned<\/p>\n<p>root@sgclusternode02:\/etc\/cmcluster\/packages\/sgpackagename&gt; cmrunpkg -v -n sgclusternode01 sgpackagename<\/p>\n<p>Running package sgpackagename on node sgclusternode01<\/p>\n<p>Successfully started package sgpackagename on node sgclusternode01<\/p>\n<p>cmrunpkg: All specified packages are running<\/p>\n<p>root@sgclusternode02:\/etc\/cmcluster\/packages\/sgpackagename&gt; cmviewcl<\/p>\n<p>CLUSTER STATUS<\/p>\n<p>prod_sgcluster up<\/p>\n<p>NODE STATUS STATE<\/p>\n<p>sgclusternode01 up running<\/p>\n<p>PACKAGE STATUS STATE AUTO_RUN NODE<\/p>\n<p>sgpackagename up running disabled sgclusternode01<\/p>\n<p>NODE STATUS STATE<\/p>\n<p>sgclusternode02 up running<\/p>\n<p>Re run your mount test on the node the package is now running on (see above).<\/p>\n<p>You may wish to leave package failover set to disabled to avoid surprises.<\/p>\n<p>Email your DBA give them the file system(s) to do installation. Flip the database dashboard request to &#8220;Application installation &amp; configuration&#8221;<\/p>\n<p>Notify your IA\/PM via email.<\/p>\n<p>Be prepared to run root.sh when your DBA needs it run.<\/p>\n<p>Steps after DBA completion<\/p>\n<p>Modify task 0 uncomment the 4 lines of code you commented.<\/p>\n<p>case ${1} in<\/p>\n<p>start)<\/p>\n<p>start_command $*<\/p>\n<p>exit_val=$?<\/p>\n<p>;;<\/p>\n<p>stop)<\/p>\n<p>stop_command $*<\/p>\n<p>exit_val=$?<\/p>\n<p>Check your package changes:<\/p>\n<p>cmcheckconf \u2013P sgpackagename.conf<\/p>\n<p>cmapplyconf \u2013P sgpackagename.conf<\/p>\n<p>Make sure backups are configured before the next step. Also have storage test DR backup of LUNS if applicable (Model and dev usually do not have DR).<\/p>\n<p>Re-run the failover tests. Check log files:<\/p>\n<p>\/var\/adm\/cmcluster\/log\/sgpackagename.log<\/p>\n<p>Check database run status.<\/p>\n<p>ps \u2013ef | grep sgpackagename<\/p>\n<p>Lessons learned:<\/p>\n<p>\u00b7 DBA\u2019s do not necessarily understand clustering. If they say the start\/stop script works but you are getting errors in Serviceguard testing, ask them to check the return code (echo $?). Explain t the DBA that Serviceguard will not function correctly if it receives non-zero return codes.<\/p>\n<p>\u00b7 Try not to modify task0 to default to zero return codes. This defeats the purpose of Serviceguard checking return codes.<\/p>\n<p>\u00b7 Never run pvcreate \u2013f (If you feel the need, deconstruct your volume group and use pvremve)<\/p>\n<p>\u00b7 Never run cmdisklock -f reset &lt;disk device&gt;, this destroys all data on the lock disk and generally there is data on the lock disk. Note: Maybe a better design would be a dedicated lock disk.<\/p>\n<p>Appendix 1 Additional automation.<\/p>\n<p>This is optional, but making processes repeatable is important so you might like this.<\/p>\n<p>While validating the request on the storage dashboard, I noted (and slightly massaged) the data to make it machine (awk) readable. Scripts are local, I use them in \/root\/shuffle.<\/p>\n<p>root@sgclusternode02:\/root\/shuffle&gt; cat request.610.data.txt<\/p>\n<p>sgclusternode01|NEW|\/apps\/oracle\/sgpackagename | 20 GB<\/p>\n<p>sgclusternode01|NEW|\/data\/oracle\/sgpackagename\/arch | 100 GB<\/p>\n<p>sgclusternode01|NEW|\/data\/oracle\/sgpackagename\/data1 | 300 GB<\/p>\n<p>sgclusternode01|NEW|\/data\/oracle\/sgpackagename\/redo2 | 10 GB<\/p>\n<p>sgclusternode01|NEW|\/data\/oracle\/sgpackagename\/redo1 | 10 GB<\/p>\n<p>sgclusternode01|NEW|\/data\/oracle\/sgpackagename\/ctrl1 | 10 GB<\/p>\n<p>sgclusternode01|NEW|\/data\/oracle\/sgpackagename\/ctrl2 | 10 GB<\/p>\n<p>sgclusternode01|NEW|\/data\/oracle\/sgpackagename\/index1 | 200 GB<\/p>\n<p>sgclusternode01|NEW|\/data\/oracle\/sgpackagename\/export | 100 GB<\/p>\n<p>sgclusternode01|NEW|\/data\/oracle\/sgpackagename\/SYSTEM | 10 GB<\/p>\n<p>sgclusternode01|NEW|\/data\/oracle\/sgpackagename\/temp1 | 100 GB<\/p>\n<p>sgclusternode01|NEW|\/data\/oracle\/sgpackagename\/undo1 | 100 GB<\/p>\n<p>sgclusternode01|NEW|\/data\/oracle\/sgpackagename\/users | 10 GB<\/p>\n<p>sgclusternode01|NEW|\/data\/oracle\/sgpackagename\/tools | 10 GB<\/p>\n<p>sgclusternode01|NEW|\/data\/oracle\/sgpackagename\/fra | 100 GB<\/p>\n<p>sgclusternode01|NEW|\/data\/oracle\/sgpackagename\/diag | 10 GB<\/p>\n<p>sgclusternode01|NEW|\/data\/oracle\/sgpackagename\/admin | 10 GB<\/p>\n<p>The following script reads the earlier request.{request number}.dlist.txt file to get its device list, reads the data.txt file and completely automates the VG build including the map export.<\/p>\n<p>Script requires the instance name (not the vg name, it does that itself) and the request number from the dashboard. Use it or not, the choice is yours.<\/p>\n<p>#!\/usr\/bin\/ksh<\/p>\n<p>args=$#<\/p>\n<p>if [ $args -ne 2 ];then echo &#8220;2 arguments instance name and request ### required&#8221;;exit 1;fi<\/p>\n<p>inn=$1<\/p>\n<p>vgn=&#8221;vg${inn}&#8221;<\/p>\n<p>req=$2<\/p>\n<p>disklist=&#8221;request.${req}.dlist.txt&#8221;<\/p>\n<p>actonreturn()<\/p>\n<p>{<\/p>\n<p>rcc=$1<\/p>\n<p>if [ $rcc -ne 0 ];then echo &#8220;FAIL FAIL $0 FAILED&#8221;; exit 1;fi<\/p>\n<p>}<\/p>\n<p>devl=&#8221;&#8221;<\/p>\n<p># pvcreate<\/p>\n<p>awk &#8216;{ print $1 }&#8217; ${disklist} | while read -r dv<\/p>\n<p>do<\/p>\n<p>devr=&#8221;\/dev\/rdisk\/${dv}&#8221;<\/p>\n<p>echo &#8220;pvcreate ${devr}&#8221;<\/p>\n<p>pvcreate ${devr}<\/p>\n<p>rc=$?<\/p>\n<p>echo &#8220;pvcreate rc:${rc}&#8221;<\/p>\n<p>actonreturn ${rc}<\/p>\n<p>devl=&#8221;$devl \/dev\/disk\/${dv}&#8221;<\/p>\n<p>done<\/p>\n<p>#vgcreate -V 2.2 -s 32 -S 1t &lt;vg name&gt; disks in \/dev\/disk\/disk### format<\/p>\n<p>echo &#8220;vgcreate -V 2.2 -s 32 -S 1t ${vgn} ${devl}&#8221;<\/p>\n<p>vgcreate -V 2.2 -s 32 -S 2t ${vgn} ${devl}<\/p>\n<p>rc=$?<\/p>\n<p>echo &#8220;vgcreate rc:${rc}&#8221;<\/p>\n<p>actonreturn ${rc}<\/p>\n<p>infile=&#8221;request.${req}.data.txt&#8221;<\/p>\n<p>if [ -f ${infile} ]<\/p>\n<p>then<\/p>\n<p>echo &#8220;- pass &#8211; file ${infile} found&#8221;<\/p>\n<p>else<\/p>\n<p>echo &#8220;- FAIL &#8211; file ${infile} MIA&#8221;<\/p>\n<p>exit 1<\/p>\n<p>fi<\/p>\n<p>fstabstub=fstab.${vgn}<\/p>\n<p>echo &#8220;##### New Oracle Instance vg ${vgn} ####&#8221; &gt; ${fstabstub}<\/p>\n<p>innu=$(echo ${inn} | awk &#8216;{print toupper($0)}&#8217;);<\/p>\n<p>echo &#8220;Instance Name: ${inn} ${innu}&#8221;<\/p>\n<p>awk &#8216;{print}&#8217; ${infile} | while read -r DL<\/p>\n<p>do<\/p>\n<p># echo &#8220;Data Line ${DL}&#8221;<\/p>\n<p>mp=$(echo ${DL} | awk -F\\| &#8216;{ print $3}&#8217;);<\/p>\n<p># echo &#8220;mount point is ${mp}&#8221;<\/p>\n<p>mpszg=$(echo ${DL} | awk &#8216;{ print $3}&#8217;);<\/p>\n<p>mpszm=&#8221;${mpszg}000&#8243;<\/p>\n<p># echo &#8220;mount point size in GB ${mpszg} in fake MB ${mpszm}&#8221;<\/p>\n<p>mpname=$(echo ${mp} | awk -F\\\/ &#8216;{print $NF}&#8217;);<\/p>\n<p>if [ &#8220;${mpname}&#8221; = &#8220;${innu}&#8221; ]<\/p>\n<p>then<\/p>\n<p>mpname=&#8221;orabin&#8221;<\/p>\n<p>else<\/p>\n<p>mpname=$(echo ${mpname} | awk &#8216;{print tolower($0)}&#8217;);<\/p>\n<p>mpname=&#8221;ora${mpname}&#8221;<\/p>\n<p>fi<\/p>\n<p>mkdir -p ${mp}<\/p>\n<p>chown oracle:dba ${mp}<\/p>\n<p># echo &#8220;mount point name is ${mpname}&#8221;<\/p>\n<p>echo &#8220;lvcreate command is : lvcreate -n ${mpname} -L ${mpszm} ${vgn}&#8221;<\/p>\n<p>#### uncomment for realrun ###<\/p>\n<p>lvcreate -n ${mpname} -L ${mpszm} ${vgn}<\/p>\n<p>rc=$?<\/p>\n<p>actonreturn ${rc}<\/p>\n<p>echo &#8220;newfs command is : newfs -F vxfs -o largefiles \/dev\/${vgn}\/r${mpname}&#8221;<\/p>\n<p>newfs -F vxfs -o largefiles \/dev\/${vgn}\/r${mpname}<\/p>\n<p>rc=$?<\/p>\n<p>actonreturn ${rc}<\/p>\n<p>done<\/p>\n<p>vgexport -v -s -p -m ${vgn}.map ${vgn}<\/p>\n<p>1.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Serviceguard stand up Notes: Important parts of the .ascii file. CLUSTER_NAME prod_sgcluster HOSTNAME_ADDRESS_FAMILY IPV4 FIRST_CLUSTER_LOCK_VG \/dev\/vgsgpackagename ## Is it safer to maybe use a dedicated SG Lock disk. NODE_NAME sgclusternode01 NETWORK_INTERFACE lan900 HEARTBEAT_IP 192.168.208.209 NETWORK_INTERFACE lan901 HEARTBEAT_IP 10.43.128.209 # CLUSTER_LOCK_LUN FIRST_CLUSTER_LOCK_PV \/dev\/disk\/disk20 # Link Aggregate lan900 contains the following port(s): lan0,lan4 # Warning: There are [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"_kadence_starter_templates_imported_post":false,"footnotes":""},"categories":[],"tags":[],"class_list":["post-304","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/www.hpux.ws\/index.php?rest_route=\/wp\/v2\/posts\/304"}],"collection":[{"href":"https:\/\/www.hpux.ws\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hpux.ws\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hpux.ws\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hpux.ws\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=304"}],"version-history":[{"count":0,"href":"https:\/\/www.hpux.ws\/index.php?rest_route=\/wp\/v2\/posts\/304\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.hpux.ws\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=304"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hpux.ws\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=304"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hpux.ws\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=304"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}