Sunday, May 12, 2013

How to rename VCS resource or service group name

Recently I had to rename some service groups in my Veritas Cluster without restarting services running under its control.
I was little nervous because there was a huge database import ongoing I couldn't interrupt it.
Both hagrp and hares commands do not have built-in functionality to rename group/resource.
However there is an easy way of changing names without having cluster resources impacted.

First you need to stop the cluster using:
hastop -all -force
Important part is the "-force" option which allows cluster-controlled resources to stay online.
Now you can modify /etc/VRTSvcs/conf/config/main.cf file and change the name of group/resource.
Make sure it's changed everywhere (so if you have some dependencies or huge main.cf file it's best to search for every occurance of the original group/resource name).

Check if the modified config is still valid:
hacf -verify /etc/VRTSvcs/conf/config

If it's fine distribute new main.cf file to the other cluster nodes and start up cluster:
hastart

Finally verify if the new names are visible under running cluster:
hastatus -summary

No comments:

Post a Comment