LVM Performance Tips:
Very large volume groups and lvols (terabyte and larger) require special planning. The first precaution is with the vgcreate command. *ALWAYS* specify a large PE size (32, 64 or 128 MB). The default (4 MB) is far, far too small to handle more than 250 GB. This is a critical step as the PE size can never be changed. vgmodify (11.23 and later) can only adjust the maximum PE count (-e), not the PE size -s. Using massively large PE counts is not a good idea. Here is a basic guide:
VGs and lvols that will never grow larger than 200 GB, PE=4 is OK.
From 200 to 1000 GB, use PE=16.
From 1 TB to 100 TB, use PE=64.
And beyond 100 TB, use PE=128.
Ultra-fast mirroring:
For lvols larger than a few GB, here is a tip for instant mirroring:
Create the lvol with a size of 1 extent: lvcreate -l 1 -n biglvol vg02
Mirror the volume: lvextend -m 1 /dev/vg02/biglvol
Now extend the volume to the desired size: lventend -L 2000000 /dev/vg02/biglvol
Rather than 30 minutes to mirror the 2 TB volume, it will be completed in a few seconds. Here is why it works so fast. The initial volume is 1 extent so mirroring is instantaneous. When you extend an lvol, the content of the lvol is undefined. Therefore, mirroring the additional extents (copying them) is unnecessary as they have never been written before. So all the new extents are marked as synced. Any new data will be written to the new extents and the mirrors. A 2 terabyte lvol can be created and mirrored in less than 5 seconds with the above steps.
– See more at: http://serviceitdirect.com/blog/creating-large-mirrored-lvols#sthash.6bBXUBO0.dpuf
Tags: HP-UX