Operating System - HP-UX
1826474 Members
3923 Online
109692 Solutions
New Discussion

Pvmove from 2 disks to one greater lun

 
SOLVED
Go to solution
Alexander Meyer
Occasional Contributor

Pvmove from 2 disks to one greater lun

Hi there,

System: HPUX 11.11
vg: 2 disks, one lvol which i have to move from two disks to a bigger one - mostly online.

i used the pvmove some times before but now i have a problem concerning the vg i have to reorganize.

Usually we set the max_pe per pv parameter to a high enough value to extend our vgs also with bigger disks.

But this vg is not properly configured.

I have two disks in this vg, one with 22397 PEs and another one with 7998 PEs. Unfortunately the vg was created with the 22397 PE-disk and so it's value for "max pe per pv" is set to 22399.

It is important to keep the database online, so i dont have much time for offline actions.

Is there a way to extend the max_pe per pv - parameter online? I dont think so, but i am no specialist.

Is there a workaround for my problem?

A way to deactivate the vg for some minutes and edit it's parameters - bring it back online and pvmove the physical extents of lvol1 to the new disk?

Thanks in advance,

Alex
6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: Pvmove from 2 disks to one greater lun

Shalom Alex,

The problem here is the volume group was not set up right and can not be modified after creation.

You must create a new volume group with proper parameters, I suggest -p and this problem will not happen.

I'm still ambivalent about pvmove and hope you have a good backup before you start.

There is in this case no avoiding vgcreate.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Jeeshan
Honored Contributor

Re: Pvmove from 2 disks to one greater lun

Deepak Kr
Respected Contributor

Re: Pvmove from 2 disks to one greater lun

You can refer to following doc for more info:
http://h20000.www2.hp.com/bc/docs/support/SupportManual/c01920387/c01920387.pdf (BSC link updated by admin)

but in this case as already said you better create vg again with required parameters.

"There is always some scope for improvement"
Alexander Meyer
Occasional Contributor

Re: Pvmove from 2 disks to one greater lun

Thanks Steven,

so i'll create a new vgxx like this:
vgcreate -e 50000 (does this parameter has negative side effects the higher i set it?) and restore old data to this newly created vg?

I'll backup the complete data for sure as it's an importanta database ;).

But maybe i can export vg01:
umount /path
vgchange -a n vg01
vgexport -m vg01.map -f pv.out vg01

create it new with:
mkdir /dev/vg01
mknod /dev/vg01/group c 64 0x010000
pvcreate /dev/rdsk/newdisk

and after this i create the new vg at first without any disk by:
vgcreate -e 65500 /dev/dsk/newdisk

Is it possible to import the old two disks again using a kind of vgscan or vgimport on these disks?

vgimport -m vg01.map -f pv.out vg01

After that i could perform the pvmove command as well. But i think that vgimport is not possible after performing vgcreate on vg01...

It is highly important to reduce downtime on this database. And it is highly annoying that someone created this vg so faulty :(.
Bill Hassell
Honored Contributor
Solution

Re: Pvmove from 2 disks to one greater lun

Because you are running 11.11, the vgmodify command is not available, so changing the max-pe count is not possible.

> vgcreate -e 50000 (does this parameter has negative side effects the higher i set it?

I don't like very large extent counts (more than 10,000). While it is true that max_pe can be up to 65,000, I would change two parameters in the new volume group: max_pe and pe_size. The default for pe_size is 4 MB, way too small for today's disks. I would use a minimum of 32 MB and perhaps 64 MB for the pe_size. Then max_pe can be quite a bit smaller for a large disk (such as 500 GB).

However, there is no possible way to avoid down time unless you can add small disks. Using vgexport will not do anything. The reason is that all the configuration details are stored on each disk. vgimport simply restores the same information. The vgcreate command is the only way to adjust pe_size and max_pe. What this means is that you must shutdown the application(s), backup all the data, then vgexport the VG. Then vgcreate a new VG with the correct parameters, assign the lvols and restore all the data from your backup. Note that if you have enough disk space, the backup could be copied between the old and the new VG, otherwise, use tape.

Unfortunately, vgcreate is missing a very important informational message and that is to inform the sysadmin what the maximum size disk will be for future vgextend commands. You can't blame the original sysadmin too much since I'm sure no one knew how big the VG and disks would grow in the future. As a standard, I would always make VG's capable of using at least 500 or 1000 GB disks (PE=64, max_PE=8000 or 16000 for 1 TB disks)

You can read about vgmodify at http://h20000.www2.hp.com/bc/docs/support/SupportManual/c01920387/c01920387.pdf (BSC link updated by admin)


Bill Hassell, sysadmin
Alexander Meyer
Occasional Contributor

Re: Pvmove from 2 disks to one greater lun

Thanks Bill (and of course all others here),

i will create a new vg just as recommened.

- stop db
- backup data
- create new vg
- mount and restore data.

Thank you all for your help.