chebe: (StormyThoughts)
[personal profile] chebe
This post is brought to you by the need to write down what I did, so I can figure out how to fix it in the morning. Follow it at your peril.

There are a few things I really dislike in the land of linux, and LVM on a single-disc laptop is high on the list. Mostly because I don't really know how to use it.

Motivation; There seems to be something very wrong with libusb on Fedora 15, but, and it hurts me to say this, it is just fine on Ubuntu 11.04. So I wanted to shrink my Fedora installation and dual-boot with Ubuntu. Sounds easy, doesn't it?

(Half-way through I remembered that I'd made a note to myself to always install Ubuntu first in these circumstances, but, well, that wasn't an option. So, into the tangled depths of LVM went I.)

gparted doesn't work with lvm, this made me sad. Figuring I had to fight fire with fire I downloaded the Fedora 15 Live CD. Boot into it, yum install system-config-lvm. Start system-config-lvm and resize home and root volumes to free up space. But things are looking a bit fragmented, won't be able to shrink size of VolGroup with things like this. So, make a new lv, exact same size as root, but contiguous with the other lvs. From command line, load up lvs and copy;
lvm vgchange -a y
dd if=/dev/VolGroup/lv-root of=/dev/VolGroup/lv-root2 bs=4M

Then go back into system-config-lvm, rename lv-root as lv-root-orig, and lv-root2 as lv-root. Then remove lv-root-orig (and any snapshots related to it).

Now all the data is on the left of the physical volume, and the empty space on the right. From command line;
lvm vgchange -a y
pvresize --setphysicalvolumesize 100G /dev/sda2

Done. Boot back into hard-drive, everything still works, but there's a missing 50GB that's not showing up. Not in system-config-lvm, not in disc utilities, not in gparted. Oops. The lvm aware tools say it's not in the VolGroup, don't see it at all. The lvm unaware tools say the VolGroup still takes up the entire disc. What to do? *scratches head*

Anonymous (will be screened)
OpenID (will be screened if not validated)
Identity URL: 
Account name:
If you don't have an account you can create one now.
HTML doesn't work in the subject.


If you are unable to use this captcha for any reason, please contact us by email at

Notice: This account is set to log the IP addresses of everyone who comments.
Links will be displayed as unclickable URLs to help prevent spam.
Page generated 2017-Oct-21, Saturday 01:01 am
Powered by Dreamwidth Studios