1752782 Members
6320 Online
108789 Solutions
New Discussion юеВ

rename vg

 
SOLVED
Go to solution
Rambo_1
Regular Advisor

rename vg

Hi,
now ,I want to rename the vg03 to vg02,I have readed the Doc in this forums named :"Rename volume groups and logical volumes" ,the action plan as below:
1. umount /filesys (for each mounted filesys)

2. vgchange -a n /dev/vgname

3. vgexport -m mapfile /dev/vgname

4. vi mapfile (to set up new logical volume names)

5. mkdir /dev/vgnewname

6. mknod /dev/vgnewname/group c 64 0x

7. vgimport -m mapfile /dev/vgnewname /dev/dsk/cxtyd0

But the problem is I don't know how to do the 4 step
#vi mapfile (to set up new logical volume names), since there isn't the vgname in the vg03.map ,the vg's content as below ,
BH1#[/tmp]cat vg03.map
VGID 2eabea043deeb3af
1 lv_tempdb
2 lv_cm
3 lv_rt
4 lv_bt
5 lv_rtlog
6 lv_btlog
7 lv_other
8 lv_reserve
9 lv_master
10 lv_sysproc
BH1#[/tmp]

Thanks for your help

B.R
Rambo
4 REPLIES 4
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: rename vg

The vgname isn't in the mapfile; in fact, a mapfile is only needed if you are not using the standard lvol1, lvol2, ... convention. The vgname is derived from the /dev/vgxxx name. If you want to rename vg03 to vgMickey then you would create a directory /dev/vgMickey and then create a group device node /dev/vgMickkey/group c 64 0x030000 --- assuming that minor device 0x030000 is still available and unique. Only if you want to change the names of the LVOLS do you need to edit the mapfile. If not, your LVOL's will retain the same names but just now be under vgMickey.
If it ain't broke, I can fix that.
Sivakumar TS
Honored Contributor

Re: rename vg

Hi,

you dont have to modify the mapfile to change the vgname.

just export the VG

create a new folder for newvgname

create the group file

and import it.

With Regards,

Siva.
Nothing is Impossible !
Ajitkumar Rane
Trusted Contributor

Re: rename vg

Rambo,

The map file is only for if you are not using the standard lvol naming convention like lvol1...... which you are. Your VG name, when you import will depend on the VG name you give in the step 5,6,7.
The steps you have written are correct except step 4 which you should omit.
Dont forget to edit the /etc/fstab for the changes in VG name you made

Good Luck.

Ajit
Amidsts difficulties lie opportunities
Rambo_1
Regular Advisor

Re: rename vg

thanks for everyone !