Operating System - HP-UX
1843946 Members
2019 Online
110226 Solutions
New Discussion

Change name of volume group

 
SOLVED
Go to solution
Marcelo De Florio_1
Frequent Advisor

Change name of volume group

How can i change a name of volumen group?

MDF
Marcelo De Florio
6 REPLIES 6
Andi Rigauer
Regular Advisor

Re: Change name of volume group

Hi Marcelo,

have you already tried it with the SAM?
perhaps this works. Ok then you can look
in the man's of the VG commands under /usr/sbin.
I would remove it and create a new one
god, root where's the difference
James R. Ferguson
Acclaimed Contributor
Solution

Re: Change name of volume group

Hi:

This isn't tricky. Simply do this:

# unmount all associated logical volumes in the volume group to be changed

# vgchange -a n /dev/oldvgname

# vgexport ???m /tmp/vgoldname.map /dev/oldvgname

# mkdir /dev/newvgname

# mknod /dev/newvgname/group c 64 0x0X0000 (where X is a unique number not already used)

# vgimport ???m /tmp/vgoldmapfile /dev/newvgname /dev/dsk/

# vgchange -a y /dev/newvgname

Regards!

...JRF...
Roger Baptiste
Honored Contributor

Re: Change name of volume group

hi,


bdf |grep vgxx

umount all the FS''s belonging to the VGxx.

Also, make sure it has no raw lv''s which are being used.

ll /dev/vgxx/group >/tmp/vgxx-ls

vgexport -v -m /tmp/vgxx.map /dev/vgxx

mkdir /dev/vgyy
mknod /dev/vgyy/group c 64 0x??0000

vgimport -v -m /tmp/vgxx.map /dev/vgyy

***

-raj
Take it easy.
Vincent Farrugia
Honored Contributor

Re: Change name of volume group

Hello,

I think you cannot do it. Even using vgexport and vgimport... I think the machine would still be expecting the original name and may complain. I would remove it and create it again.
Tape Drives RULE!!!
Vincent Farrugia
Honored Contributor

Re: Change name of volume group

But if JRF says you can, then you can. I just didn't want to try it and having to boot an ignite tape immediately afterwards.

You always learn new things through here :-)

Vince
Tape Drives RULE!!!
Frederic Sevestre
Honored Contributor

Re: Change name of volume group

Hi,
JRF's way of renaming vg works fine.
Don't forget to modify the fstab if there is filesystems on the vg.
Fr??d??ric
Crime doesn't pay...does that mean that my job is a crime ?