We have SFHA 6.0 installed on Solaris 10. We have changed the hostname of the solaris server and hence I need to change the diskgroup id of a particular diskgroup. What will be the command or procedure for this?
I have enabled the newhostname using vxdctl hostid, but the diskgroup does not changes after this.
You don't need to change the ID - this is just a unique identifier, so for instance in a cluster the ID will have the hostname embedded in it for the host where the diskgroup was created, but this still means it is perfectly ok to import on other nodes in the cluster.
not to my knowledge .. even the vxedit -g <dg> set options doesn't have attribute to modify this.
I have not really tried if dg id changes if you deport & import diskgroup with a new name. Else, dgid will only change if dg is destroyed & recreated but you wouldn't really want to do that unless there is a major problem because of DG ID.
For SF, You may need update volboot :
Update the volboot file and the hostid field of all the disks that are part of an imported disk group.
# vxdctl hostid [new hostid]
For cluster, more work need do.
Note the script link provided by Novonil is doing what Gaurav says you would need to do which is to destroy and recreate the diskgroup - this does this with the data intact (in theory !) as detroying a diskgroup only removes the private region so if you recreate diskgroup with exact same volume boundaries, then data is ok.
The script seems well written with some inbuilt error checking but I would not recommend using this script as there are still risks to your data and changing the diskgroup id in your case is just for cosmetic reasons, rather than a necessity for which this script is provided when taking clones of a diskgroup (where if the script fails, you still have original diskgroup so you don't loose data).
vxdg -C import dgname
If it is certain that a disk is not in use by another host (for example, because a disk group was not
cleanly deported), use the -C option to clear the existing host ID on all disks in the disk group
upon import. A host ID can also be cleared using vxdisk clearimport.
This technote is for diskgroup id change: You just need to run the script.
Following details for Cluster-ID change: