Operating System - HP-UX
1753965 Members
7325 Online
108811 Solutions
New Discussion юеВ

How to find public region of a disk in MB

 
amit mehta_2
Regular Advisor

How to find public region of a disk in MB

hi,

how can i find the public region of a disk in
megabytes ?

i'm trying to create logical volumes dynamically.
excerpt from the man pages of lvcreate:

-L lv_size Allocate space to the logical volume,specified in megabytes.

The disk was previously under VxVM control and doing vxdisk list gives infomation about the private and public region.
snip:
root@hpia7/ $ vxdisk list c7t1d1|egrep "^private|^public"
public: slice=0 offset=32896 len=5193600 disk_offset=0
private: slice=0 offset=128 len=32768 disk_offset=0

The len attribute for private region seems to be declared in megabytes.

snip from VM admin guide:
The default private region size is 32 megabytes

But it seems that the len attribute for public region is not in Megabytes,as while trying to create a logical volume having size obtained from the public region len(5193600 here) failed.

snip:

root@hpia7/$ pvcreate -f /dev/rdsk/c7t1d1
Physical volume "/dev/rdsk/c7t1d1" has been successfully created.
root@hpia7/$ mkdir /dev/testdg
root@hpia7/$ mknod /dev/testdg/group c 64 0x020000
root@hpia7/$ vgcreate /dev/testdg/ /dev/dsk/c7t1d1
Increased the number of physical extents per physical volume to 1279.
Volume group "/dev/testdg" has been successfully created.
Volume Group configuration for /dev/testdg has been saved in /etc/lvmconf/testdg.conf
root@hpia7/vmtest/tc/config/ $ lvcreate -L 5193600 /dev/testdg
lvcreate: Specified LogicalVolumeSize is too large for the PhysicalExtentSize
of the Volume Group. Resulting number of extents is out of the range
1 to 65535 (1298400).

i read some docs,but couldn't find the information on the type of length provided here for public region length.Is it in blocks,sectors,Kb ?

And as i'm using -L option with lvcreate so i need this size to be converted into Megabytes.


Thanks,
~amit


3 REPLIES 3
AwadheshPandey
Honored Contributor

Re: How to find public region of a disk in MB

have you installed PHCO_34421 patch, this patch has fix for error

( SR:8606430519 CR:JAGaf89978 )
If lvcreate(1M) is invoked where the size of the requested
logical volume is smaller than the physical extent size
then lvcreate(1M) will fail with the following error
message:

"lvcreate: Specified LogicalVolumeSize is too large for
the PhysicalExtentSize of the Volume Group. Resulting
number of extents is out of the range 1 to 65535 (0)."

It's kind of fun to do the impossible
amit mehta_2
Regular Advisor

Re: How to find public region of a disk in MB

got little confused,
this value needed to be converted into Mb,

32768/1024
32

root@hpia7/$ bc
5193600/1024
5071


root@hpia7/$ lvcreate -L 5071 /dev/testdg
Warning: rounding up logical volume size to extent boundary at size "5072" MB.
Logical volume "/dev/testdg/lvol1" has been successfully created with
character device "/dev/testdg/rlvol1".
Logical volume "/dev/testdg/lvol1" has been successfully extended.
Volume Group configuration for /dev/testdg has been saved in /etc/lvmconf/testdg.conf

~amit
AwadheshPandey
Honored Contributor

Re: How to find public region of a disk in MB

you can use
lvcreate -L SIZE in MB -n lvolname
It's kind of fun to do the impossible