1829087 Members
2463 Online
109986 Solutions
New Discussion

Min PV size

 
blacof
Occasional Advisor

Min PV size

Gus Im using LVM 2.1 and trying to create a 2.1 VG.When using vgcreate with -S option you need to specify the max size the DG can grow to. With that in min I tried to create a 512t VG and accordingly I gave 16m as PE size. But it throws up an error saying that my PV is too small. Please advise

My Disk/PV is 64m

bash-3.2# pvcreate /dev/rdsk/c5t0d2
Physical volume "/dev/rdsk/c5t0d2" has been successfully created.

bash-3.2# diskinfo -b /dev/rdsk/c5t0d2
65536


bash-3.2# vgcreate -V 2.1 -S 512t -s 16m myvg /dev/dsk/c5t0d2
vgcreate: Volume group "/dev/myvg" could not be created:
Error: One of the physical volumes is too small to be configured
as part of the volume group.



4 REPLIES 4
Rita C Workman
Honored Contributor

Re: Min PV size

Maybe I'm reading this wrong...

But are you trying to create a volume group size max of 512 Terabytes? 16Mb I can understand....but....
Do you really want the vg that big?
Now I appreciate that the max size allowed is 2 Petabytes for LVM 2.0 and 2.1 (it's in the manpages), but wouldn't that make for a really hard to manage volume group.

Maybe you could run vgcreate -E option as suggested in the manpage to check the relationship b/t pe size and max vg size and it will give you the maximum size that the vg can be set at.

Just a thought,
Rita



Robert-Jan Goossens
Honored Contributor

Re: Min PV size

Hi,

Have a look at the examples listed in this document.

http://docs.hp.com/en/6054/LVM_Limits_White_Paper_V4.pdf

Regards,
Robert-Jan
blacof
Occasional Advisor

Re: Min PV size

I figured this. The LVM needs some space to store the meta data for a particular VG. Unfortunately there is no direct command that will tell me the metadata size for a VG of a particular size. So If I potentially need to create a VG of certain size I need to create a disk that is VG size + metadata.

is there a CLI or some programmatic way of calculating the metadata size.
James R. Ferguson
Acclaimed Contributor

Re: Min PV size

Hi:

> is there a CLI or some programmatic way of calculating the metadata size

See:

http://docs.hp.com/en/lvm-v2/L2_whitepaper_8.pdf

Regards!

...JRF...