Operating System - HP-UX
1820155 Members
2649 Online
109620 Solutions
New Discussion юеВ

LVM: is it possible to cretae lv of 25 GB whose P.E(MB) is 32 Mb

 
SOLVED
Go to solution
Mohammed.Muneer
Advisor

LVM: is it possible to cretae lv of 25 GB whose P.E(MB) is 32 Mb

i have 2 HDD whose size is 14GB , Total is 28GB. I have to create 25 GB of logical Volume .
vgcreate -s 32 /dev/vg03 /dev/dsk/cotod1 /dev/dsk/c0tod2

lvcreate -l /dev/vg03

Please give the justification

Thanks
8 REPLIES 8
Michal Kapalka (mikap)
Honored Contributor

Re: LVM: is it possible to cretae lv of 25 GB whose P.E(MB) is 32 Mb

hi,

if you create striped volume, you will have enough PE for creating 25 GB lvol, but this lvol will be not hdd failure protected.

check this manual :

http://docstore.mik.ua/manuals/hp-ux/en/5992-4589/ch03s03.html#v686777

read tshi topics :

├в Creating a Volume Group├в and ├в Creating a Logical Volume├в

procedure :


if the disk are not used before use pvcreate to make a LVM strucutre on the disks :

pvcreate -f /dev/rdsk/c0t0d1
pvcreate -f /dev/rdsk/c0t0d2

vgcreate -s 32 /dev/vg03 /dev/dsk/c0t0d1 /dev/dsk/c0t0d2

lvcreate -i 2 -I 32 -L 25600 -n lvol1 /dev/vg03 ( this will create 25 GB lvol1 but striped )

mikap
Mohammed.Muneer
Advisor

Re: LVM: is it possible to cretae lv of 25 GB whose P.E(MB) is 32 Mb

HI

Thanks for the reply,

I dont require stripping across the disk, and i would like to know lvcreate with -l option (i.e create with phsical extent to accomdate the exact extent size.).
scenario: total P.E is 8748
P.E (Mb) is 32 Mb
(for 1 HDD P.E is 4374 & 2nd is 4374 so total 8748)

if 1024*25/32=800 (but this is not right).
How to calculate in extent ?


Michal Kapalka (mikap)
Honored Contributor

Re: LVM: is it possible to cretae lv of 25 GB whose P.E(MB) is 32 Mb

hi,

i have 2 HDD whose size is 14GB , Total is 28GB. I have to create 25 GB of logical Volume .

how could you create logical volume without striping if youf final size should be 25 GB

or you just creating several lvols that should have together the 25 GB size ??
???

mikap
Mohammed.Muneer
Advisor

Re: LVM: is it possible to cretae lv of 25 GB whose P.E(MB) is 32 Mb

hi,

Thats what my question, is it possible to create 25GB of LV. Its just a dedicated LV i have to create.
If it is not possible then please justify.

VG Name /dev/vg03
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 0
Open LV 0
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 4375
VGDA 4
PE Size (Mbytes) 32
Total PE 8748
Alloc PE 0
Free PE 8748
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0


I want to create logical volume with 25Gb with -l option.
Please give the steps
sujit kumar singh
Honored Contributor

Re: LVM: is it possible to cretae lv of 25 GB whose P.E(MB) is 32 Mb


hi


just do

lvcreate -l 800 /dev/vg03

and please tell

lvdisplay /dev/vg03/lvol1

regards
sujit
Mohammed.Muneer
Advisor

Re: LVM: is it possible to cretae lv of 25 GB whose P.E(MB) is 32 Mb

hi Sujit, thanks for the reply,

you calculated as
1024*25/32 = 800
but if you see total Size is 28GB
(2 HDD with 14 GB)
so i think it should cross 4374 extent.

PV Name /dev/dsk/c1t2d0
PV Status available
Total PE 4374
Free PE 4374
Autoswitch On
Proactive Polling On

PV Name /dev/dsk/c1t3d0
PV Status available
Total PE 4374
Free PE 4374
Autoswitch On
Proactive Polling On
Matti_Kurkela
Honored Contributor
Solution

Re: LVM: is it possible to cretae lv of 25 GB whose P.E(MB) is 32 Mb

Sujit's answer is correct.

25 GB = 25600 MB (1 GB = 1024 MB)

25600 MB / 32 MB/extent = 800 extents

You could also use "lvcreate -L 25600" to directly specify the desired LV size in megabytes.

Note:

Based on your vgdisplay output, your HDD size seems to be 140 GB, not 14 GB.

You have 8748 extents total in your VG. It contains 2 PVs, so each PV has 8748 / 2 = 4374 extents. The "Max PE per PV" value is in agreement with this.

4374 extents * 32 MB/extent = exactly 140 000 MB, not 14 000 MB.

If this is SAN storage, your SAN admin may simply have made a small mistake when configuring the LUN size.

If these are actual physical disks, 140 GB is a much more likely size for a reasonably modern disk than 14 GB.

Perhaps this is what's confusing you?

MK
MK
Mohammed.Muneer
Advisor

Re: LVM: is it possible to cretae lv of 25 GB whose P.E(MB) is 32 Mb

Hi Matti

Thanks a lot, you are correct i got confused with 140Gb with 14 GB, I have checked with SAN team & sorted out.

Appreciated you quick response,

I like the way of your explanation.

Be in touch
if possible kindly provide your emailID.

Thanks