Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

So, I have a 120 GB SSD (/dev/sdb) that I have a dual boot of Windows 7 and Fedora 17. When I first started I only have a 60 GB SSD so my space was very limited. I have a partition on my SSD (dev/sdb4) which I created with gparted, that shows a "Partition 5 LVM2" (dev/sdb5) below it which I believe is what the LVM is stored on(?).

Anyways, using gparted I extened my /dev/sdb4 to 27GB, which then created a "Free Space" of 17GB within /dev/sdb4. Now I need to combine /dev/sdb5 and the free space into one.

I've tried: lvextend -L+16G /dev/vg_mine/lv_root which results in:

Extending logical volume lv_root to 20.97 GiB
Insufficient free space: 512 extends needed, but only 0 available

I then used a resize2fs /dev/vg_mine/lv_root which results in:

The filesystem is already 1302528 blocks long, nothing to do!

Anybody point me in the right direction? Am I on the right track so far?

share|improve this question
    
Include fdisk output here.... –  mdpc Apr 2 '13 at 20:05

2 Answers 2

up vote 3 down vote accepted

Extend your physical volume first, and then the logical volume:

pvresize /dev/sdb4
lvextend /dev/vg_mine/lv_root

Note that I've left off the -L+16G — this will use all free space.

share|improve this answer
    
Neither of these commands seemed to work for me: pvresize /dev/sdb4 Failed to read physical volume "/dev/sdb4" 0 physical volume(s) resized / 0 physical volume(s) not resized lvextend /dev/vg_mine/lv_root Please specify either size or extents but not both Run lvextend --help for more information. –  Mr. Monkey Apr 2 '13 at 19:37
1  
what's the output of "pvs" ? Can you dpaste it? Also, fwiw, with LVM you don't really need to resize partitions (not having to is one of the benefits of LVM) you could have just added the other partition to the volume group and then extended out that way. –  Bratchley Apr 2 '13 at 20:03
    
Joel, that's what I think I'm trying to do. Is there another way to go about this? –  Mr. Monkey Apr 2 '13 at 21:36
1  
#pvs /dev/sdb5 vb_mine lvm2 a-- 9.91G 0 –  Mr. Monkey Apr 2 '13 at 21:37

Is /dev/sdb5 still a different partition? Then what you have to do is either repartition the space and combine /dev/sdb4 with /dev/sdb5.

Oh I assume nothing is in /dev/sdb5 that is important because you're its going to be destroyed in the process.

Another way, still destructive:

 - pvcreate /dev/sdb5
 - vgextend ..... /dev/sdb5
 - lvextend .....
 - then e2resize to resize the filesystem
share|improve this answer
    
Seems like my issues with this are coming from a mounted filesystem? –  Mr. Monkey Apr 2 '13 at 21:44
    
Well....yes, the filesystems on /dev/sdb5 have to be unmounted. Again, they will be destroyed. –  mdpc Apr 2 '13 at 21:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.