1834150 Members
2178 Online
110064 Solutions
New Discussion

Re: lvm prob

 
SOLVED
Go to solution
khilari
Regular Advisor

lvm prob

Hi guys, well i made a volume group and then i was creating a logical volume and below is what i did and the errors io am getting.

# lvcreate -L 800 -n mcsg vg02
Logical volume "/dev/vg02/mcsg" has been successfully created with
character device "/dev/vg02/rmcsg".
lvcreate: Not enough free physical extents available.
Logical volume "/dev/vg02/mcsg" could not be extended.
Run the "lvextend" command to create space on the Logical Volume.
# lvcreate -L 400 -n mcsg vg02
lvcreate: Logical volume "/dev/vg02/mcsg" already exists.
# lvremove /dev/vg02/mcsg
Logical volume "/dev/vg02/mcsg" has been successfully removed.
Volume Group configuration for /dev/vg02 has been saved in /etc/lvmconf/vg02.co
f
# lvcreate -L 350 -n mcsg vg01
lvcreate: Volume group "/dev/vg01" does not exist in the "/etc/lvmtab" file.
# lvcreate -L 350 -n mcsg vg02
Warning: rounding up logical volume size to extent boundary at size "352" MB.
Logical volume "/dev/vg02/mcsg" has been successfully created with
character device "/dev/vg02/rmcsg".
lvcreate: Not enough free physical extents available.
Logical volume "/dev/vg02/mcsg" could not be extended.
Run the "lvextend" command to create space on the Logical Volume.
# pvdisplay -v /dev/vg02/c6t0d1
pvdisplay: "/dev/vg02/c6t0d1": No such file or directory
Usage: pvdisplay
[-v]
[-b BlockList]
PhysicalVolumePath...

# pvdisplay /dev/dsk/c6t0d1
--- Physical volumes ---
PV Name /dev/dsk/c6t0d1
VG Name /dev/vg02
PV Status available
Allocatable yes
VGDA 2
Cur LV 0
PE Size (Mbytes) 4
Total PE 2
Free PE 2
Allocated PE 0
Stale PE 0
IO Timeout (Seconds) default
Autoswitch On

Now, it says that it doesnt have enough space the disk, and the pvdisplay shows 2 PE'S and 2 free PE'S . Now, y is it showing me with almost none PE'S.???
Thanks.
6 REPLIES 6
erics_1
Honored Contributor

Re: lvm prob

There are only 2 extents free on that particular disk. Please provide output from vgdisplay -v vg02.

Thanks,
Eric
Pete Randall
Outstanding Contributor

Re: lvm prob

What did you put into your vgcreate command? Can you also post the output of "vgdisplay -v vg02"?


Pete

Pete
Steven E. Protter
Exalted Contributor
Solution

Re: lvm prob

Shalom,

The lv was created but there was not near enough space on disk c6t0d1 for the requested space.

I would run pvdisplay -v on the physical volume and see what is taking up the space.

If its the new lv, then lvremove it and start again.

I always like the two step approach.

I would create it empty and then use lvextend to particular physical disks to lay things out the way I wanted them. Took longer, got better results.

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
Sivakumar TS
Honored Contributor

Re: lvm prob


Hi,

If this is the only PV in VG02, you can create a LV of maximum 8MB in size, since the free PEs available is only 2.

check vgdisplay -v vg02 to get the total FREE PEs in the VG and

try to create a LV of size ( 4*Total Free PEs)

It should wok

Regards,

Siva.
Nothing is Impossible !
Devender Khatana
Honored Contributor

Re: lvm prob

Hi,

As mentioned earlier attach vgdisplay -v output for the VG.

HTH,
Devender
Impossible itself mentions "I m possible"
Josiah Henline
Valued Contributor

Re: lvm prob

Run a "diskinfo -v /dev/rdsk/c6t0d1" and check for the physical size of the disk. It may not be the size you are expecting it to be. You may need the LUN recreated to size you are expecting.
If at first you don't succeed, read the man page.