msgbartop
Tips and Tricks site for advanced HP-UX Engineers
msgbarbottom

01 Oct 07 Welcome to hpux.ws

This site was created for two reasons. It was meant to document procedures, scripts and processes that I felt were important to myself and the greater HP-UX community.

This project is owned by ISN Corporation, a Subchapter S Corporation based in Chicago, Illinois, USA.

If you want to contribute to the site, let me know. hpuxadmin in gtalk hpuxconsulting in yahoo messenger

Regards,

Steven “Shmuel” Protter: Rosh Tzurim, Israel

Tags: , , ,

06 Aug 14 Custom naming your bi-annual HP-UX patch sets

Having a name associated with your bi-annual patch file makes it easier to inventory than the default BUNDLE

This is based on doing a QPK download which requires a support agreement. Output is from 11.23 it worked with 11.31 as well.

./create_depot_hpux.11.23 -b”201407HPUXPATCHMINE” -t 201407HPUXPATCHMINE

< .. lots of boring output >

# DEST -s the destination of the patch set.

cd depot

swcopy -x enforce_dependencies=false -s $PWD \* @ $DEST

< .. lots of boring output >

mygush0:root > swlist -l bundle -s $DEST
# Initializing…
# Contacting target “mygush0″…
#
# Target:  mygush0:/Depots/B.11.23/2014midyear_depot
#

201407HPUXPATCHMINE         B.2014.08.06   201407HPUXPATCHMINE
DNSUPGRADE                    C.9.3.2.13.0   BIND UPGRADE
FEATURE11i                    B.11.23.1009.083 Feature Enablement Patches for HP-UX 11i v2, September 2010
HPSIM-HP-UX                   C.07.03.00.00.03 HP Systems Insight Manager Server Bundle
HWEnable11i                   B.11.23.1012.085a Hardware Enablement Patches for HP-UX 11i v2, October 2010
JAVAOOB                       2.05.00        Java2 Out-of-box for HP-UX
NodeHostNameXpnd              B.11.23.01     Nodename, Hostname expansion enhancement
OpenSSL                       A.00.09.08za.002 Secure Network Communications Protocol
QPKAPPS                       B.11.23.1012.086a Applications Patches for HP-UX 11i v2, December 2010
QPKBASE                       B.11.23.1012.086a Base Quality Pack Bundle for HP-UX 11i v2, December 2010

More fun

Tags: , ,

20 Mar 14 Performance Measurement using measureware

Measureware Extract Documentation

 

 

 

Necessary Processes:

root@myserver:/tmp/fog> ps -ef | grep scopeux

    root  3246     1  0  Mar 19  ?         0:40 /opt/perf/bin/scopeux

List of possible reporting parameters:

/var/opt/perf/reptfile

 

Running datafiles live here:

root@myserver:/root> ll /var/opt/perf/datafiles

total 154528

-rw-r–r–   1 root       sys             31 Feb 21 08:50 RUN

-rw-r–r–   1 root       root           105 Sep 27  2012 agdb

-rw-r–r–   1 root       root             0 Sep 27  2012 agdb.lk

-rw-rw-rw-   1 root       root           168 Feb 21 18:28 classinfo.db

-rw-r–r–   1 root       root       4206652 Feb 21 18:20 logappl

-rw-r–r–   1 root       root       24054172 Feb 21 18:25 logdev

-rw-r–r–   1 root       root       6464936 Feb 21 18:25 logglob

-rw-r–r–   1 root       root        352232 Feb 21 10:55 logindx

-rw-r–r–   1 root       root            15 Sep 27  2012 logpcmd0

-rw-r–r–   1 root       root       32673802 Feb 21 18:28 logproc

-rw-r–r–   1 root       root       9740096 Feb 21 18:25 logtran

drwxr-xr-x   2 root       root            96 Sep 27  2012 lost+found

-rw-r–r–   1 root       root       1504540 Oct 31  2012 mikslp.db

 

Here is a typical template to generate data into a spreadsheet.

cat mwatemplate

REPORT “MWA Export on !SYSTEM_ID”

FORMAT ASCII

HEADINGS ON

SEPARATOR=”|”

SUMMARY=60

MISSING=0

DATA TYPE GLOBAL

YEAR

DATE

TIME

GBL_CPU_TOTAL_UTIL

GBL_CPU_SYS_MODE_UTIL

GBL_CPU_USER_MODE_UTIL

GBL_CPU_SYSCALL_UTIL

GBL_CPU_INTERRUPT_UTIL

GBL_PRI_QUEUE

GBL_CPU_CSWITCH_UTIL

GBL_SWAP_SPACE_UTIL

GBL_DISK_UTIL_PEAK

GBL_DISK_SUBSYSTEM_QUEUE

GBL_MEM_UTIL

GBL_MEM_CACHE_HIT_PCT

GBL_MEM_PAGEIN_RATE

GBL_MEM_PAGEOUT_RATE

GBL_MEM_SWAPIN_RATE

GBL_MEM_SWAPOUT_RATE

GBL_MEM_QUEUE

GBL_NET_PACKET_RATE

GBL_NET_OUTQUEUE

GBL_NETWORK_SUBSYSTEM_QUEUE

 

Here is a script to process the measureware output and generate a spreadsheet using the above template file:

 

#################### Begin Sample Extract Script ####################

#!/usr/bin/ksh

#

# Extract to spreadsheet midnight to 6 am

/opt/perf/bin/extract -xp -r /root/mwatemplate -g -b today 0:00 -e today 06:00 -f testfile.txt

####################  End Sample Extract Script  ####################

 

It is simple but effective. The command above looks at data between midnight and 6 am today. A look at the man page for extract will show you how to look at different data sets. There are an endless number of options. Choose template options based on the nature of the problem you are facing.

 

 

 

Tags: ,

06 Mar 14 Serviceguard complete cluster standup (Long article)

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 no standby network interfaces for lan900.

# Link Aggregate lan901 contains the following port(s): lan8,lan12

# Warning: There are no standby network interfaces for lan901.

NODE_NAME sgclusternode02

NETWORK_INTERFACE lan900

HEARTBEAT_IP 192.168.209.98

NETWORK_INTERFACE lan901

HEARTBEAT_IP 10.43.128.210

# CLUSTER_LOCK_LUN

FIRST_CLUSTER_LOCK_PV /dev/disk/disk59

MEMBER_TIMEOUT 14000000

# Configuration/Reconfiguration Timing Parameters (microseconds).

AUTO_START_TIMEOUT 600000000

NETWORK_POLLING_INTERVAL 2000000

NETWORK_FAILURE_DETECTION INOUT

# NETWORK_AUTO_FAILBACK

# When set to YES a recovery of the primary LAN interface will cause failback

# from the standby LAN interface to the primary.

# When set to NO a recovery of the primary LAN interface will do nothing and

# the standby LAN interface will continue to be used until cmmodnet -e lanX

# is issued for the primary LAN interface.

NETWORK_AUTO_FAILBACK YES

SUBNET 192.168.208.0

IP_MONITOR ON

POLLING_TARGET 192.168.208.1

SUBNET 192.168.0.0

IP_MONITOR OFF

# Package Configuration Parameters.

# Enter the maximum number of packages which will be configured in the cluster.

# You can not add packages beyond this limit.

# This parameter is required.

MAX_CONFIGURED_PACKAGES 300

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.

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.

cmrunnode #on each node

vgchange –a n vgsgpackagename

vgchange –c y vgsgpackagename

cmquerycl -v -C prod_sgcluster.ascii -n sgclusternode01 -n sgclusternode02

cmcheckconf -v -C prod_sgcluster.ascii

cmapplyconf -v -C prod_sgcluster.ascii

Cluster should look roughly like this:

root@sgclusternode02:/root> cmviewcl

CLUSTER STATUS

prod_sgcluster up

NODE STATUS STATE

sgclusternode01 up running

sgclusternode02 up running

PACKAGE STATUS STATE AUTO_RUN NODE

root@sgclusternode02:/root>

Standing up your first package.

Scenario assumes you are standing up a package named sgpackagename.

mkdir –p /etc/cmcluster/packages/sgpackagename

cd /etc/cmcluster/packages/sgpackagename

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.

Permissions may matter:

oot@sgclusternode02:/etc/cmcluster/packages/sgpackagename> ll

total 176

-rw——- 1 root sys 71668 Dec 3 16:12 sgpackagename.conf

-r-x—— 1 root sys 11005 Dec 9 11:35 task0

root@sgclusternode02:/etc/cmcluster/packages/sgpackagename>

Use the method of choice to modify your configuration files:

Here is what needs to be changed ( In bold ):

package_name sgpackagename

package_description “sgpackagename Instance”

package_type failover

node_name sgclusternode01

node_name sgclusternode02

ip_subnet 192.168.208.0

ip_address 192.168.209.48

Change the bold values below for each file system.

fs_name /dev/vgsgpackagename/oraarch

fs_server “”

fs_directory /data/oracle/sgpackagename/arch

fs_type “vxfs”

fs_mount_opt “-o ioerror=mwdisable,largefiles,delaylog,cio”

fs_umount_opt “”

fs_fsck_opt “”

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.

external_script /etc/cmcluster/packages/sgpackagename/task0

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 $?

awk ‘/^fs_dir/{print $NF}’ sgpackagename.conf | while read –r mp

do

mkdir –p $mp

ll –d $mp

chown oracle:dba $mp

ll –d $mp

done

Your final output from the ll –d command should look this

drwxr-xr-x 3 oracle dba 96 Dec 9 11:04 /data/oracle/sgpackagename/arch

drwxr-xr-x 4 oracle dba 96 Dec 10 11:40 /data/oracle/sgpackagename/export

drwxr-xr-x 3 oracle dba 96 Dec 9 11:04 /data/oracle/sgpackagename/undo1

drwxr-xr-x 3 oracle dba 96 Dec 9 11:04 /data/oracle/sgpackagename/redo1

drwxr-xr-x 3 oracle dba 96 Dec 9 11:04 /data/oracle/sgpackagename/redo2

drwxr-xr-x 3 oracle dba 96 Dec 9 11:04 /data/oracle/sgpackagename/ctrl1

drwxr-xr-x 3 oracle dba 96 Dec 9 11:04 /data/oracle/sgpackagename/ctrl2

drwxr-xr-x 3 oracle dba 96 Dec 9 11:04 /data/oracle/sgpackagename/data1

drwxr-xr-x 3 oracle dba 96 Dec 9 11:04 /data/oracle/sgpackagename/index1

drwxr-xr-x 4 oracle dba 96 Dec 10 13:59 /apps/oracle/sgpackagename

drwxr-xr-x 3 oracle dba 96 Dec 9 11:04 /data/oracle/sgpackagename/system

drwxr-xr-x 3 oracle dba 96 Dec 9 11:04 /data/oracle/sgpackagename/temp1

drwxr-xr-x 3 oracle dba 96 Dec 9 11:04 /data/oracle/sgpackagename/users

drwxr-xr-x 3 oracle dba 96 Dec 9 11:04 /data/oracle/sgpackagename/tools

drwxr-xr-x 3 oracle dba 96 Dec 9 11:04 /data/oracle/sgpackagename/fra

drwxr-xr-x 3 oracle dba 96 Dec 9 11:04 /data/oracle/sgpackagename/diag

drwxr-xr-x 3 oracle dba 96 Dec 9 11:04 /data/oracle/sgpackagename/admin

edit the task0 file

function start_commmand

su oracle -c “/apps/oracle/general/sh/change_backup_mode.ksh sgpackagename cold end”

Note this section is different for SAP. Change the instance name.

function stop_command

#### Database startup script, normally created by dba#####

su oracle -c “/apps/oracle/general/sh/change_backup_mode.ksh sgpackagename cold begin”

Comment out (in bold) the start/stop code so first package run only stands up the filesystems:

case ${1} in

start)

# start_command $*

# exit_val=$?

;;

stop)

# stop_command $*

# exit_val=$?

;;

Detect your storage from storage system.

ioscan –fnNC disk

# detects the storage

For this example we detected the following agile devices:

disk59

disk60

disk61

disk62

disk63

disk64

disk65

disk66

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.

This is a bit tedious so I created a simple script for the job:

dislev.ksh

#!/usr/bin/ksh

args=$#

if [ $args -ne 1 ];then echo “1 argument last part of disk ex disk60″;exit 1;fi

dv=$1

diskinfo /dev/rdisk/${dv}

ldev=$(/usr/bin/inq -nodots -sym_wwn | grep “$dv ” | grep -v rdsk |awk ‘{print $3}’ |awk ‘{print substr($0,length($0) – 3,length($0))}’);

echo “LDEV is: ${ldev}”

root@sgclusternode02:/root/shuffle> ./disldev.ksh disk59

SCSI describe of /dev/rdisk/disk59:

vendor: EMC

product id: SYMMETRIX

type: direct access

size: 154176000 Kbytes

bytes per sector: 512

LDEV is: 4F2F

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.

My disk list is kept for verification purposes in a text file root@sgclusternode02:/root/shuffle> cat request.610.dlist.txt

610 is the request from the stand up rquest.

awk ‘{print $NF}’ request.610.dlist.txt | while read –r dvn

do

pvcreate $dvn

rc=$?

echo “RC from pvcreate is ${rc}”

done

Create the volume group using LVM 2.2

vgcreate –V <version number> -s <pe size> -S <Max size in TB> <volume group name> <disk list>

vgcreate -V 2.2 -s 32 -S 2t vgsgpackagename /dev/disk/disk59 …. /dev/disk/disk66

The next step is best scripted:

<command> -n name –L <size in MB> <volume group name>

lvcreate -n oraadmin -L 10000 vgsgpackagename

echo $?

newfs -F vxfs -o largefiles /dev/sgpackagename/roraadmin

echo $?

.. 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.

Volume group must be exported in preview mode:

vgexport -v -s -p -m vgsgpackagename.map vgsgpackagename

Use scp to copy the map file to the failover node

On failover node:

vgimport -v -s -N -m vgsgpackagename.map vgsgpackagename

vgchange –a y vgsgpackagename

vgdisplay –v vgsgpackagename (Look for logical volumes disks being correct)

vgchange –a n vgsgpackagename

vgchange –c y vgsgpackagename (Must be successful check return code $? )

vgchange –c n vgsgpackagename

On primary node (either will work but being consistent is helpful).

vgchange –c y vgsgpackagename

cd /etc/cmcluster/packages/sgpackagename

cmcheckconf –P sgpackagename.conf

(When all cmcheckconf issues are resolved)

cmapplyconf –P sgpackagename.conf

cmrunpckg –v –n <node_hostname> sgpackagename

cmmodpkg –e sgpackagename

cmviewcl (Look for your package to be running)

Error logs live: /var/adm/cmcluster/log/<packagename>.log

Setting up asynchronous I/O

root@sat1hcmdb090:/root> getprivgrp

global privileges: CHOWN

dba: MLOCK

getprivgroup is a display command use command:

setprivgrp dba MLOCK

Standing up your first package:

Make sure you are in the directory: /etc/cmcluster/packages/sgpackagename

root@sgclusternode02:/etc/cmcluster/packages/sgpackagename> cmcheckconf -P sgpackagename.conf

cmcheckconf: Verification completed. No errors found.

Use the cmapplyconf command to apply the configuration.

root@sgclusternode02:/etc/cmcluster/packages/sgpackagename> cmapplyconf -P sgpackagename.conf

One or more of the specified packages are running. Any error in the

proposed configuration change could cause these packages to fail.

Ensure configuration changes have been tested before applying them.

Modify the package configuration ([y]/n)? y

Completed the cluster update

root@sgclusternode02:/etc/cmcluster/packages/sgpackagename> cmmodpkg -e sgpackagename

cmmodpkg: Completed successfully on all packages specified

root@sgclusternode02:/etc/cmcluster/packages/sgpackagename> cmviewcl -v

CLUSTER STATUS

prod_sgcluster up

NODE STATUS STATE

sgclusternode01 up running

Cluster_Lock_LVM:

VOLUME_GROUP PHYSICAL_VOLUME STATUS

/dev/vgsgpackagename /dev/disk/disk20 up

Network_Parameters:

INTERFACE STATUS PATH NAME

PRIMARY up LinkAgg0 lan900

PRIMARY up LinkAgg1 lan901

NODE STATUS STATE

sgclusternode02 up running

Cluster_Lock_LVM:

VOLUME_GROUP PHYSICAL_VOLUME STATUS

/dev/vgsgpackagename /dev/disk/disk59 up

Network_Parameters:

INTERFACE STATUS PATH NAME

PRIMARY up LinkAgg0 lan900

PRIMARY up LinkAgg1 lan901

PACKAGE STATUS STATE AUTO_RUN NODE

sgpackagename up running enabled sgclusternode02

Policy_Parameters:

POLICY_NAME CONFIGURED_VALUE

Failover configured_node

Failback manual

Node_Switching_Parameters:

NODE_TYPE STATUS SWITCHING NAME

Primary up enabled sgclusternode01

Alternate up enabled sgclusternode02 (current)

Other_Attributes:

ATTRIBUTE_NAME ATTRIBUTE_VALUE

Style modular

Priority no_priority

Check that your file systems are mounted (About a dozen different ways to do this):

root@sgclusternode02:/etc/cmcluster/packages/sgpackagename> bdf | grep sgpackagename

102400000 91742 95913999 0% /data/oracle/sgpackagename/arch

102400000 13178819 83644864 14% /data/oracle/sgpackagename/export

102400000 91742 95913999 0% /data/oracle/sgpackagename/undo1

10256384 20006 9596612 0% /data/oracle/sgpackagename/redo1

10256384 20006 9596612 0% /data/oracle/sgpackagename/redo2

10256384 20006 9596612 0% /data/oracle/sgpackagename/ctrl1

10256384 20006 9596612 0% /data/oracle/sgpackagename/ctrl2

307200000 141939 287866940 0% /data/oracle/sgpackagename/data1

204800000 116841 191890469 0% /data/oracle/sgpackagename/index1

20480000 3972498 15475861 20% /apps/oracle/sgpackagename

10256384 20006 9596612 0% /data/oracle/sgpackagename/system

102400000 91742 95913999 0% /data/oracle/sgpackagename/temp1

10256384 20006 9596612 0% /data/oracle/sgpackagename/users

10256384 20006 9596612 0% /data/oracle/sgpackagename/tools

102400000 91742 95913999 0% /data/oracle/sgpackagename/fra

10256384 20006 9596612 0% /data/oracle/sgpackagename/diag

10256384 20006 9596612 0% /data/oracle/sgpackagename/admin

root@sgclusternode02:/etc/cmcluster/packages/sgpackagename> mount | grep sgpackagename

/data/oracle/sgpackagename/arch on /dev/vgsgpackagename/oraarch ioerror=mwdisable,largefiles,delaylog,cio,dev=80000002 on Mon Dec 9 11:41:17 2013

/data/oracle/sgpackagename/export on /dev/vgsgpackagename/oraexport ioerror=mwdisable,largefiles,delaylog,cio,dev=80000009 on Mon Dec 9 11:41:17 2013

/data/oracle/sgpackagename/undo1 on /dev/vgsgpackagename/oraundo1 ioerror=mwdisable,largefiles,delaylog,cio,dev=8000000c on Mon Dec 9 11:41:17 2013

/data/oracle/sgpackagename/redo1 on /dev/vgsgpackagename/oraredo1 ioerror=mwdisable,largefiles,delaylog,cio,dev=80000005 on Mon Dec 9 11:41:17 2013

/data/oracle/sgpackagename/redo2 on /dev/vgsgpackagename/oraredo2 ioerror=mwdisable,largefiles,delaylog,cio,dev=80000004 on Mon Dec 9 11:41:17 2013

/data/oracle/sgpackagename/ctrl1 on /dev/vgsgpackagename/oractrl1 ioerror=mwdisable,largefiles,delaylog,cio,dev=80000006 on Mon Dec 9 11:41:18 2013

/data/oracle/sgpackagename/ctrl2 on /dev/vgsgpackagename/oractrl2 ioerror=mwdisable,largefiles,delaylog,cio,dev=80000007 on Mon Dec 9 11:41:18 2013

/data/oracle/sgpackagename/data1 on /dev/vgsgpackagename/oradata1 ioerror=mwdisable,largefiles,delaylog,cio,dev=80000003 on Mon Dec 9 11:41:18 2013

/data/oracle/sgpackagename/index1 on /dev/vgsgpackagename/oraindex1 ioerror=mwdisable,largefiles,delaylog,cio,dev=80000008 on Mon Dec 9 11:41:18 2013

/apps/oracle/sgpackagename on /dev/vgsgpackagename/orabin ioerror=mwdisable,largefiles,delaylog,nodatainlog,dev=80000001 on Mon Dec 9 11:41:18 2013

/data/oracle/sgpackagename/system on /dev/vgsgpackagename/orasystem ioerror=mwdisable,largefiles,delaylog,cio,dev=8000000a on Mon Dec 9 11:41:18 2013

/data/oracle/sgpackagename/temp1 on /dev/vgsgpackagename/oratemp1 ioerror=mwdisable,largefiles,delaylog,cio,dev=8000000b on Mon Dec 9 11:41:18 2013

/data/oracle/sgpackagename/users on /dev/vgsgpackagename/orausers ioerror=mwdisable,largefiles,delaylog,cio,dev=8000000d on Mon Dec 9 11:41:18 2013

/data/oracle/sgpackagename/tools on /dev/vgsgpackagename/oratools ioerror=mwdisable,largefiles,delaylog,cio,dev=8000000e on Mon Dec 9 11:41:19 2013

/data/oracle/sgpackagename/fra on /dev/vgsgpackagename/orafra ioerror=mwdisable,largefiles,delaylog,cio,dev=8000000f on Mon Dec 9 11:41:19 2013

/data/oracle/sgpackagename/diag on /dev/vgsgpackagename/oradiag ioerror=mwdisable,largefiles,delaylog,cio,dev=80000010 on Mon Dec 9 11:41:19 2013

/data/oracle/sgpackagename/admin on /dev/vgsgpackagename/oraadmin ioerror=mwdisable,largefiles,delaylog,cio,dev=80000011 on Mon Dec 9 11:41:19 2013

Conduct failover test (Pre-installation)

root@sgclusternode02:/etc/cmcluster/packages/sgpackagename> cmhaltpkg -v sgpackagename

Disabling automatic failover for failover packages to be halted.

Halting package sgpackagename

Successfully halted package sgpackagename

One or more packages or package instances have been halted.

The failover packages have AUTO_RUN disabled and no new instance can start automatically. To allow automatic start, enable AUTO_RUN via cmmodpkg -e <package_name>

cmhaltpkg: Completed successfully on all packages specified

root@sgclusternode02:/etc/cmcluster/packages/sgpackagename> cmviewcl

CLUSTER STATUS

prod_sgcluster up

NODE STATUS STATE

sgclusternode01 up running

sgclusternode02 up running

UNOWNED_PACKAGES

PACKAGE STATUS STATE AUTO_RUN NODE

sgpackagename down halted disabled unowned

root@sgclusternode02:/etc/cmcluster/packages/sgpackagename> cmrunpkg -v -n sgclusternode01 sgpackagename

Running package sgpackagename on node sgclusternode01

Successfully started package sgpackagename on node sgclusternode01

cmrunpkg: All specified packages are running

root@sgclusternode02:/etc/cmcluster/packages/sgpackagename> cmviewcl

CLUSTER STATUS

prod_sgcluster up

NODE STATUS STATE

sgclusternode01 up running

PACKAGE STATUS STATE AUTO_RUN NODE

sgpackagename up running disabled sgclusternode01

NODE STATUS STATE

sgclusternode02 up running

Re run your mount test on the node the package is now running on (see above).

You may wish to leave package failover set to disabled to avoid surprises.

Email your DBA give them the file system(s) to do installation. Flip the database dashboard request to “Application installation & configuration”

Notify your IA/PM via email.

Be prepared to run root.sh when your DBA needs it run.

Steps after DBA completion

Modify task 0 uncomment the 4 lines of code you commented.

case ${1} in

start)

start_command $*

exit_val=$?

;;

stop)

stop_command $*

exit_val=$?

Check your package changes:

cmcheckconf –P sgpackagename.conf

cmapplyconf –P sgpackagename.conf

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).

Re-run the failover tests. Check log files:

/var/adm/cmcluster/log/sgpackagename.log

Check database run status.

ps –ef | grep sgpackagename

Lessons learned:

· DBA’s 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.

· Try not to modify task0 to default to zero return codes. This defeats the purpose of Serviceguard checking return codes.

· Never run pvcreate –f (If you feel the need, deconstruct your volume group and use pvremve)

· Never run cmdisklock -f reset <disk device>, 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.

Appendix 1 Additional automation.

This is optional, but making processes repeatable is important so you might like this.

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.

root@sgclusternode02:/root/shuffle> cat request.610.data.txt

sgclusternode01|NEW|/apps/oracle/sgpackagename | 20 GB

sgclusternode01|NEW|/data/oracle/sgpackagename/arch | 100 GB

sgclusternode01|NEW|/data/oracle/sgpackagename/data1 | 300 GB

sgclusternode01|NEW|/data/oracle/sgpackagename/redo2 | 10 GB

sgclusternode01|NEW|/data/oracle/sgpackagename/redo1 | 10 GB

sgclusternode01|NEW|/data/oracle/sgpackagename/ctrl1 | 10 GB

sgclusternode01|NEW|/data/oracle/sgpackagename/ctrl2 | 10 GB

sgclusternode01|NEW|/data/oracle/sgpackagename/index1 | 200 GB

sgclusternode01|NEW|/data/oracle/sgpackagename/export | 100 GB

sgclusternode01|NEW|/data/oracle/sgpackagename/SYSTEM | 10 GB

sgclusternode01|NEW|/data/oracle/sgpackagename/temp1 | 100 GB

sgclusternode01|NEW|/data/oracle/sgpackagename/undo1 | 100 GB

sgclusternode01|NEW|/data/oracle/sgpackagename/users | 10 GB

sgclusternode01|NEW|/data/oracle/sgpackagename/tools | 10 GB

sgclusternode01|NEW|/data/oracle/sgpackagename/fra | 100 GB

sgclusternode01|NEW|/data/oracle/sgpackagename/diag | 10 GB

sgclusternode01|NEW|/data/oracle/sgpackagename/admin | 10 GB

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.

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.

#!/usr/bin/ksh

args=$#

if [ $args -ne 2 ];then echo “2 arguments instance name and request ### required”;exit 1;fi

inn=$1

vgn=”vg${inn}”

req=$2

disklist=”request.${req}.dlist.txt”

actonreturn()

{

rcc=$1

if [ $rcc -ne 0 ];then echo “FAIL FAIL $0 FAILED”; exit 1;fi

}

devl=””

# pvcreate

awk ‘{ print $1 }’ ${disklist} | while read -r dv

do

devr=”/dev/rdisk/${dv}”

echo “pvcreate ${devr}”

pvcreate ${devr}

rc=$?

echo “pvcreate rc:${rc}”

actonreturn ${rc}

devl=”$devl /dev/disk/${dv}”

done

#vgcreate -V 2.2 -s 32 -S 1t <vg name> disks in /dev/disk/disk### format

echo “vgcreate -V 2.2 -s 32 -S 1t ${vgn} ${devl}”

vgcreate -V 2.2 -s 32 -S 2t ${vgn} ${devl}

rc=$?

echo “vgcreate rc:${rc}”

actonreturn ${rc}

infile=”request.${req}.data.txt”

if [ -f ${infile} ]

then

echo “- pass – file ${infile} found”

else

echo “- FAIL – file ${infile} MIA”

exit 1

fi

fstabstub=fstab.${vgn}

echo “##### New Oracle Instance vg ${vgn} ####” > ${fstabstub}

innu=$(echo ${inn} | awk ‘{print toupper($0)}’);

echo “Instance Name: ${inn} ${innu}”

awk ‘{print}’ ${infile} | while read -r DL

do

# echo “Data Line ${DL}”

mp=$(echo ${DL} | awk -F\| ‘{ print $3}’);

# echo “mount point is ${mp}”

mpszg=$(echo ${DL} | awk ‘{ print $3}’);

mpszm=”${mpszg}000″

# echo “mount point size in GB ${mpszg} in fake MB ${mpszm}”

mpname=$(echo ${mp} | awk -F\/ ‘{print $NF}’);

if [ "${mpname}" = "${innu}" ]

then

mpname=”orabin”

else

mpname=$(echo ${mpname} | awk ‘{print tolower($0)}’);

mpname=”ora${mpname}”

fi

mkdir -p ${mp}

chown oracle:dba ${mp}

# echo “mount point name is ${mpname}”

echo “lvcreate command is : lvcreate -n ${mpname} -L ${mpszm} ${vgn}”

#### uncomment for realrun ###

lvcreate -n ${mpname} -L ${mpszm} ${vgn}

rc=$?

actonreturn ${rc}

echo “newfs command is : newfs -F vxfs -o largefiles /dev/${vgn}/r${mpname}”

newfs -F vxfs -o largefiles /dev/${vgn}/r${mpname}

rc=$?

actonreturn ${rc}

done

vgexport -v -s -p -m ${vgn}.map ${vgn}

1.

26 Feb 14 scsimgr task: removing a LUN

scsimgr is the tool of choice for getting rid of storage that is in the HP-UX kernel and the underlying storage has been pulled by your storage administrator. In this case the lun has been marked as FAILED.

HP-UX 11.31, any Operating Environment, though these tasks go easier if the OE is more current.

scsimgr lun_map> /tmp/lun_map.out

 

        LUN PATH INFORMATION FOR LUN : /dev/rdisk/disk3436

 

Total number of LUN paths     = 2

World Wide Identifier(WWID)    = 0×60000970000192605240533039434139

 

LUN path : lunpath2275

Class                         = lunpath

Instance                      = 2275

Hardware path                 = 0/0/0/5/0/0/1.0x500009720851e1ad.0x446e000000000000

SCSI transport protocol       = fibre_channel

State                         = UNOPEN

Last Open or Close state      = FAILED

 

LUN path : lunpath2274

Class                         = lunpath

Instance                      = 2274

Hardware path                 = 0/0/0/8/0/0/1.0x500009720851e191.0x446e000000000000

SCSI transport protocol       = fibre_channel

State                         = UNOPEN

Last Open or Close state      = FAILED

 

scsimgr replace_wwid -D /dev/rdisk/disk3436

echo $?

Zero is good, non-zero probably means you are booting.

27 Jan 14 Fixing an inconsistent volume group with no downtime

I recently encountered a volume group that was part legacy devices, part dsf agile.
root@protterdbsvr1:/root/shuffle> vgdisplay -v vgprotter
--- Volume groups ---
VG Name                     /dev/vgprotter
VG Write Access             read/write
VG Status                   available
Max LV                      2047
Cur LV                      15
Open LV                     15
Cur Snapshot LV             0
Max PV                      2048
Cur PV                      11
Act PV                      11
Max PE per PV               65536
VGDA                        22
PE Size (Mbytes)            16
Unshare unit size (Kbytes)  1024
Total PE                    48004
Alloc PE                    46765
Current pre-allocated PE    0
Free PE                     1239
Total PVG                   0
Total Spare PVs             0
Total Spare PVs in use      0
VG Version                  2.2
VG Max Size                 1t
VG Max Extents              65536
Cur Snapshot Capacity       0p
Max Snapshot Capacity       1t
   --- Logical volumes ---
   LV Name                     /dev/vgprotter/sqlbin
   LV Status                   available/syncd
   LV Size (Mbytes)            20000
   Current LE                  1250
   Allocated PE                1250
   Used PV                     1
   LV Name                     /dev/vgprotter/sqladmin
   LV Status                   available/syncd
   LV Size (Mbytes)            4000
   Current LE                  250
   Allocated PE                250
   Used PV                     1
   LV Name                     /dev/vgprotter/sqlctrl1
   LV Status                   available/syncd
   LV Size (Mbytes)            512
   Current LE                  32
   Allocated PE                32
   Used PV                     1
   LV Name                     /dev/vgprotter/sqlctrl2
   LV Status                   available/syncd
   LV Size (Mbytes)            512
   Current LE                  32
   Allocated PE                32
   Used PV                     1
   LV Name                     /dev/vgprotter/sqldata1
   LV Status                   available/syncd
   LV Size (Mbytes)            550000
   Current LE                  34375
   Allocated PE                34375
   Used PV                     10
   LV Name                     /dev/vgprotter/sqldiag
   LV Status                   available/syncd
   LV Size (Mbytes)            4000
   Current LE                  250
   Allocated PE                250
   Used PV                     1
   LV Name                     /dev/vgprotter/sqlexport
   LV Status                   available/syncd
   LV Size (Mbytes)            70000
   Current LE                  4375
   Allocated PE                4375
   Used PV                     5
   LV Name                     /dev/vgprotter/sqlindex1
   LV Status                   available/syncd
   LV Size (Mbytes)            30000
   Current LE                  1875
   Allocated PE                1875
   Used PV                     1
   LV Name                     /dev/vgprotter/sqlredo1
   LV Status                   available/syncd
   LV Size (Mbytes)            10000
   Current LE                  625
   Allocated PE                625
   Used PV                     1
   LV Name                     /dev/vgprotter/sqlredo2
   LV Status                   available/syncd
   LV Size (Mbytes)            10000
   Current LE                  625
   Allocated PE                625
   Used PV                     1
   LV Name                     /dev/vgprotter/sqlsystem
   LV Status                   available/syncd
   LV Size (Mbytes)            7200
   Current LE                  450
   Allocated PE                450
   Used PV                     1
   LV Name                     /dev/vgprotter/sqltemp
   LV Status                   available/syncd
   LV Size (Mbytes)            20000
   Current LE                  1250
   Allocated PE                1250
   Used PV                     1
   LV Name                     /dev/vgprotter/sqltools
   LV Status                   available/syncd
   LV Size (Mbytes)            1008
   Current LE                  63
   Allocated PE                63
   Used PV                     1
   LV Name                     /dev/vgprotter/sqlundo
   LV Status                   available/syncd
   LV Size (Mbytes)            20000
   Current LE                  1250
   Allocated PE                1250
   Used PV                     1
   LV Name                     /dev/vgprotter/sqlusers
   LV Status                   available/syncd
   LV Size (Mbytes)            1008
   Current LE                  63
   Allocated PE                63
   Used PV                     1
 
   --- Physical volumes ---
   PV Name                     /dev/dsk/c3t1d6
   PV Name                     /dev/dsk/c5t1d6  Alternate Link
   PV Status                   available
   Total PE                    4364
   Free PE                     0
   Current pre-allocated PE    0
   Autoswitch                  On
   Proactive Polling           On
   PV Name                     /dev/dsk/c3t1d7
   PV Name                     /dev/dsk/c5t1d7  Alternate Link
   PV Status                   available
   Total PE                    4364
   Free PE                     0
   Current pre-allocated PE    0
   Autoswitch                  On
   Proactive Polling           On
   PV Name                     /dev/dsk/c3t2d0
   PV Name                     /dev/dsk/c5t2d0  Alternate Link
   PV Status                   available
   Total PE                    4364
   Free PE                     0
   Current pre-allocated PE    0
   Autoswitch                  On
   Proactive Polling           On
   PV Name                     /dev/dsk/c3t2d1
   PV Name                     /dev/dsk/c5t2d1  Alternate Link
   PV Status                   available
   Total PE                    4364
   Free PE                     0
   Current pre-allocated PE    0
   Autoswitch                  On
   Proactive Polling           On
   PV Name                     /dev/dsk/c3t2d2
   PV Name                     /dev/dsk/c5t2d2  Alternate Link
   PV Status                   available
   Total PE                    4364
   Free PE                     0
   Current pre-allocated PE    0
   Autoswitch                  On
   Proactive Polling           On
   PV Name                     /dev/disk/disk220
   PV Status                   available
   Total PE                    4364
   Free PE                     0
   Current pre-allocated PE    0
   Autoswitch                  On
   Proactive Polling           On
   PV Name                     /dev/disk/disk221
   PV Status                   available
   Total PE                    4364
   Free PE                     0
   Current pre-allocated PE    0
   Autoswitch                  On
   Proactive Polling           On
   PV Name                     /dev/disk/disk222
   PV Status                   available
   Total PE                    4364
   Free PE                     0
   Current pre-allocated PE    0
   Autoswitch                  On
   Proactive Polling           On
   PV Name                     /dev/disk/disk223
   PV Status                   available
   Total PE                    4364
   Free PE                     0
   Current pre-allocated PE    0
   Autoswitch                  On
   Proactive Polling           On
   PV Name                     /dev/disk/disk224
   PV Status                   available
   Total PE                    4364
   Free PE                     0
   Current pre-allocated PE    0
   Autoswitch                  On
   Proactive Polling           On
   PV Name                     /dev/disk/disk225
   PV Status                   available
   Total PE                    4364
   Free PE                     1239
   Current pre-allocated PE    0
   Autoswitch                  On
   Proactive Polling           On

The issue is that two different technologies, alternate link and native multipathing are in use in the same volume group.

The volume group was working but might have maintenance issues down the road. Plus I personally found it darn confusing.
  PV Name                     /dev/dsk/c3t2d2
   PV Name                     /dev/dsk/c5t2d2  Alternate Link
 
The fix:
vgextend vgprotter /dev/disk/disk53
echo $?
0
vgreduce vgprotter /dev/dsk/c3t2d2
echo $?
0
vgreduce vgprotter /dev/dsk/c5t2d2
echo $?
0
We check the return code to make sure the operation was a success. Repeat for each legacy device.
No downtime though for prodcution systems I recommend working with a change request under your organizations policy.

What id looks like after we are done:

root@
protterdbsvr1:/root> vgdisplay -v vgprotter
--- Volume groups ---
VG Name /dev/vgprotter
VG Write Access read/write
VG Status available
Max LV 2047
Cur LV 15
Open LV 15
Cur Snapshot LV 0
Max PV 2048
Cur PV 11
Act PV 11
Max PE per PV 65536
VGDA 22
PE Size (Mbytes) 16
Unshare unit size (Kbytes) 1024
Total PE 48004
Alloc PE 46765
Current pre-allocated PE 0
Free PE 1239
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
VG Version 2.2
VG Max Size 1t
VG Max Extents 65536
Cur Snapshot Capacity 0p
Max Snapshot Capacity 1t
--- Logical volumes ---
LV Name /dev/vgprotter/sqlbin
LV Status available/syncd
LV Size (Mbytes) 20000
Current LE 1250
Allocated PE 1250
Used PV 1
LV Name /dev/vgprotter/sqladmin
LV Status available/syncd
LV Size (Mbytes) 4000
Current LE 250
Allocated PE 250
Used PV 1
LV Name /dev/vgprotter/sqlctrl1
LV Status available/syncd
LV Size (Mbytes) 512
Current LE 32
Allocated PE 32
Used PV 1
LV Name /dev/vgprotter/sqlctrl2
LV Status available/syncd
LV Size (Mbytes) 512
Current LE 32
Allocated PE 32
Used PV 1
LV Name /dev/vgprotter/sqldata1
LV Status available/syncd
LV Size (Mbytes) 550000
Current LE 34375
Allocated PE 34375
Used PV 10
LV Name /dev/vgprotter/sqldiag
LV Status available/syncd
LV Size (Mbytes) 4000
Current LE 250
Allocated PE 250
Used PV 1
LV Name /dev/vgprotter/sqlexport
LV Status available/syncd
LV Size (Mbytes) 70000
Current LE 4375
Allocated PE 4375
Used PV 5
LV Name /dev/vgprotter/sqlindex1
LV Status available/syncd
LV Size (Mbytes) 30000
Current LE 1875
Allocated PE 1875
Used PV 1
LV Name /dev/vgprotter/sqlredo1
LV Status available/syncd
LV Size (Mbytes) 10000
Current LE 625
Allocated PE 625
Used PV 1
LV Name /dev/vgprotter/sqlredo2
LV Status available/syncd
LV Size (Mbytes) 10000
Current LE 625
Allocated PE 625
Used PV 1
LV Name /dev/vgprotter/sqlsystem
LV Status available/syncd
LV Size (Mbytes) 7200
Current LE 450
Allocated PE 450
Used PV 1
LV Name /dev/vgprotter/sqltemp
LV Status available/syncd
LV Size (Mbytes) 20000
Current LE 1250
Allocated PE 1250
Used PV 1
LV Name /dev/vgprotter/sqltools
LV Status available/syncd
LV Size (Mbytes) 1008
Current LE 63
Allocated PE 63
Used PV 1
LV Name /dev/vgprotter/sqlundo
LV Status available/syncd
LV Size (Mbytes) 20000
Current LE 1250
Allocated PE 1250
Used PV 1
LV Name /dev/vgprotter/sqlusers
LV Status available/syncd
LV Size (Mbytes) 1008
Current LE 63
Allocated PE 63
Used PV 1
 
--- Physical volumes ---
PV Name /dev/disk/disk220
PV Status available
Total PE 4364
Free PE 0
Current pre-allocated PE 0
Autoswitch On
Proactive Polling On
PV Name /dev/disk/disk221
PV Status available
Total PE 4364
Free PE 0
Current pre-allocated PE 0
Autoswitch On
Proactive Polling On
PV Name /dev/disk/disk222
PV Status available
Total PE 4364
Free PE 0
Current pre-allocated PE 0
Autoswitch On
Proactive Polling On
PV Name /dev/disk/disk223
PV Status available
Total PE 4364
Free PE 0
Current pre-allocated PE 0
Autoswitch On
Proactive Polling On
PV Name /dev/disk/disk224
PV Status available
Total PE 4364
Free PE 0
Current pre-allocated PE 0
Autoswitch On
Proactive Polling On
PV Name /dev/disk/disk225
PV Status available
Total PE 4364
Free PE 1239
Current pre-allocated PE 0
Autoswitch On
Proactive Polling On
PV Name /dev/disk/disk57
PV Status available
Total PE 4364
Free PE 0
Current pre-allocated PE 0
Autoswitch On
Proactive Polling On
PV Name /dev/disk/disk56
PV Status available
Total PE 4364
Free PE 0
Current pre-allocated PE 0
Autoswitch On
Proactive Polling On
PV Name /dev/disk/disk55
PV Status available
Total PE 4364
Free PE 0
Current pre-allocated PE 0
Autoswitch On
Proactive Polling On
PV Name /dev/disk/disk54
PV Status available
Total PE 4364
Free PE 0
Current pre-allocated PE 0
Autoswitch On
Proactive Polling On
PV Name /dev/disk/disk53
PV Status available
Total PE 4364
Free PE 0
Current pre-allocated PE 0
Autoswitch On
Proactive Polling On

Tags: , , , , ,

24 Jan 14 How to reset auth retry count on hp-ux 11.31

I really published this as a self reference document so I can find it next time this happens and I forget how to fix it.

root logins fail enough time to lock the root password. You power cycle the box and boot single user mode to fix the problem.

userdbset -d -u root auth_failures

14 Jan 14 vi trick of the day. Convert data from upper to lower

Data looks like this

 

DFW1HCMDB999

dfw1hcmdb998

:%s/.*/\L&/g

Suddenly the data is lower case.

06 Nov 13 Getting EMC disk ID’s.

We want storage to check performance on three possibly problematic LUNS.

Need to get the 4 character LUN ID’s on three disks:

disk82 disk83 and disk123

/usr/bin/inq -nodots -sym_wwn | egrep “disk82|disk83|disk123″| awk ‘{print $3}’ |awk ‘{ print substr( $0, length($0) – 3, length($0) ) }’

Output:

5422

5423

5826

HP-UX 11.31 September 2011 OE.

A good day is an awkful day.

Tags: , , , , ,

25 Jul 13 Replacing a bad vxvm boot disk. HP-UX 11.23 PA-RISC

So you lose a boot disk on a vxvm booted system. You hot replace the disk, but now you need to make sure the software mirror is good.

 

Lets say for example its rootdisk02

If the disk stayed alive and did not power down you can run vxbrk_rootmirror and cleanly replace the disk.

What do do if the disk powered down?

/opt/VRTS/bin/vxdiskunsetup -C rootdisk02

vxrecover -g rootdg -sb

You more than likely end up with a disk named like this that is totally useless:

rootdg.26724.31359

vxdg destroy rootdg.26724.31359  (on rootdisk02)

 

Remove the incomplete mirror copy

 

/etc/vx/bin/vxbrk_rootmir -v rootdisk02

 

And mirror it back ,

/opt/VRTS/bin/vxrootmir -v -g rootdg rootdisk02

 

Tags: , , , ,

02 Oct 12 How to not blow up a vxvm boot HP-UX system when breaking the mirror

This is an improvement to fixing the problems if you do blow things up. Click here to see.

Here is the thing. VXvM is messed up on HP-UX. The mirror break command is broken on 11.23 and 11.31.

That being said depending on how you use it, you can have a mess to clean up or not.

Scenario:

[shmuel01]/root # vxdisk list
DEVICE TYPE DISK GROUP STATUS
c2t0d0 auto:hpdisk rootdisk02 rootdg online failing
c2t1d0 auto:hpdisk rootdisk01 rootdg online failing

Note the disks are supposedly failing. Easy fix, though I can’t say how long this will last.

[shmuel01]/root # vxedit -g rootdg set failing=off rootdisk01
[shmuel01]/root # vxedit -g rootdg set failing=off rootdisk02

Now we look at them.

[shmuel01]/root # vxdisk list
DEVICE TYPE DISK GROUP STATUS
c2t0d0 auto:hpdisk rootdisk02 rootdg online
c2t1d0 auto:hpdisk rootdisk01 rootdg online

Now they are fixed.

Now to the heart of the matter. Lets say you want to break c2t0d0 out of the mirror and say make a drd image. The man page and HP support says you can use this form.

/etc/vx/bin/vxbrk_rootmir -g rootdg -vb c2t0d0

If you use that form on many HP-UX systems the mirror break will fail and you will have a mess to clean up. If you want to prove your skills go ahead and use that form and click the link above to find the fix.

If you would rather look smart and say cruise the Internet, do this form.

/etc/vx/bin//vxbrk_rootmir -g rootdg -vb rootdisk02

You get the following UGLY results.

[shmuel01]/root # /etc/vx/bin//vxbrk_rootmir -g rootdg -vb rootdisk02
VxVM vxbrk_rootmir INFO V-5-2-4023 14:23: Checking specified disk(s) for presence and type
VxVM vxbrk_rootmir INFO V-5-2-4025 14:23: DA c2t0d0, DM rootdisk02 is a valid root mirror
VxVM vxbrk_rootmir INFO V-5-2-4052 14:23: Saving configuration data for later restoration
sed: Function s/plex=.*$/plex=homevol-02 cannot be parsed.
sed: Function s/plex=.*$/plex=lpvol-02 cannot be parsed.
sed: Function s/plex=.*$/plex=optvol-02 cannot be parsed.
sed: Function s/plex=.*$/plex=standvol-02 cannot be parsed.
sed: Function s/plex=.*$/plex=tmpvol-02 cannot be parsed.
sed: Function s/plex=.*$/plex=usrvol-02 cannot be parsed.
sed: Function s/plex=.*$/plex=varvol-02 cannot be parsed.
VxVM vxbrk_rootmir INFO V-5-2-4022 14:23: Breaking off root mirror on DA c2t0d0
VxVM vxbrk_rootmir INFO V-5-2-4054 14:23: Setting broken off mirror on c2t0d0 as unique root disk
VxVM vxbrk_rootmir INFO V-5-2-2566 14:23: Preparing disk c2t0d0 as a VxVM root disk
VxVM vxmake ERROR V-5-1-1173 Volume swvol already exists
VxVM vxbrk_rootmir ERROR V-5-2-4020 Attempting to recreate volume meta-data on rootdisk02/c2t0d0

However the only thing that actually goes wrong is removing the disk rootdisk02 from the roodg.

Easily fixed with a single command.

vxdg -g rootdg rmdisk rootdisk02

vxdisk list shows:

[shmuel01]/root # vxdisk list
DEVICE TYPE DISK GROUP STATUS
c2t0d0 auto:hpdisk – - online
c2t1d0 auto:hpdisk rootdisk01 rootdg online

A healthy ready for DRD cloning rootdg

[shmuel01]/root # vxprint -ht -g rootdg
DG NAME NCONFIG NLOG MINORS GROUP-ID
ST NAME STATE DM_CNT SPARE_CNT APPVOL_CNT
DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE
RV NAME RLINK_CNT KSTATE STATE PRIMARY DATAVOLS SRL
RL NAME RVG KSTATE STATE REM_HOST REM_DG REM_RLNK
CO NAME CACHEVOL KSTATE STATE
VT NAME NVOLUME KSTATE STATE
V NAME RVG/VSET/CO KSTATE STATE LENGTH READPOL PREFPLEX UTYPE
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE
SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE
SC NAME PLEX CACHE DISKOFFS LENGTH [COL/]OFF DEVICE MODE
DC NAME PARENTVOL LOGVOL
SP NAME SNAPVOL DCO

dg rootdg default default 0 1129312400.1025.loopback

dm rootdisk01 c2t1d0 auto 1024 143364644 -

v homevol – ENABLED ACTIVE 524288 SELECT – fsgen
pl homevol-01 homevol ENABLED ACTIVE 524288 CONCAT – RW
sd rootdisk01-04 homevol-01 rootdisk01 9961472 524288 0 c2t1d0 ENA
pl homevol-04 homevol ENABLED ACTIVE LOGONLY CONCAT – RW
sd rootdisk01-14 homevol-04 rootdisk01 35389473 33 LOG c2t1d0 ENA

v lpvol – ENABLED ACTIVE 524288 SELECT – fsgen
pl lpvol-01 lpvol ENABLED ACTIVE 524288 CONCAT – RW
sd rootdisk01-12 lpvol-01 rootdisk01 34865152 524288 0 c2t1d0 ENA
pl lpvol-04 lpvol ENABLED ACTIVE LOGONLY CONCAT – RW
sd rootdisk01-16 lpvol-04 rootdisk01 35389572 33 LOG c2t1d0 ENA

v optvol – ENABLED ACTIVE 4194304 SELECT – fsgen
pl optvol-01 optvol ENABLED ACTIVE 4194304 CONCAT – RW
sd rootdisk01-05 optvol-01 rootdisk01 10485760 4194304 0 c2t1d0 ENA
pl optvol-04 optvol ENABLED ACTIVE LOGONLY CONCAT – RW
sd rootdisk01-17 optvol-04 rootdisk01 35389605 66 LOG c2t1d0 ENA

v rootvol – ENABLED ACTIVE 1048576 ROUND – root
pl rootvol-01 rootvol ENABLED ACTIVE 1048576 CONCAT – RW
sd rootdisk01-03 rootvol-01 rootdisk01 8912896 1048576 0 c2t1d0 ENA

v standvol – ENABLED ACTIVE 524288 ROUND – fsgen
pl standvol-01 standvol ENABLED ACTIVE 524288 CONCAT – RW
sd rootdisk01-01 standvol-01 rootdisk01 0 524288 0 c2t1d0 ENA
pl standvol-04 standvol DETACHED ACTIVE LOGONLY CONCAT – RW
sd rootdisk01-18 standvol-04 rootdisk01 35389671 33 LOG c2t1d0 ENA

v swapvol – ENABLED ACTIVE 8388608 ROUND – swap
pl swapvol-01 swapvol ENABLED ACTIVE 8388608 CONCAT – RW
sd rootdisk01-02 swapvol-01 rootdisk01 524288 8388608 0 c2t1d0 ENA

v swvol – ENABLED ACTIVE 6291456 SELECT – fsgen
pl swvol-01 swvol ENABLED ACTIVE 6291456 CONCAT – RW
sd rootdisk01-10 swvol-01 rootdisk01 27525120 6291456 0 c2t1d0 ENA
pl swvol-03 swvol ENABLED ACTIVE LOGONLY CONCAT – RW
sd rootdisk01-06 swvol-03 rootdisk01 35389440 33 LOG c2t1d0 ENA

v tmpvol – ENABLED ACTIVE 2097152 SELECT – fsgen
pl tmpvol-01 tmpvol ENABLED ACTIVE 2097152 CONCAT – RW
sd rootdisk01-07 tmpvol-01 rootdisk01 14942208 2097152 0 c2t1d0 ENA
pl tmpvol-04 tmpvol ENABLED ACTIVE LOGONLY CONCAT – RW
sd rootdisk01-20 tmpvol-04 rootdisk01 35389737 33 LOG c2t1d0 ENA

v usrvol – ENABLED ACTIVE 5242880 SELECT – fsgen
pl usrvol-01 usrvol ENABLED ACTIVE 5242880 CONCAT – RW
sd rootdisk01-08 usrvol-01 rootdisk01 17039360 5242880 0 c2t1d0 ENA
pl usrvol-04 usrvol ENABLED ACTIVE LOGONLY CONCAT – RW
sd rootdisk01-21 usrvol-04 rootdisk01 35389770 66 LOG c2t1d0 ENA

v varvol – ENABLED ACTIVE 5242880 SELECT – fsgen
pl varvol-01 varvol ENABLED ACTIVE 5242880 CONCAT – RW
sd rootdisk01-09 varvol-01 rootdisk01 22282240 5242880 0 c2t1d0 ENA
pl varvol-04 varvol ENABLED ACTIVE LOGONLY CONCAT – RW
sd rootdisk01-22 varvol-04 rootdisk01 35389836 66 LOG c2t1d0 ENA

Tags: , , ,