Saturday, December 7, 2019

VCS Administration with commands

VCS Administration with command line




VCS Quick-start wizard                   
# $VCS_HOME/wizards/config/quick_start
VCS Quick-NFS wizard                    
# $VCS_HOME/wizards/services/quick_nfs
Verify LLT                              
# /sbin/llstat -n
Get interface MAC Address               
# /opt/VRTSllt/getmac device_name
Check network connectivity              
# /opt/VRTSllt/dlpiping -s|-c -v device_name
Verify GAB                              
# /sbin/gabconfig -a ; /sbin/gabconfig -l
List systems in cluster                 
# /opt/VRTSvcs/bin/hasys -list
Detailed info on each cluster node      
# /opt/VRTSvcs/bin/hasys -display (sysname)
Increase system count in gabtab startup 
# /opt/VRTSvcs/bin/hasys -add (sysname)
Delete a system                         
# /opt/VRTSvcs/bin/hasys -delete (sysname)
Start VCS cluster                       
# /opt/VRTSvcs/bin/hastart
Force start a stale VCS cluster         
# /opt/VRTSvcs/bin/hastart -force -stale
Stop VCS on all systems                 
# /opt/VRTSvcs/bin/hastop -all
Stop VCS had, keep srvc-groups running  
# /opt/VRTSvcs/bin/hastop -local -force
Stop VCS, migrate srvc-groups to sysname
# /opt/VRTSvcs/bin/hastop -sys (sysname) -evacuate
Provide continual status of service grps
# /opt/VRTSvcs/bin/hastatus
Verify status of service groups         
# /opt/VRTSvcs/bin/hastatus -summary
Check for syntax errors in main.cf      
# /opt/VRTSvcs/bin/hacf -verify /etc/VRTSvcs/conf/config/main.cf
Generate dependency tree in main.cf     
# /opt/VRTSvcs/bin/hacf -generate /etc/VRTSvcs/conf/config/main.cf
List all resources                      
# /opt/VRTSvcs/bin/hares -list
List a resource's dependencies          
# /opt/VRTSvcs/bin/hares -dep (resource_name)
Get detailed info on a resource         
# /opt/VRTSvcs/bin/hares -display (resource)
Add a resource                          
# /opt/VRTSvcs/bin/hares -add (resource_name (resource_type (service_group)
Modify attributes of the new resource   
# /opt/VRTSvcs/bin/hares -modify (resource_name (attribute_name (value)
Delete a resource                       
# /opt/VRTSvcs/bin/hares -delete (resource_name)
Online a resource                       
# /opt/VRTSvcs/bin/hares -online (resource_name) -sys (system_name)
Offline a resource                      
# /opt/VRTSvcs/bin/hares -offline (resource_name) -sys (system_name)
Monitor resource on a system            
# /opt/VRTSvcs/bin/hares -probe (resource_name) -sys (system_name)
Clear a faulted resource                 
# /opt/VRTSvcs/bin/hares -clear (resource_name) [-sys system_name]
Make a resource's attribute value local 
# /opt/VRTSvcs/bin/hares -local (resource_name) (attribute_name) value)
Make a resource's attribute value global
# /opt/VRTSvcs/bin/hares -global (resource_name) (attribute_name) value)
Specify a dependency between 2 resources
# /opt/VRTSvcs/bin/hares -link (parent_res) (child_res)
Remove dependency between 2 resources   
# /opt/VRTSvcs/bin/hares -unlink (parent_res) (child_res)
Modify a Share res. by adding options   
# /opt/VRTSvcs/bin/hares Share_cicgt-as4-p_apps Options "%-o rw,root=dcsa-cln1"
List all service groups                 
# /opt/VRTSvcs/bin/hagrp -list
List a service group's resources         
# /opt/VRTSvcs/bin/hagrp -resources [service_group]
List a service group's dependencies     
# /opt/VRTSvcs/bin/hagrp -dep [service_group]
Detailed info about a service group     
# /opt/VRTSvcs/bin/hagrp -display [service_group]
Start service group, bring res. online  
# /opt/VRTSvcs/bin/hagrp -online (service_group) -sys (system_name)
Stop service group, bring res. offline  
# /opt/VRTSvcs/bin/hagrp -offline (service_group) -sys (system_name)
Switch service group between nodes      
# /opt/VRTSvcs/bin/hagrp -switch (service_group) -to (system_name)
Freeze svcgroup, (disable onl. & offl.) 
# /opt/VRTSvcs/bin/hagrp -freeze (service_group) [-persistent]
Thaw a svcgroup, (enable onl. & offl.)  
# /opt/VRTSvcs/bin/hagrp -unfreeze (service_group) [-persistent]
Enable a service group                  
# /opt/VRTSvcs/bin/hagrp -enable (service_group) [-sys system_name]
Disable a service group                 
# /opt/VRTSvcs/bin/hagrp -disable (service_group) [-sys system_name]
Enable all resources in a service group 
# /opt/VRTSvcs/bin/hagrp -enableresources (service_group)
Disable all resources in a service group
# /opt/VRTSvcs/bin/hagrp -disableresources (service_group)
Specify dependenciy between 2 svc groups
# /opt/VRTSvcs/bin/hagrp -link (parent_group) (child_group) (relationship)
Remove dependenciy between 2 svc groups 
# /opt/VRTSvcs/bin/hagrp -unlink (parent_group) (child_group)
Auto-Enable a servicegroup marked       
# /opt/VRTSvcs/bin/hagrp -autoenable (service_group) [-sys system_name]
List resource types                     
# /opt/VRTSvcs/bin/hatype -list
Detailed info on a resource type        
# /opt/VRTSvcs/bin/hatype -display (resource_type)
List all resources of a part. type      
# /opt/VRTSvcs/bin/hatype -resources (resource_type)
Add a resource type                     
# /opt/VRTSvcs/bin/hatype -add (resource_type)
Set static attribute values             
# /opt/VRTSvcs/bin/hatype -modify ...
Delete a resource type                   
# /opt/VRTSvcs/bin/hatype -delete (resource_type)
Delete a Entry in a Type definition     
# /opt/VRTSvcs/bin/haattr -delete (resource_type) (attribute_name)
Set VCS configuration file to r/w mode  
# /opt/VRTSvcs/bin/haconf -makerw
Set VCS configuration file to read mode 
# /opt/VRTSvcs/bin/haconf -dump -makero
Add a user with r/w access to VCS       
# /opt/VRTSvcs/bin/hauser -add (user_name)
Add a user with read access only to VCS 
# /opt/VRTSvcs/bin/hauser -add VCSGuest
Update a user                           
# /opt/VRTSvcs/bin/hauser -update (user_name)
Delete a user                           
# /opt/VRTSvcs/bin/hauser -delete (user_name)
Display all users                       
# /opt/VRTSvcs/bin/hauser -display
Start agents manually                   
# haagent -start (agent_name) -sys (system_name)
Stop agents manually                    
# haagent -stop (agent_name) -sys (system_name)
Start Cluster Manager                   
# /opt/VRTSvcs/bin/hagui
Start Cluster Manager in debug mode     
# /opt/VRTSvcs/bin/hagui -D

Saturday, November 30, 2019

How to create a system wpar in aix?

How to create a system wpar in aix?


mkwpar -n mywpar -h mywpar -N interface=en0 address=<ip addr> netmask=255.255.255.0 -r -R shares_CPU=10 CPU=6%-30%,45% shares_memory=20 memory=5%-10%,20% totalprocesses=128 totalThreads=512 -A -S

n = wpar name
h = wpar hostname
N = network information
interface = device name
address = IP address
netmask = netmask
r = copy name resolution info (/etc/resolv.conf) from global system
R = resource informatioin
shares_CPU =  number of CPU shares available to this WPAR
CPU = Min%-Softmax%, Hardmax%
Totalprocesses = Total processes per user (MAXUPROC) (0 user)
totalThreads = Total threads per user
A = Start wpar when /etc/rc.wpars is exec d (start at boot)
S = activate wpar upon creation


# hostname   (It will list out the global environemnt hostname)
#clogin <wpar_name>    (To login to the newly created wpar)
#hostname    (It will list out the wpar name)


How to start / stop / remove the wpar?

How to start / stop / remove the wpar?



To list wpar:  # lswpar
To shutdown wpar:  #stopwpar -F <wpar_name>  (or) stopwpar -Fv <wpar_name>
To reboot wpar:   #stopwpar -F -r <wpar_name>
To remove wpar:  #rmwpar <wpar_name>


#lswpar
#startwpar <wpar_name>  (or)  # startwpar -v <wpar_name>
#stopwpar <wpar_name>  (or)  # stopwpar -F -r <wpar_name>
#rmwpar <wpar_name>