1834163 Members
3396 Online
110064 Solutions
New Discussion

Renaming Volume groups

 
SOLVED
Go to solution
Gerardo Mora
Advisor

Renaming Volume groups

Hi!

I have 2 servers connected to a XP-256 disk array using HP-UX 11.0, I need to move all of the volume groups from server A to server B except VG00, I would like to export them from server A and then import them to server B using a map file, ex.: vgimport -v -s -m vg01.map vg01, but some of the volume groups names of server A exists in B

Is possible rename the volume groups name at the import time or how can do that?

Thanks!
share to learn
5 REPLIES 5
Jordan Bean
Honored Contributor
Solution

Re: Renaming Volume groups

Yes, you may use a different vg name during import. For example:

mkdir /dev/vg05
mknod /dev/vg05/group c 64 0x050000
vgimport -v -s -m vg01.map /dev/vg05

John Poff
Honored Contributor

Re: Renaming Volume groups

Hi,

You can rename them when you vgimport them on the second box. You'll have to make the directory for the new volume group under /dev any way, and you can give it the new name then. LVM doesn't care what you name it, as long as it is unique and the vg has a unique minor number for the group file.

JP
James R. Ferguson
Acclaimed Contributor

Re: Renaming Volume groups

Hi:

Renaming a volume group at the time you 'vgimport' it is easily done.

Simply specify the new name in the 'vgimport' command -- it doesn't matter what the old name was.

Regards!

...JRF...
Brian M Rawlings
Honored Contributor

Re: Renaming Volume groups

One thing to note: if you use a map file, your LVOLs will have the same names they had on the old system. You can 'cat' the map file, there's no real magic there, it is just the names of the LVOLs, so they don't get set back to LVM defaults.

If you import an exported volume group without the map file (vgscan, etc), LVM will just give the LVOLs its default names (lvol0, lvol1, etc, in order).

As has been pointed out, it is easy to rename the VG upon import, but you didn't mention whether or not you want to keep the LVOL names, which can ge changed as well at this time, if needed.

Hope it helps!! --bmr
We must indeed all hang together, or, most assuredly, we shall all hang separately. (Benjamin Franklin)
Gerardo Mora
Advisor

Re: Renaming Volume groups

Thanks to every body!
share to learn