LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 09-28-2010, 02:13 PM   #1
jewel464g
LQ Newbie
 
Registered: Jul 2010
Posts: 3

Rep: Reputation: 0
lvextend - question


Our VM Admin, have setup a virtual linux server for me to put Oracle on. I'm not a linux admin and apparently neither are they. Somehow it's landed in my court to fix this issue. The problem is that my root mountpoint at 20G, isn't large enough (already full). Need to increase it by 10G. I had the VM Admin, give me another 10G to harddrive 1. Which I see he did in VMWare. Now I tried to do:

lvextend -L+10G /dev/VolGroup01/LogVol00 /dev/sda2

and I get the following:
No free extents on physical volume "/dev/sda2"
No specified PVs have space available.

Now I did read somewhere that I might need to pvcreate before I can lvextend, but as I said before I'm not a linux admin and I'm not sure how this would work. Also need to point out that there are currently things installed on this server and I don't want to blow that away.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 09-28-2010, 02:24 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
It looks like you're going to need to add another Physical Volume (PV) to the Volume Group (VG) before you're going to be able to proceed. Do you have another disk / partition that you can commandeer for this purpose?
 
Old 09-28-2010, 02:29 PM   #3
jewel464g
LQ Newbie
 
Registered: Jul 2010
Posts: 3

Original Poster
Rep: Reputation: 0
I put some info below. I'm hoping that will answer your question.

/dev/sdb/ is my data drive that will hold all my databases, once I get oracle installed.


[root@rg0redc9208 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup01-LogVol00
9.6G 5.2G 3.9G 58% /
/dev/mapper/VolGroup01-LogVol04
2.0G 1.2G 744M 61% /home
/dev/mapper/VolGroup01-LogVol02
3.0G 1.2G 1.6G 44% /var
/dev/mapper/VolGroup01-LogVol03
31M 4.5M 25M 15% /export/home
/dev/sda1 99M 26M 69M 28% /boot
tmpfs 15G 0 15G 0% /dev/shm




lvm> lvmdiskscan
/dev/ramdisk [ 16.00 MB]
/dev/root [ 9.84 GB]
/dev/ram [ 16.00 MB]
/dev/sda1 [ 101.94 MB]
/dev/VolGroup01/LogVol04 [ 2.00 GB]
/dev/ram2 [ 16.00 MB]
/dev/sda2 [ 19.89 GB] LVM physical volume
/dev/VolGroup01/LogVol02 [ 3.00 GB]
/dev/ram3 [ 16.00 MB]
/dev/VolGroup01/LogVol03 [ 32.00 MB]
/dev/ram4 [ 16.00 MB]
/dev/VolGroup01/LogVol01 [ 5.00 GB]
/dev/ram5 [ 16.00 MB]
/dev/ram6 [ 16.00 MB]
/dev/ram7 [ 16.00 MB]
/dev/ram8 [ 16.00 MB]
/dev/ram9 [ 16.00 MB]
/dev/ram10 [ 16.00 MB]
/dev/ram11 [ 16.00 MB]
/dev/ram12 [ 16.00 MB]
/dev/ram13 [ 16.00 MB]
/dev/ram14 [ 16.00 MB]
/dev/ram15 [ 16.00 MB]
/dev/sdb [ 520.00 GB]
4 disks
19 partitions
0 LVM physical volume whole disks
1 LVM physical volume
 
Old 09-28-2010, 02:34 PM   #4
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Two things:
  • Could you also post the output of vgdisplay?
  • Are there any filesystems living on /dev/sdb that need to be preserved, or is it safe to partition if needed?
 
Old 09-28-2010, 02:40 PM   #5
jewel464g
LQ Newbie
 
Registered: Jul 2010
Posts: 3

Original Poster
Rep: Reputation: 0
--- Volume group ---
VG Name VolGroup01
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 6
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 5
Open LV 5
Max PV 0
Cur PV 1
Act PV 1
VG Size 19.88 GB
PE Size 32.00 MB
Total PE 636
Alloc PE / Size 636 / 19.88 GB
Free PE / Size 0 / 0
VG UUID pxO4sR-hLLH-KpEn-sHkS-NrDw-kfKn-fuQ1wm


There are some files on sdb, but I can recreate if I need to.
 
Old 09-28-2010, 02:48 PM   #6
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Here's the deal.

0.) Take / verify good backups of important data on your system! Do not skip this step. If you're thinking of skipping this step, do not proceed.

1.) Create a new partition on /dev/sdb using fdisk(8). It's up to you whether you blow away existing partitions, and it's also up to you what size your new partition will be (perhaps 100GB for starters?). Example: # fdisk /dev/sdb

... or

If you're not familiar with / don't want to dabble in fdisk(8), then download and burn a copy of Gparted to create your new partition.

2.) Add the new partition to your volume group. Example: # vgextend VolGroup01 /dev/sdb2

Replace "sdb2" with the partition you just created. Don't worry about marking the new partition as a PV - vgextend(8) will take care of that for you.

3.) Extend your logical volume. Example: # lvextend -L+20G /dev/VolGroup01/LogVol00

4.) Expand your filesystem. Example: # resize2fs /dev/VolGroup01/LogVol00

Note that different OSes / versions / filesystems may use different utilities to expand the filesystem.

5.) Done. Confirm using df(1) or some such.
 
2 members found this post helpful.
  


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
[SOLVED] df showing incorrect used space after lvextend sanschag Linux - General 2 10-01-2009 10:21 AM
lvextend? sachinh Linux - General 3 09-22-2009 07:25 AM
Not enough PE when running lvextend!? Chikne Slackware 6 02-04-2007 10:24 AM
lvextend - where's my data? zdenisl Linux - Software 4 05-13-2006 08:36 AM
LVM and lvextend mirroring smkamene Linux - Software 0 02-26-2005 08:48 PM


All times are GMT -5. The time now is 09:06 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