1753848 Members
8558 Online
108807 Solutions
New Discussion юеВ

vg group question

 
Lawrence Mau
Occasional Advisor

vg group question

Several of our Volume Groups have grown to
their disk capacity.
We have a Clariion unit that we just added
additional drives into, and created a new
lun that is twice the size of the old one.

I would like to know if it's possible to simple
create a new Volume Group, using the new larger
lun, name it "vgtest",
and then shutdown our application, copy the
existing volume group over to the new "larger"
one, and then rename the old one.

The goal is to move the vol-group to a new larger
one.

Thanks

 

 

P.S. this thread has been moved  from Servers > Planning to HP-UX > LVM - Hp forum Moderator

4 REPLIES 4
Steve White_8
Frequent Advisor

Re: vg group question

Hi Lawrence,

If it is possible I would add the new LUN to the volume group you want to move
your data to using the vgextend command. This will allow you to use the pvmove
command i.e. pvmove /dev/vg0x/lvolx /dev/dsk/cxtxdx

If your system has multiple volume groups then you will have more work
involved. If you want to provide more details about your system and the volume
group config send me an e-mail. With more details of what you are trying to do
I'm sure it will resolve.

whitest@navcanada.ca
Sudip Hore_1
Occasional Contributor

Re: vg group question

vgextend the new one to the existing VG
mirror it ....
and then take the old one out of the mirror
Dave Wherry
Esteemed Contributor

Re: vg group question

About the last post - that may not work the way you want it to. You said you created a new LUN that is twice as big as your old ones. If you accepted the defaults when you created the current volume group you will not be able to use all of the new LUN. vgcreate would have set Max PE to the size of the largest LUN you added during creation. If your largest LUN was 4GB, that would be the largest LUN you could use in that volume group. If your new LUN is say 8GB, you can still add it to the volume group. However, you will only be able to use 4GB of it.
The first post of creating a new volume group and using pvmove will work better.
On the other hand, if your volume group is not too big to begin with, consider backing it up. Delete everything and recreating it with the new LUN. Then restore everything. The advantage to this is none of your paths change. It's still the same volume group name. You can have the same logical volumes. Maybe you'll also want to resize some logical volumes at the same time. Your documentation doesn't change. It all depends on your environment.
One other thing about the pvmove method. HP suggests you do an fsck on any file systems that are included in the pvmove. So, you may need downtime to complete that also.
Dave Wherry
Esteemed Contributor

Re: vg group question

Hold on. I thought about this a little more and pvmove will not work the way described here. The suggestion was to add the new LUN to the volume group you want to move your data to. pvmove only works within the same volume group. If you put the LUN in another volume group, you can not pvmove the data over to it.
If you add the new LUN to the existing volume group you will likely not be able to use all of the LUN.
I suggest you back it up. Rebuild the volume group with the new LUN and then restore.
If that is too large of a task you may just need to create a new volume group with the new LUN and move some of the data from the old volume group. Break it up.