LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-28-2012, 01:01 AM   #1
baldur2630
Member
 
Registered: Jan 2007
Location: Belgium
Distribution: CentOS & Ubuntu
Posts: 173

Rep: Reputation: 22
Need help to Extend a Logical Volume on Centos 6.2


I'm running out of space on my CentOS 6.2 webserver running on ESX 4.1

I found all the info I needed and using Edit settings in ESX, I increased the hard drive size from 60GB to 100GB

I created a partition /dev/sda3 with fdisk - rebooted -no problem

I used pvcreate to create a physical volume for the LVM

I used vgextend to add the new partition to the Volume Group (itś name is vg_centos62)

I used vgdisplay to check how much available space I had - 40GB - no problems so far

Now I have the final step to complete : -
lvextend -L+40.00G /dev/vg_centos62/?????

and here Iḿ stuck lvdisplay gives me : -
--- Logical volume ---
LV Name /dev/vg_centos62/lv_root
VG Name vg_centos62
LV UUID zkagmA-4r2r-IE3F-xOAO-BRwL-fJhS-IFo7D2
LV Write Access read/write
LV Status available
# open 1
LV Size 28.58 GiB
Current LE 7317
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0

--- Logical volume ---
LV Name /dev/vg_centos62/lv_home
VG Name vg_centos62
LV UUID Ng0WXo-KrU1-zMPA-x9hY-rqCB-1LIK-w567JU
LV Write Access read/write
LV Status available
# open 1
LV Size 28.96 GiB
Current LE 7413
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:2

--- Logical volume ---
LV Name /dev/vg_centos62/lv_swap
VG Name vg_centos62
LV UUID b752nv-HHgN-2FRP-jbeY-3ZYX-dcEY-SE1PZ4
LV Write Access read/write
LV Status available
# open 1
LV Size 1.97 GiB
Current LE 504
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1

The question is, do I add the free space to lv_root or lv_home?

I need the space for /var/www should I expend lv_root or lv_home?

Can someone please set me right before I cock the entire thing up!
 
Old 03-28-2012, 01:46 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,153

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
That would be lv_root.
BTW this isn't the final step. You still need to resize the filesystem. Depends on fileystem (type) and to some degree kernel level. At RHEL 6.2 you should be fine for the kernel.
 
1 members found this post helpful.
Old 03-28-2012, 05:05 AM   #3
baldur2630
Member
 
Registered: Jan 2007
Location: Belgium
Distribution: CentOS & Ubuntu
Posts: 173

Original Poster
Rep: Reputation: 22
Yep, that's all I needed to know. Extended lv_root and resized the filesystem.

It all worked perfectly and I now have lots of space again.

Thanks for the advice.
 
  


Reply



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
centos 5 boot stuck at setting up logical volume management malayo Linux - Hardware 1 03-25-2012 07:09 AM
How to extend a volume Centos 5.4 on VMware ESX 3.5? baldur2630 Linux - Virtualization and Cloud 1 01-30-2010 03:41 AM
Help - can't extend logical volume ? Vilius AIX 5 05-31-2008 05:49 PM
Guest OS installation failed on a logical volume in CentOS 5.1 64bit! jimmyjiang Red Hat 1 04-11-2008 03:35 PM
Centos 5.1 bootup stops at Setting up Logical Volume Management - repeatedly tiber Red Hat 6 02-11-2008 12:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:36 PM.

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
Open Source Consulting | Domain Registration