[linux-lvm] Resizing a logical volume which is mounted (at /home)
Stuart D. Gathman
stuart at bmsi.com
Tue Jan 17 18:15:38 UTC 2012
Long ago, Nostradamus foresaw that on Jan 16, Kiran Rao would write:
> 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?
Log out of GUI
Switch to text console (on linux try Ctrl-Alt-F3 for vt3)
Login as root
Unmount /home
resize2fs <device-for-home>
# WARNING! Make sure lvresize size is >= resize2fs size. If you aren't
# sure about the units, make lvresize larger than you think you made
# the filesystem. You can always expand the filesystems again, but
# you can't undo shrinking the LV too far.
lvresize <device-for-home>
mount /home
--
Stuart D. Gathman <stuart at bmsi.com>
Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.
More information about the linux-lvm
mailing list