LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-15-2013, 11:26 AM   #1
sushdba
LQ Newbie
 
Registered: Dec 2012
Posts: 8

Rep: Reputation: Disabled
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
 
Old 06-15-2013, 12:59 PM   #2
cbtshare
Member
 
Registered: Jul 2009
Posts: 619

Rep: Reputation: 42
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.
 
Old 06-16-2013, 08:23 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,417

Rep: Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397
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.
 
Old 06-17-2013, 02:13 AM   #4
mddnix
Member
 
Registered: Mar 2013
Distribution: Redhat, Ubuntu
Posts: 525

Rep: Reputation: 141Reputation: 141
Quote:
Originally Posted by sushdba View Post
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 View Post
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 View Post
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

Last edited by mddnix; 06-17-2013 at 02:23 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
lvextend - question jewel464g Linux - Newbie 5 09-28-2010 03:48 PM
lvextend? sachinh Linux - General 3 09-22-2009 08:25 AM
Not enough PE when running lvextend!? Chikne Slackware 6 02-04-2007 11:24 AM
lvextend - where's my data? zdenisl Linux - Software 4 05-13-2006 09:36 AM
LVM and lvextend mirroring smkamene Linux - Software 0 02-26-2005 09:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration