Logical Volume Manager (LVM) is a logical volume manager for the Linux Kernel; it manages disk drivers and similar mass-storage devices. The term “volume” refers to a disk drive or partition thereof.
This document assumes LVM is installed on the following Linux (LVM-aware) distributions:
- Arch Linux
- MontaVista Linux
- Redhat Enterprise Linux
This document assumes the virtual machines is virtualised in VMware ESX.
- Ensure backup is complete from the night before
- If any services are dependent on the volume, turn the services off
- eg: /etc/init.d/notes start
- shutdown –h now
- Increase hard disk in vSphere
- Power on virtual machine
- Stop services that have started automatically on start-up that depend on the volume
- eg: /etc/init.d/notes stop
- unmount <path>
- <path> = mount points to volume eg: /export
- pvresize –setphysicalvolumesize ###G /dev/sd#
- ###G = new size of disk in gigabytes
- /dev/sd# = disk
- lvresize –L +##G <path to logical volume>
- ##G = total capacity that has been added
- eg: lvresize +L +50G /dev/export/lvol0.
- e2fsck –f <path to logical volume>
- eg: e2fsck –f /dev/export/lvol0
- resize2fs <path to logical volume>
- eg: resize2fs /dev/export/lvol0
- mount –a
- Start any services stopped at point 6
- ps –aux | grep <service>
- Check service is started
Should you have any questions, comments or suggestions, please don’t hesitate to comment below. If you like what you have read, please share it on your favourite social media medium.