Forum Discussion

SherbertPunt's avatar
11 years ago

Moving a Resource from One Service Group to another..?

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 ...
  • mikebounds's avatar
    11 years ago

    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

     

  • AHerr's avatar
    11 years ago

    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