Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 19/20 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11th March 2012, 05:30 PM
tmort Offline
Registered User
 
Join Date: Feb 2006
Posts: 284
linuxchrome
Extend LVM into unallocated space after using clonezilla to clone to a larger HD

I have F16 and have just cloned my old HD to a larger HD. now have:

/dev/sda1 ext4 500Mb
/dev/sda2 LVM2 150 Gb
unallocated 550 Gb

I would like to add the unallocated space to sda2.

I see gparted doesn't support LVM. I've found some discussion of this, but, I can't follow the suggestions.
Reply With Quote
  #2  
Old 11th March 2012, 05:39 PM
DBelton Offline
Administrator
 
Join Date: Aug 2009
Posts: 7,320
linuxfirefox
Re: Extend LVM into unallocated space after using clonezilla to clone to a larger HD

have you tried installing system-config-lvm? It has a graphical interface to manipulate your lvm's with.

Code:
yum install system-config-lvm
Reply With Quote
  #3  
Old 11th March 2012, 06:02 PM
smr54 Offline
Registered User
 
Join Date: Jan 2010
Posts: 5,513
linuxchrome
Re: Extend LVM into unallocated space after using clonezilla to clone to a larger HD

I have a page on lvm which might be useful, goes through the steps.

http://home.roadrunner.com/~computertaijutsu/lvm.html
Reply With Quote
  #4  
Old 12th March 2012, 05:53 AM
tmort Offline
Registered User
 
Join Date: Feb 2006
Posts: 284
linuxchrome
Re: Extend LVM into unallocated space after using clonezilla to clone to a larger HD

The page was useful although I do have a couple questions.

I'll have to clone my drive again, but, when I added the space to the the partition I didn't get anywhere near where I should have. I had 549 GB unallocated so I (thought anyway) added 1024 * 549 = +562176 to the default starting point. The first time I was able to delete the new partition, the second time I also did the create volume group step. That time I went to delete the new partition with gparted and I don't know if I selected the wrong one or if something else was going on, but, I managed to delete the partition with all the files, etc.

Also I tried to unmount with the umount /lvm_mount command and got a command not found message.
Reply With Quote
  #5  
Old 12th March 2012, 12:55 PM
smr54 Offline
Registered User
 
Join Date: Jan 2010
Posts: 5,513
linuxfirefox
Re: Extend LVM into unallocated space after using clonezilla to clone to a larger HD

LVM does use a lot of space as overhead--that is, it reserves space for various reasons, I believe the default is 10 percent.

I'm not sure why you would get a command not found for umount, assuming you didn't mistype it. Make sure you have util-linux installed

rpm -q util-linux
Reply With Quote
  #6  
Old 13th March 2012, 12:41 AM
tmort Offline
Registered User
 
Join Date: Feb 2006
Posts: 284
linuxchrome
Re: Extend LVM into unallocated space after using clonezilla to clone to a larger HD

I still had problems entering the end location, but, I noticed it suggested a default value to I chose that and it worked.

Also I see why it didn't recognize unmount. It's because I read it wrong. It is supposed to be umount. However,
I get:

umount /lvm_mount
umount: /lvm_mount: not found
[root@localhost ~]#


I'm assuming that I have to type in my actual value for /lvm_mount, but, don't know what it should be.

The volume I want to extend is lvm2 and the partition I just created is lvm3. They are on /dev/sdb2 and /dev/sdb3 respectively.
Reply With Quote
  #7  
Old 13th March 2012, 06:54 AM
Doug G Offline
Registered User
 
Join Date: Jul 2005
Posts: 640
linuxfirefox
Re: Extend LVM into unallocated space after using clonezilla to clone to a larger HD

If it helps, I went through a similar resize when I expanded the vdisk for a virtual machine and expanded the fedora root lvm fo fill the new disk size. This was using MSDOS partition table, I don't know if GPT partitons would need something different. My VM name is vm201. Also my lvm partition was at the end of the disk, if it was sandwiched inbetween other partitions I doubt this procedure would work.

Here's what I did to add 2GB to my virtual machine disk and fedora root lvm.

* qemu-img resize /lcfvm/image/vm201.img +2G
* fdisk /dev/vda and delete current lvm partition. Get start sector of the partition first
* fdisk /dev/vda and re-add new primary partition with the same start and higher end. Make sure you give it type 8e (lvm)
* Reboot and check that fdisk shows bigger partition
* pvresize /dev/vda2
* vgdisplay and get unallocated pv extents (64 is 2GB)
* lvextend -l +64 /dev/vg_kvm201/lv_root
* resize2fs /dev/vg_kvm201/lv_root
__________________
======
Doug G
======
Reply With Quote
  #8  
Old 13th March 2012, 09:05 AM
tmort Offline
Registered User
 
Join Date: Feb 2006
Posts: 284
linuxchrome
Re: Extend LVM into unallocated space after using clonezilla to clone to a larger HD

I have got it to extend:


[root@localhost ~]# vgextend VolGroup /dev/sdb3
Found duplicate PV ILzY2ockOx1dlNHvP8GcNaTUoE5JwUn5: using /dev/sdb2 not /dev/sda2
Volume group "VolGroup" successfully extended
[root@localhost ~]# vgdisplay
Found duplicate PV ILzY2ockOx1dlNHvP8GcNaTUoE5JwUn5: using /dev/sdb2 not /dev/sda2
--- Volume group ---
VG Name VolGroup
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 5
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 3
Max PV 0
Cur PV 2
Act PV 2
VG Size 698.09 GiB
PE Size 32.00 MiB
Total PE 22339
Alloc PE / Size 4753 / 148.53 GiB
Free PE / Size 17586 / 549.56 GiB
VG UUID hRR6VB-uGgb-4sqM-0HPv-3jeq-uRGi-8rHpce

I don't know what to type after resize2fs

This is what I have tried:

[root@localhost ~]# resize2fs /dev/VolGroup
resize2fs 1.41.14 (22-Dec-2010)
open: Is a directory while opening /dev/VolGroup
[root@localhost ~]# resize2fs /dev/sdb2/VolGroup
resize2fs 1.41.14 (22-Dec-2010)
open: Not a directory while opening /dev/sdb2/VolGroup
Reply With Quote
  #9  
Old 13th March 2012, 03:48 PM
stevea Offline
Registered User
 
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,829
linuxfedorafirefox
Re: Extend LVM into unallocated space after using clonezilla to clone to a larger HD

Quote:
Originally Posted by smr54 View Post
LVM does use a lot of space as overhead--that is, it reserves space for various reasons, I believe the default is 10 percent.
I'm pretty certain that is wrong. LVM has very low space overhead IIRC.
The filesystems like ext3/4 have substantial overhaed (~5% default) but that's recoverable.
__________________
None are more hopelessly enslaved than those who falsely believe they are free.
Johann Wolfgang von Goethe
Reply With Quote
  #10  
Old 13th March 2012, 05:07 PM
tmort Offline
Registered User
 
Join Date: Feb 2006
Posts: 284
linuxchrome
Re: Extend LVM into unallocated space after using clonezilla to clone to a larger HD

I ran vgdisplay and figured lv/home would be the device for resize

[root@localhost ~]# vgdisplay
/dev/VolGroup/lv_home: read failed after 0 of 4096 at 100495458304: Input/output error
/dev/VolGroup/lv_home: read failed after 0 of 4096 at 100495515648: Input/output error
/dev/VolGroup/lv_home: read failed after 0 of 4096 at 0: Input/output error
/dev/VolGroup/lv_home: read failed after 0 of 4096 at 4096: Input/output error
Found duplicate PV ILzY2ockOx1dlNHvP8GcNaTUoE5JwUn5: using /dev/sdc2 not /dev/sda2
--- Volume group ---
VG Name VolGroup
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 5
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 3
Max PV 0
Cur PV 2
Act PV 2
VG Size 698.09 GiB
PE Size 32.00 MiB
Total PE 22339
Alloc PE / Size 4753 / 148.53 GiB
Free PE / Size 17586 / 549.56 GiB
VG UUID hRR6VB-uGgb-4sqM-0HPv-3jeq-uRGi-8rHpce

I then did lvextend

[root@localhost ~]# lvextend -l 17586 /dev/VolGroup/lv_home
/dev/VolGroup/lv_home: read failed after 0 of 4096 at 100495458304: Input/output error
/dev/VolGroup/lv_home: read failed after 0 of 4096 at 100495515648: Input/output error
/dev/VolGroup/lv_home: read failed after 0 of 4096 at 0: Input/output error
/dev/VolGroup/lv_home: read failed after 0 of 4096 at 4096: Input/output error
Found duplicate PV ILzY2ockOx1dlNHvP8GcNaTUoE5JwUn5: using /dev/sdc2 not /dev/sda2
Extending logical volume lv_home to 549.56 GiB
Logical volume lv_home successfully resized

But when I unmounted /dev/sdc and tried resize2fs I got:

[root@localhost ~]# umount /dev/sdc
umount: /dev/sdc: not mounted

[root@localhost ~]# umount /dev/sdc2
umount: /dev/sdc2: not mounted

[root@localhost ~]# umount /dev/sdc3
umount: /dev/sdc3: not mounted

[root@localhost ~]# resize2fs /dev/VolGroup/lv_home
resize2fs 1.41.14 (22-Dec-2010)
Filesystem at /dev/VolGroup/lv_home is mounted on /home; on-line resizing required
old desc_blocks = 6, new_desc_blocks = 35
resize2fs: Permission denied to resize filesystem

???
Reply With Quote
Reply

Tags
clone, clonezilla, extend, larger, lvm, space, unallocated

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert Unallocated space to Free space trilip Installation, Upgrades and Live Media 1 7th June 2010 04:48 PM
unallocated space frojd Hardware & Laptops 0 20th September 2007 10:37 PM
Add unallocated space to partition macondo Using Fedora 2 23rd June 2007 12:59 AM
format unallocated space skyshadow Using Fedora 4 26th December 2006 05:33 PM
Can't format Unallocated free space txcrittr Installation, Upgrades and Live Media 3 17th January 2006 08:34 PM


Current GMT-time: 11:28 (Tuesday, 16-09-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat