LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
Search this Thread
Old 11-25-2009, 07:58 PM   #1
jakev383
QmailToaster Developer
 
Registered: Dec 2005
Location: Burlington, NC
Distribution: CentOS, Voyage, Debian, Fedora
Posts: 220

Rep: Reputation: 31
Need to extend my root LVM to add space


I installed F12 on my desktop, and now I want to extend the size of my root LVM. When it installed I did not notice that it only gave me a 3G root volume. There was other stuff on this machine when I did the install, but not I want to blow away the other data and make the whole drive my root volume.
Anyway, I tried running some tools to do this, but seem to be stuck in a rut. Here is what I have:
Code:
[root@JAKE-DLIN jake]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_jakedlin-lv_root
                      2.8G  2.6G  179M  94% /
tmpfs                 498M  260K  497M   1% /dev/shm
/dev/sda1             194M   22M  163M  12% /boot
Code:
Disk /dev/sda: 40.0 GB, 40016019456 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x98e098e0

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          26      204800   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              26         650     5015552   8e  Linux LVM
Partition 2 does not end on cylinder boundary.
/dev/sda3             651        4865    33856987+  83  Linux

Disk /dev/dm-0: 34.4 GB, 34359738368 bytes
255 heads, 63 sectors/track, 4177 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

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

Disk /dev/dm-1: 2113 MB, 2113929216 bytes
255 heads, 63 sectors/track, 257 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-1 doesn't contain a valid partition table
I ran this command:
Code:
lvextend -L32G /dev/vg_jakedlin/lv_root
But I still get this:
Code:
[jake@JAKE-DLIN ~]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_jakedlin-lv_root
                      2.8G  2.6G  179M  94% /
tmpfs                 498M  260K  497M   1% /dev/shm
/dev/sda1             194M   22M  163M  12% /boot
Here is some other relevant information:
Code:
[root@JAKE-DLIN jake]# lvdisplay
  --- Logical volume ---
  LV Name                /dev/vg_jakedlin/lv_root
  VG Name                vg_jakedlin
  LV UUID                puBeqE-srUX-s4NP-3kO3-OQWi-ERbe-ItWt1b
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                32.00 GB
  Current LE             8192
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0
   
  --- Logical volume ---
  LV Name                /dev/vg_jakedlin/lv_swap
  VG Name                vg_jakedlin
  LV UUID                mibFF0-trBv-zJ1e-hDCs-oESP-p2TO-t5SE15
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                1.97 GB
  Current LE             504
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1

[root@JAKE-DLIN jake]# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               vg_jakedlin
  PV Size               4.78 GB / not usable 2.00 MB
  Allocatable           yes (but full)
  PE Size (KByte)       4096
  Total PE              1224
  Free PE               0
  Allocated PE          1224
  PV UUID               86ExXj-O8HE-hF0c-8LuG-IXF6-c3sW-praMSF
   
  --- Physical volume ---
  PV Name               /dev/sda3
  VG Name               vg_jakedlin
  PV Size               29.71 GB / not usable 3.80 MB
  Allocatable           yes 
  PE Size (KByte)       4096
  Total PE              7606
  Free PE               134
  Allocated PE          7472
  PV UUID               uaDoZV-jtbG-0RD0-R6v7-0PGh-X3Al-fBBhC9
I obviously cannot unmount the root volume on a live system. Do I need to boot into a LVM aware LiveCD and extend the volume there?
Any help is appreciated.
 
Old 11-25-2009, 09:11 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,353

Rep: Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042
You need to extend the filesystem as well as the lv - what you've (effectively) done is analogous to resizing a (normal, non-LVM) partition without resizing the filesystem within.
I would expect Fedora to have a GUI for this - there are docs on the Redhat site, and tldp.org on how to do it with CLI commands.

And yes, I'd be inclined to do it from a liveCD.
 
Old 11-25-2009, 10:01 PM   #3
jakev383
QmailToaster Developer
 
Registered: Dec 2005
Location: Burlington, NC
Distribution: CentOS, Voyage, Debian, Fedora
Posts: 220

Original Poster
Rep: Reputation: 31
Thanks for that. I booted into my livecd, and then just:
resize2fs -p /dev/vg_jakedlin/lv_root

Rebooted (after a fsck) and all was well again!
 
  


Reply

Tags
extending, lvm


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 02:32 AM
LVM extend size bravored Linux - General 7 01-21-2009 01:13 PM
LVM only lets me extend online but not reduce with ext3 jimdaworm Debian 2 05-29-2008 11:16 AM
Add disc to RAID5 and extend 1 partition to use that space. fellz Linux - Hardware 1 11-16-2006 06:34 PM
How to extend an existing partition without LVM james.reid Linux - Software 14 06-02-2006 12:48 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration