Feeds:
Posts
Comments

Archive for the ‘VCS’ Category

VCS config files

/etc/VRTSvcs/conf/config/main.cf
config file for vcs, usually changed using hagui or haclus command. 
Once cluster is live, config is in memory, and this file is only backup. 
Changes to it will be ignored if cluster is up. Cluster start does read this file, 
so easy manual chage of config if cluster is down.
/etc/init.d/vx*
vxvm-relocover
 starts several deamon, which also take argument and email root at local machines.
 change these!
3 files in /etc need to be copied to each of the node in the cluster
(rsh of install should create these if doing multinode install w/ install script).
/etc/llttab ::
set-node oaprod1 # diff for each node, reflect local node name
set-cluster 1
link ce1 /dev/ce:1 – ether – –
link ce3 /dev/ce:3 – ether – –
link-lowpri ce0 /dev/ce:0 – ether – – 

/etc/llthosts ::
0 oaprod1
1 oaprod2 

/etc/gabtab ::
/sbin/gabconfig -c -n2

Advertisements

Read Full Post »

Veritas Cluster Config

gabconfig -a : display link config info.  a = ??gab port, ie loaded ok by kernel.    
b = iofencing port.  h = cluster port. 

GAB Port Memberships
===============================================================
Port a gen   1ea001 membership 01
Port b gen   1ea00f membership 01
Port h gen   1ea012 membership 01
vxfenadm -i  /dev/rdsk/emcpower0c
  Display serial number of the device (LUN, disk)
vxfenadm -g  /dev/rdsk/emcpower0c
  Show IO Fencing info
graceful shutdown of cluster
hastop -all
# stop vcs for the whole cluster, ready for both machine to shutdown.
hastop -local
# stop vcs on local machine only, it will stop the services, no migration by default.
hastop -local -evacuate 
# stop vcs, migrate (evacuate) service to another node
# evacuate a single node, just single node clean exit out of cluster.
hastatus # monitor cluster status, no arg act like tail -f
  -sum # display summary and exit.

lltstat  # general summary
 -nvv # see cluster interconnect link info (heartbeat).

hares -online Mount_u02 -sys oaprod1   
# online the give resource at the specified system
# resource name is as per config (Main.cf)
# resource and group name are listed by hastatus cmd.  
hares -offline Oracle_oaprod -sys oaprod2 
# offline the whole resrouce group on the specified system
# migration to another node will NOT happen for -offline.
 hagrp -switch oracle_group -to oaprod1   
# switch a service group to the specified system hares -modify Oracle_oaprod Owner oracle 
# change resouce=Oracle_oaprod attribute=Owner new_value=oracle
haconf -dump       
# save vcs config to Main.cf (edited via special command)
# do not edit Main.cf while cluster is up, it will be ignored. haconf -dump -makero    
# equiv of “close config” of hagui, config still kept by conf editor

seq of offline commands:
hares -offline Netlsnr_oaprod -sys oaprod2
hares -offline Oracle_oaprod  -sys oaprod2
hares -offline Mount_u02      -sys oaprod2
hares -offline Mount_u03      -sys oaprod2
hares -offline Volume_u02     -sys oaprod2
hares -offline Volume_u03     -sys oaprod2
hares -offline DiskGroup_oracledg -sys oaprod2  
# some sort of high level container wrapper.
hares -offline IPMultiNICB_oaprod -sys oaprod2
hares -clear   Oracle_oaprod  -sys oaprod1
hares -online  Oracle_oaprod  -sys oaprod1  
 # bring up oracle service group, w/ all deps
hagrp -switch  oracle_group   -to  oaprod2

config eg, for adding oracle test group.

haconf -makerw
hagrp -freeze oracle_group
hares -modify Oracle_oaprod User veritas_monitor
hares -modify Oracle_oaprod Pword veritas_password
hares -modify Oracle_oaprod Table monitor
hares -modify Oracle_oaprod MonScript “./bin/Oracle/SqlTest.pl”
hares -modify Oracle_oaprod DetailMonitor 1
haconf -dump -makero
hagrp -unfreeze oracle_group

config commands (typically located in /opt/VRTS/bin):

hacf -verify /etc/VRTSvcs/conf/config/
 verify that the main.cf config file is correct, parseable.

haconf -makerw
turn config to be read write, so that changes can be made via haclus
haconf -dump -makero
save and close config from rw, must remember to do this, or else reboot will have issues!
haclus …
change cluster config param.  (CLI change instead of gui).

hauser -add vcsuser
Add a new user that can use hagui, it will prompt for the new password of the new user.

Read Full Post »

Creating Service Group

# haconf -makerw àTo open Cluster configuration

#hagrp -add <service_group_name> àTo create service group

#hagrp -modify <service_group_name> SystemList <System1> 1 <System2> 2

To Allow service group to run in two system with priority 1 to system1

#hagrp -modify <service_group_name> AutoStartList <System1>

To allow system 1 to start specified service group.

#hagrp -display <service_group_name>

To verify service group can auto start and

it is a failover service group.

#haconf -dump -makero

à To save cluster and make configuration

file main.cf read only.

#view /etc/VRTSvcs/conf/config/main.cf

To view configuration file for changes

Adding Resources to a Service Group – Nic

#hares -makerw

#hares -add <nameNIC1> NIC <service_group_name>

#hares -modify <nameNIC1> Critical 0 (zero)

#hares -modify <nameNIC1> Device <interface>

#hares -modify <nameNIC1> Enabled 1

#hares -online <nameNIC1> -sys <system1>

#hares -display <nameNIC1>

#haconf -dump

#view /etc/VRTSvcs/conf/config/main.cf

Adding Resources to a Service Group — IP

#hares -add <nameIP1> IP <service_group_name>

#hares -modify <nameIP1> Critical 0 (zero)

#hares -modify <nameIP1> Device <interface>

#hares -modify <nameIP1> Address <IP_address>

#hares -modify <nameIP1> Enabled 1

#hares -online <nameIP1> -sys <system1>

#hares -display <nameIP1>

#ifconfig -a

#haconf -dump

#view /etc/VRTSvcs/conf/config/main.cf

Adding Resources to a Service Group – Disk Group

#hares -add <nameDG1> DiskGroup <service_group_name>

#hares -modify < nameDG1> Critical 0 (zero)

#hares -modify < nameDG1> DiskGroup < nameDG1>

#hares -modify < nameDG1> Enabled 1

#hares -online < nameDG1> -sys <system1>

#hares -display < nameDG1 >

#vxprint -g <nameDG1>

#haconf -dump

#view /etc/VRTSvcs/conf/config/main.cf

Adding Resources to a Service Group – Disk Volume

#hares -add <nameVOL1> Volume <service_group_name>

#hares -modify < nameVOL1> Critical 0 (zero)

#hares -modify < nameVOL1> Volume < nameVOL1>

#hares -modify < nameVOL1> DiskGroup < nameDG1>

#hares -modify < nameVOL1> Enabled 1

#hares -online < nameVOL1> -sys <system1>

#hares -display < nameVOL1 >

#vxprint -g <nameDG1>

#haconf -dump

#view /etc/VRTSvcs/conf/config/main.cf

Adding Resources to a Service Group – Mount

#hares -add <nameMount1> Mount <service_group_name>

#hares -modify < nameMount1> Critical 0 (zero)

#hares -modify < nameMount1> BlockDevice < path_nameVOL1>

#hares -modify < nameMount1> MountPoint < mount_point>

#hares -modify <nameMount1> FSType vxfs

#hares -modify <nameMount1> FsckOpt %<-y/-n>

#hares -modify < nameMOunt1> Enabled 1

#hares -online < nameMount1> -sys <system1>

#hares -display < nameMount1>

#mount

#haconf -dump

#view /etc/VRTSvcs/conf/config/main.cf

Adding Resources to a Service Group – Process Resource

#hares -add <nameProcess1> Process <service_group_name>

#hares -modify < nameProcess1> Critical 0 (zero)

#hares -modify < nameProcess1> Pathname < /bin/sh>

#hares -modify < nameProcess1> Arguments < “/name1/loopy spacename 1”>

#hares -modify < nameProcess1> Enabled 1

#hares -online < nameProcess1> -sys <system1>

#hares -display < nameProcess1 >

#haconf -dump

#view /etc/VRTSvcs/conf/config/main.cf

Linking Resources in Service Group

#hares -link <nameIP1> <nameNIC1>

#hares -link <nameVol1> <nameDG1>

#hares -link <nameMount1> <nameVOL1>

#hares -link <nameProcess1> <nameIP1>

#hares -link <nameProcess1> <nameMount1>

#hares -dep

#hares -dump

#view /etc/VRTSvcs/conf/config/main.cf

Testing the Service Group

#hagrp -switch <service_group_name> -to <system2>

#hastatus -system

#hagrp -switch <service_group_name> -to <system1>

#hastatus -summary

Setting Resources to Critical

#hares -modify <nameNIC1> Critical 1

#hares -modify <nameIP1> Critical 1

#hares -modify <nameDG1> Critical 1

#hares -modify <nameVOL1> Critical 1

#hares -modify <nameMount1> Critical 1

#hares -modify <nameProcess1> Critical 1

#haconf -dump

#view /etc/VRTSvcs/conf/config/main.cf

#haconf -dump -makero

Read Full Post »