Вы находитесь на странице: 1из 4

Veritas Cluster Server (VCS) Cheat sheet

October 19, 2007 by sun4u


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

Вам также может понравиться