1832617 Members
2985 Online
110043 Solutions
New Discussion

Logical volumes

 
Habib_4
Advisor

Logical volumes

Hi guys,

I am just working on a simple little system I recently bought.
It runs HP-UX version 11.
I have tried to create a logical volume via 'lvcreate' and have found that although the prompt tells me the volume is created, it then goes onto say:

Logical volume: "/dev/vg00/lvol4" could not be extended.
Run the lvextend command to create space on the
Logical volume.

1)How can I tell how much space is on the Logical volume?
2)How much should I extend it by?

NOTE:-
I ran the following command to create the logical volume:

lvcreate -L 2000 vg00

Your help will be much appreciated!

4 REPLIES 4
melvyn burnard
Honored Contributor

Re: Logical volumes

Probably a good idea for you to read the Managing Systems and Workgroups manual at http://docs.hp.com
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Rick Garland
Honored Contributor

Re: Logical volumes

The command you ran says to create a LV of 2 GB on vg00. It does not say what the LV name is.

lvcreate -L 2000 -n /dev/vg00

To see some the space, use the vgdisplay -v command. This will provide the info as to sizes in the VG and if any LV exist what their sizes are.

How much you can extend depends on how much space you have allocated to the VG.
Jeff Schussele
Honored Contributor

Re: Logical volumes

Hi Habib,

Well....first off you did not specify an LV in that command - rather a VG.
Second...if you're trying to extend an existing LV you need the command lvextend.
To see the size of an existing LV use vgdisplay -v VG_name then multiply the LE value of the particular LV by the PE size of the VG. That'll give you the LV size.
And remember that the -L value *must* be the *new* size - not the addition value.
BTW - I suspect that lvol4 was selected by default because it's the *first* LV in vg00 that can be extended w/o using Ignite. All the previous LVs *must* be contigous.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
DCE
Honored Contributor

Re: Logical volumes



Once the LV is created you need to use the lvextend command to extend it

lvcreate -n lvol /dev/vg00
lvextend -L 2000 /dev/vg00/lvol4

or as one command

lvcreate -n lvol4 -L 2000 /dev/vg00


You can remove the lv with the lvremove command

The man pages are very helpful

man lvcreate
man lvextend
man lvremove