[linux-lvm] Resizing a logical volume which is mounted (at /home)

Males, Jess jmales at cio.sc.gov
Tue Jan 17 14:36:48 UTC 2012

Log in as root:
-              either once the system is completely booted, log in as root with the graphical prompt
-              boot into single user mode. i.e. stop grub in its countdown, edit the boot configuration by appending single to the list of kernel parameters

Or, boot with a live CD/USB environment.

I would recommend this last option.  Depending on the live environment, you might have to manually detect the volume group, but you're outside the installed system so you can change any logical volume without worry or conflict.

I would suggest the real lesson from all of this is: unless space constrained, never commit 100% of your vg.  The whole point of abstracting your disk into lvm is for flexibility, and how can you have flexibility without a little spare disk to apportion later?  I say this because you sound ready to slice X GB off lvhome and immediately commit it all to other logical volumes; keep some as spare.

-- Jess Males

From: linux-lvm-bounces at redhat.com [mailto:linux-lvm-bounces at redhat.com] On Behalf Of Kiran Rao
Sent: Monday, January 16, 2012 8:07 AM
To: linux-lvm at redhat.com
Subject: [linux-lvm] Resizing a logical volume which is mounted (at /home)

To start off, here's an overview of my configuration. I'm dual-booting Windows XP and Fedora Core 16. When I installed FC 16, here's how I created the partitions:

1) Volume Group (vg_me) - ~73 GB

Out of this, the following are the logical volumes:
a) lvhome (mount point - /home) - ~48GB
b) lvroot (mount point - /) ~10GB
c) lvvar (mount point - /var) ~15GB

So, there's no free space left on the volume group.

Now, I feel the 48GB is not really necessary for the /home. I want to redistribute the space among the 3 logical volumes within this VG, or create a new one (/tech).  In either case, I want to take the additional space (around 20GB) from lvhome and give it to either / or to /tech.

Now, I tried the GUI (system-config-lvm) tool to do this. I can click on lvhome and try to resize it. However, the problem is that since I am logged in as a non-root user, the /home is mounted. Resizing requires one to unmount it, but the unmount operation fails since I am mounted.

How do I work around this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20120117/54b81dac/attachment.htm>

More information about the linux-lvm mailing list