Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

hagrp command - differences between disableresources/enableresources and -disable/enable

Created: 15 Aug 2012 • Updated: 18 Jan 2013 | 2 comments
George Sarantidis's picture
This issue has been solved. See solution.

Hi, 

 
I have installed a two node Veritas Cluster and  I would like to know when to use the hagrp -disableresources <service_group> 
and the hagrp -disable <service_group> commands?
 
I have noticed that the -disable option changes only the Enabled value of service group attributes and the -disableresources keeps
that value unattached and changes the Enabled value of the resources attributes.
 
Regards, 
George
Discussion Filed Under:

Comments 2 CommentsJump to latest comment

mikebounds's picture

Firstly, you don't use either of these commands very often, you normally use hagrp -freeze and this effectively disables the service group on all nodes.  Where you would use hagrp -disable is if you wanted to disable a service group on a particular system (as hagrp -freeze disables on all systems), but note if you want to disable all service groups on a particular system, you would use "hasys -freeze", so there are not many situation where you want to stop only a particular service group running on a particular node, so I have rarely used this.

hagrp -disable does not stop the monitor entry points running for the resources within the group and you may want to stop the monitor entry points running if what you are doing would cause errors for these monitor entry points.  For instance supposing you were upgrading an application and as part of this you remove application binaries, then the agent may put errors in the log (by default every 5 mins) to say the agent binaries are missing, so here it would be better to run hagrp -disableresources to avoid these errors.

Mike

UK Symantec Consultant in VCS, GCO, SF, VVR, VxAT on Solaris, AIX, HP-ux, Linux & Windows

If this post has answered your question then please click on "Mark as solution" link below

james_lobo's picture

 

 

Below is the difference between some hagrp command options. 

Hagrp –disable SG1:

  • SG1 cannot be brought online using VCS commands or switched if it is disabled.
  • Sets the Group::Enabled to 0.
  • A  disabled group which is online can be brought offline.
  • A disabled group can be brought online by bringing the resources of the group online outside VCS control
  • This command can be used to disable group on a specific system or on all the systems in the cluster

hagrp -disableresources SG1  :

  • Agents do not monitor group resources if resources are disabled.
  • Sets the Resource::Enabled to 0 for all resources in SG1
  • SG1 cannot be brought online as all the resources are disabled.
  • SG1 has to be offline to fire this command.
  • Disables resources of SG1 across the nodes in the cluster.

 

Hagrp – freeze [-persistent] service_group :

  • Freeze a service group to prevent it from failing over to another system.
  • This freezing process stops all online and offline procedures on the service group.
  • Note that if the service group is in ONLINE state and if you freeze the service group, then the group continues to remain in ONLINE state. 
  • Sets the Group::TFrozen to 1
  • TFrozen is cleared after a cluster restart.
  • Use the “-persistent” option to keep the group frozen even after a cluster restart.  Sets the Group::Frozen to 1

 

Hasys – freeze [-persistent] sys1 :

  • prevent groups from being brought online or switched on the system
  • Sets the System::TFrozen to 1
  • As in case of group freeze, Use the “-persistent” option to keep the system frozen even after a cluster restart.  Sets the System::Frozen to 1

 

If a user doesnot want a SG to be brought online on a node he can use “hagrp -disable”. Along with this if he wants to stop the monitor EP for all the resources of the SG – “hagrp –disableresources”  can be used.

 

Regards,

James