LinuxQuestions.org
Help answer threads with 0 replies.
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-14-2010, 05:02 PM   #1
smilemukul
Member
 
Registered: Jun 2009
Distribution: Redhat,CentOS,Ubuntu,Puppet
Posts: 292

Rep: Reputation: 34
How to extend /home or / partition through LVM


How can I extend /home or / partition through LVM. Is this possible ?

Thanks
 
Old 06-14-2010, 05:30 PM   #2
arashi256
Member
 
Registered: Jan 2008
Location: Brighton, UK
Distribution: Ubuntu 12.04 / CentOS 6.5
Posts: 394

Rep: Reputation: 61
Quote:
Originally Posted by smilemukul View Post
How can I extend /home or / partition through LVM. Is this possible ?

Thanks
Yes indeed. Have your /home or / partitions been partitioned for LVM use? Are they part of an existing volume group? What does the "vgdisplay" command say?
 
Old 06-14-2010, 05:50 PM   #3
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

Quote:
How can I extend /home or / partition through LVM. Is this possible?
Yes indeedy - that's largely why LVM's were invented in the first place: to give you greater flexibility over "logical volumes" than "physical volumes" permit.

Here are two great tutorials:
http://www.walkernews.net/2007/07/02...-in-3-minutes/
<= "What's an LVM"?

http://www.linux-tutorial.info/modul.../extendlv.html
<= using "lvextend"

I would post output from your current "vgdisplay" before doing anything, however
 
Old 06-15-2010, 03:35 AM   #4
smilemukul
Member
 
Registered: Jun 2009
Distribution: Redhat,CentOS,Ubuntu,Puppet
Posts: 292

Original Poster
Rep: Reputation: 34
Thanks but I am not able to create physical volume & volume group as I am getting a message that the partition is already mounted.

Also if the /home partition is already mounted (existing partition) than how can LVM work ??

Thanks
 
Old 06-15-2010, 04:43 AM   #5
arashi256
Member
 
Registered: Jan 2008
Location: Brighton, UK
Distribution: Ubuntu 12.04 / CentOS 6.5
Posts: 394

Rep: Reputation: 61
Quote:
Originally Posted by smilemukul View Post
Thanks but I am not able to create physical volume & volume group as I am getting a message that the partition is already mounted.

Also if the /home partition is already mounted (existing partition) than how can LVM work ??

Thanks
You haven't told us very much. Is the /home partition already part of a logical volume group? What about the / partition? Are either full? Do you have any spare PV space to extend to? You haven't even told us what you've tried to produce the errors you're getting.
 
Old 06-15-2010, 07:03 AM   #6
alli_yas
Member
 
Registered: Apr 2010
Location: Johannesburg
Distribution: Fedora 14, RHEL 5.5, CentOS 5.5, Ubuntu 10.04
Posts: 559

Rep: Reputation: 92
Quote:
Thanks but I am not able to create physical volume & volume group as I am getting a message that the partition is already mounted.
OK, so if the partition is already mounted this means you've already formatted a filesystem on it; and mounted it somewhere.

Running df -kh will show exactly where its mounted - and clarify why you're getting this error.

Quote:
Also if the /home partition is already mounted (existing partition) than how can LVM work ??
OK, from this statement its pretty clear you don't have an understanding of how LVM works. At a high level you need to understand firstly how partitioning, filesystem creation and mounting works - before dipping into LVM.

LVM adds another layer of complexity which allows you to make your install more scalable in catering for growth. I suggest you search LQ as there are many threads that explain how LVM works - and I don't want to repeat a long explanation that's already been posted.
 
Old 06-21-2010, 03:38 AM   #7
smilemukul
Member
 
Registered: Jun 2009
Distribution: Redhat,CentOS,Ubuntu,Puppet
Posts: 292

Original Poster
Rep: Reputation: 34
Thanks for the response
Actually I am aware of how LVM works but my question is how can I extend/create a LVM on the existing mounted partition when the partition is created at the time of making partition as / & /home are already mounted but not created under LVM.

so I just want to extend my /home dir which is already mounted & now I want to extend the size of the dir as its fully utilized.

Thanks
 
Old 06-21-2010, 03:54 AM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,832

Rep: Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820
Instead of hiding information, why don't you give all that is needed to help you ?. Post (all) the output of these commands run as root
Code:
df -hT
fdisk -l
 
Old 06-21-2010, 04:06 AM   #9
alli_yas
Member
 
Registered: Apr 2010
Location: Johannesburg
Distribution: Fedora 14, RHEL 5.5, CentOS 5.5, Ubuntu 10.04
Posts: 559

Rep: Reputation: 92
Quote:
Actually I am aware of how LVM works but my question is how can I extend/create a LVM on the existing mounted partition when the partition is created at the time of making partition as / & /home are already mounted but not created under LVM.
With respect, if you did know how LVM works you wouldn't ask this question. If you don't designate a partition as "Linux LVM" when partitioning (either at install or post-install with fdisk); then you cannot allocate this space to a volume group and thus create logical volumes.

As per syg00's post above, post more information and we may be able to help you.
 
Old 01-30-2012, 12:07 AM   #10
catalin_xyz
LQ Newbie
 
Registered: Jan 2012
Posts: 2

Rep: Reputation: Disabled
Resizing an LVM extension?

Hi everybody,

I need your help for extending an LVM partition. I installed fedora 14 a while ago in one partition (probably not the best option) of 50 GB out of a 500 GB single disk. I ran out of space on the partition and I would like to increase it to fill up the whole disk. I have read the LVM info but I am not sure that I can execute those commands adapted to my particular situation without messing up my data. Here is the output of df -hT, fdisk -l, and vgdisplay.
[root@Felix mafelix]# df -hT
Filesystem Type Size Used Avail Use% Mounted on
rootfs rootfs 49G 46G 1.9G 97% /
udev devtmpfs 1.6G 260K 1.6G 1% /dev
tmpfs tmpfs 1.6G 356K 1.6G 1% /dev/shm
/dev/mapper/vg_felix-lv_root
ext4 49G 46G 1.9G 97% /
udev devtmpfs 1.6G 260K 1.6G 1% /dev
/dev/sda1 ext4 194M 156M 29M 85% /boot

[root@Felix mafelix]# fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00071a01

Device Boot Start End Blocks Id System
/dev/sda1 * 63 409662 204800 83 Linux
/dev/sda2 409663 976768064 488179201 8e Linux LVM

Disk /dev/dm-0: 214.7 GB, 214748364800 bytes
255 heads, 63 sectors/track, 26108 cylinders, total 419430400 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 5586 MB, 5586812928 bytes
255 heads, 63 sectors/track, 679 cylinders, total 10911744 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/dm-1 doesn't contain a valid partition table

[root@Felix mafelix]# vgdisplay
--- Volume group ---
VG Name vg_felix
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 465.56 GiB
PE Size 4.00 MiB
Total PE 119184
Alloc PE / Size 52532 / 205.20 GiB
Free PE / Size 66652 / 260.36 GiB
VG UUID 4l1n6I-3vk1-Z4bJ-jpwZ-iIIU-z7xZ-sqGoYo

Thank you, Catalin
 
  


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
Extend LVM partition rconan Linux - Software 5 08-31-2010 03:32 AM
LVM with BIG /home Partition cryingthug Linux - Server 2 10-05-2009 10:15 PM
How to extend /home partition in rhel4? kathmanduite Linux - Newbie 4 09-06-2007 09:40 AM
How to make LiveCD detect and mount extend/LVM partition satimis Linux - General 2 08-30-2007 10:01 PM
How to extend an existing partition without LVM james.reid Linux - Software 14 06-02-2006 01:48 AM


All times are GMT -5. The time now is 01:53 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration