LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   regarding lvextend (https://www.linuxquestions.org/questions/linux-newbie-8/regarding-lvextend-4175466132/)

sushdba 06-15-2013 10:26 AM

regarding lvextend
 
I have installed oracle enterprise linux 5.4 on virtualbox.
I have created 25 GB hard-disk. While installing I have assigned 2GB for swap partition and 5gb for boot partition. And left 17 gb space unallocated.

when i give command pvs it shows


pv vg Fmt Attr Psize PFree
---------------------------------------------------------------------

/dev/sda2 VolGroup00 lvm2 a- 24.88G 17.91G

i want to utilise this space. But when i gives

lvextend as follows
lvextend /dev/VolGroup00 /dev/sda2
command it shows
"volgroup00": invalid path for logical volume
Please provide volume group name.

Please help to extend logical volume

cbtshare 06-15-2013 11:59 AM

The issue is the syntax of the command you are trying to run to run is incorrect

lvextend -L Size /dev/mapper/VolGroup-lvName

also I think you are using the default volgroup created by linux, and this uses 100% of the space, so if you want to practice your gonna have to add a disk and then use that.

chrism01 06-16-2013 07:23 PM

I'd also add that your boot is much bigger than you should need; 512MB is fairly normal unless you intend to eg do a lot of kernel creations and keep them all.

Madhu Desai 06-17-2013 01:13 AM

Quote:

Originally Posted by sushdba (Post 4972433)
5gb for boot partition

As chrism01 already mentioned, your boot partition is too big. 200mb is more than enough, unless you want to keep loads of old kernels, or learning/experimenting with building kernel from source, then you can extend for 500mb, that's it, more than that is waste of space.

Quote:

Originally Posted by sushdba (Post 4972433)
when i give command pvs it shows

Code:

pv        vg          Fmt  Attr  Psize      PFree
---------------------------------------------------------------------

/dev/sda2  VolGroup00  lvm2  a-    24.88G    17.91G

i want to utilise this space.

You are reading it incorrectly. What the above line says is - you have assigned Physical Volume '/dev/sda2' of size 24.88G to Volume Group 'VolGroup00'. So the total size of VG VolGroup00 is 24.88G, out of which you have used 7G (2G + 5G). So the total space remaining in VG VolGroup00 is 17.91G. There is no scope of extending Volume group as it already has all the space (unless you add another PV).

You can verify it by using

Code:

# vgs
# vgdisplay

Quote:

Originally Posted by sushdba (Post 4972433)
But when i gives

lvextend as follows
lvextend /dev/VolGroup00 /dev/sda2
command it shows
"volgroup00": invalid path for logical volume
Please provide volume group name.

Your command is wrong. If you want to add new Physical Volume to Volume Group, then you should give

Code:

# vgextend VolGroup00 <New PV>
But if you want to extend Logical Volume, then (i'm using boot LV in this example, just to illustrate)

will enlarge to 10 GB
Code:

# lvextend -L +10G /dev/VolGroup00/boot
# resize2fs -f /dev/VolGroup00/boot

will enlarge to full
Code:

# lvextend -l +100%FREE /dev/VolGroup00/boot
# resize2fs -f /dev/VolGroup00/boot



All times are GMT -5. The time now is 07:30 AM.