Overview

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.

Assumptions

This document assumes LVM is installed on the following Linux (LVM-aware) distributions:

  • Arch Linux
  • CrunchBang
  • CentOS
  • Debian
  • Fedora
  • Gentoo
  • Mandriva
  • MontaVista Linux
  • openSUSE
  • Pardus
  • Redhat Enterprise Linux
  • Slackware
  • SLED
  • SLES
  • Ubuntu

This document assumes the virtual machines is virtualised in VMware ESX.

Instructions

  1. Ensure backup is complete from the night before
  2. If any services are dependent on the volume, turn the services off
    1. eg: /etc/init.d/notes start
  3. shutdown –h now
  4. Increase hard disk in vSphere
  5. Power on virtual machine
  6. Stop services that have started automatically on start-up that depend on the volume
    1. eg: /etc/init.d/notes stop
  7. unmount <path>
    1. <path> = mount points to volume eg: /export
  8. pvresize –setphysicalvolumesize ###G /dev/sd#
    1. ###G = new size of disk in gigabytes
    2. /dev/sd# = disk
  9. lvresize –L +##G <path to logical volume>
    1. ##G = total capacity that has been added
    2. eg: lvresize +L +50G /dev/export/lvol0.
  10. e2fsck –f <path to logical volume>
    1. eg: e2fsck –f /dev/export/lvol0
  11. resize2fs <path to logical volume>
    1. eg: resize2fs /dev/export/lvol0
  12. mount –a
  13. Start any services stopped at point 6
  14. ps –aux | grep <service>
    1. 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.

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.