Resizing LVM -

Chris Murphy lists at colorremedies.com
Sun Feb 2 20:15:19 UTC 2014


On Feb 2, 2014, at 8:56 AM, "Bob Goodwin - Zuni, Virginia, USA" <bobgoodwin at wildblue.net> wrote:

> I have a computer with a 1TB drive taken up completely with an F-19 system. I'd like to squeeze that down and make room for anther Linux partition but I can't seem to get started.
> 
> I have an F-19 DVD that I have been trying to use for booting into the "rescue" mode but I may not be doing it right. I can stumble through until I get a point where it says "An error occurred trying to mount some or all of your system. Some of it may be mounted under /mnt/sysimage. Press return to get a shell."
> 
> That gets another box offering: start shell, fakd, reboot.
> 
> From the shell I do chroot /mnt/sysimage.
> 
> Then ls lists a familiar list of directories, however there is nothing in those directories e.g. home, root, etc.
> 
> At that point I am stumped!
> 
> 

Yet another example of how LVM by default is unhelpful for mortal users. 

Is this BIOS or UEFI? Is the partition scheme MBR or GPT? Please show what layout you currently have, and what layout your other Linux installation requires. Please provide the results from:

parted -s /dev/sdX u s p

And for the new layout, I'm thinking it needs its own /boot partition and will use LVM for everything else, yes?

What have you done so far? You shouldn't have empty directories.

> Suggestions solicited, maybe I should just give up and re-install?

It's a lot easier to do this with GPT and plain partitions; and with Btrfs it's easy and efficient in that  you can still have LV-like subvolumes but you don't have to deal with individually shrinking them.

For LVM the gist is you:

1. shrink a file system on an LV
2. shrink the LV
3. pvmove to move extents from the end of the LVM partition so that free extents are at the end
4. pvresize to shink the PV
5. vgreduce to account for the shrunk PV
6. fdisk/parted to change the PV partition size and create a new partition

system-storage-manager might be able to do some or all of those steps for you with a single command, but I haven't tried it.


Chris Murphy


More information about the users mailing list