Skip to content

Instantly share code, notes, and snippets.

@gstark
Created April 9, 2014 13:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gstark/10268311 to your computer and use it in GitHub Desktop.
Save gstark/10268311 to your computer and use it in GitHub Desktop.
How to expand an LVM volume
How to expand a volume
1) Add new disk to the VM
2) Ensure it shows up as a device
3) fdisk /dev/____
4) add a partition (primary?)
5) sudo pvcreate /dev/____
6) sudo pvs # get name of volume group
7) sudo vgextend NAME_OF_VOLUME_GROUP /dev/____
8) sudo lvextend -l+100%FREE /dev/NAME_OF_VOLUME_GROUP/root
9) sudo resize2fs /dev/mapper/NAME_OF_VOLUME_GROUP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment