02-06-2014 08:02 AM
Folks,
I would like to know whether or not it is possible to move a resource from one Service Group to another.. I have a test cluster and I have got as far this in my test cluster, I want to move anything starting with burty to a new service group called burty_sg
Many thanks for any pointers my plan is to delete and recreate the resource in the new group. modifying the main.cf i think would not be a good idea as I believe you would have to stop the cluster and that seems rather drastic..
Kind Regards
group resource system message --------------- -------------------- -------------------- -------------------- rhel01 RUNNING rhel02 RUNNING seb_apache rhel01 PARTIAL seb_apache rhel02 OFFLINE ------------------------------------------------------------------------- burty_sg rhel01 OFFLINE burty_sg rhel02 OFFLINE seb_apache_rsc rhel01 OFFLINE seb_apache_rsc rhel02 OFFLINE burtyIP rhel01 ONLINE ------------------------------------------------------------------------- burtyIP rhel02 OFFLINE burtyNIC rhel01 ONLINE burtyNIC rhel02 ONLINE seb_apache_rsc rhel01 WAITING FOR ONLINE seb_apache_rsc rhel01 ONLINE ------------------------------------------------------------------------- seb_apache rhel01 ONLINE
Solved! Go to Solution.
02-06-2014 09:14 AM
In the VCS Java GUI, you can cut and paste resource between service groups.
From the command line:
cd /etc/VRTSvcs/conf/config hacf -verify . # this creates main.cmd grep "^hares.* burty*" main.cmd > burty.cmd # check burty.cmd contains resources you want to move and change group name in "hares -add" line to your new group awk '/^hares -add burty/ {print "hares -delete "$3}' burty.cmd > burty_del.cmd # check burty_del.cmd contains commands to delete resources chmod a+x burty*cmd # Now run cmd files to delete and recreate resources: burty_del.cmd burty.cmd
Mike
02-06-2014 09:26 AM
If you run # hastop -all -force, you can bring the cluster down without stopping the application.
At that point, move the resource within the main.cf from one SG to another.
When done, verify the cluster config is consistent (run #hacf -verify . ; from the /etc/VRTSvcs/conf/config directory).
Now when you startup the cluster, the resource should be moved without stopping the cluster.
You could also persistently freeze the cluster to ensure nothing changes when the cluster is started.
Regards,
Anthony
02-06-2014 09:14 AM
In the VCS Java GUI, you can cut and paste resource between service groups.
From the command line:
cd /etc/VRTSvcs/conf/config hacf -verify . # this creates main.cmd grep "^hares.* burty*" main.cmd > burty.cmd # check burty.cmd contains resources you want to move and change group name in "hares -add" line to your new group awk '/^hares -add burty/ {print "hares -delete "$3}' burty.cmd > burty_del.cmd # check burty_del.cmd contains commands to delete resources chmod a+x burty*cmd # Now run cmd files to delete and recreate resources: burty_del.cmd burty.cmd
Mike
02-06-2014 09:26 AM
If you run # hastop -all -force, you can bring the cluster down without stopping the application.
At that point, move the resource within the main.cf from one SG to another.
When done, verify the cluster config is consistent (run #hacf -verify . ; from the /etc/VRTSvcs/conf/config directory).
Now when you startup the cluster, the resource should be moved without stopping the cluster.
You could also persistently freeze the cluster to ensure nothing changes when the cluster is started.
Regards,
Anthony
02-06-2014 09:35 AM
Hi Anthony & Mike,
Thanks for your help, I will test it out and post the results :)
--SherbertPunt ... anag! :)
02-06-2014 10:12 AM
After testing the solution - hey presto - thanks Guys :)
[root@rhel01 config]# hagrp -resources burty_sg burtyIP burtyNIC [root@rhel01 config]# hagrp -resources seb_apache seb_apache_rsc [root@rhel01 config]#