Skip to content

Instantly share code, notes, and snippets.

@marko-asplund
Last active November 23, 2016 20:34
Show Gist options
  • Save marko-asplund/20b2706d2027666bb75a113aba6a6310 to your computer and use it in GitHub Desktop.
Save marko-asplund/20b2706d2027666bb75a113aba6a6310 to your computer and use it in GitHub Desktop.
Extending LVM based filesystem
# initialize physical device to be used as a physical volume with LVM
# (below we assume the newly added block device was "/dev/sdb")
pvcreate /dev/sdb
# add physical volume to volume group
vgextend ubuntu-vg /dev/sdb
# extend logical volume and file system
lvextend -r /dev/ubuntu-vg/root /dev/sdb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment