Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing the group id of a VxVM disk group

Status
Not open for further replies.

huebs

Technical User
Jan 15, 2005
111
DE
Does anybody know a way to change the group id of a veritas volume manager (4.0) disk group?

A group was copied using HDS Shadow Image to another bunch of disks and importet on the target system with a new name. The group ids remain identical ... which is fatal if a host sees both disk groups, and our backup server has to do [sad]

Some sources in the web say it can't be done, others mention vxprivutil. I can't find any detailed docs about this tool.
 
Provided you can still import the disk group from one of the hosts, you can rename the disk group by deporting it and re-importing it with vxdg -n newname oldname.

Annihilannic.
 
Duh. vxdg -n newname import oldname.

I notice you can also rename it on deport with v4.0.

Annihilannic.
 
That's what I did during the import procedure on the target host. The name changed, the problem is the ID, which remains the same.
 
To describe it in detail:

Code:
oldhost# vxdg list oldname-dg
Group:    oldname-dg
dgid:     1234567890.1234.oldhost
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...

newhost# vxdg list newname-dg
Group:    newname-dg
dgid:     1234567890.1234.oldhost
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...

The dgid is exactly the same in both groups and does not change on "import newname".
 
To work around the problem, I finally splitted the mirrors, created a new dg with half of the disks and copied the data using cpio.

If somebody knows a way to change this disk group id, please let me know!

Thanks,
Huebs
===
 
Sorry, I thought that changed the disk group ID as well.

Here's another option:

Code:
# save objects in disk group to file
vxprint -g diskgroup -vpsm > /tmp/dgfile
vxdisk -g diskgroup list > /tmp/disks

# destroy original disk group (data remains on disks)
vxdg destroy diskgroup

# re-create disk group (generates new dgid)
vxdg init diskgroup somediskname=cXtXdX

# re-add remaining disks (refer to /tmp/disks)
vxdg -g diskgroup adddisk anotherdiskname=cXtXdX

# re-create volume manager objects from saved file
vxmake -g diskgroup < /tmp/dgfile

# re-start volumes
vxvol -g diskgroup startall

I take no responsibility if it goes wrong! :)

Annihilannic.
 
Thanks Annihilannic,

I wrote a script like this to move volumes to another disk group (print,destroy,make) ... already tried it to change the group id without success.
I'll give it another try on a test system.

Huebs
===
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top