Skip to content

Instantly share code, notes, and snippets.

@aspyct
Created April 26, 2020 19:15
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 aspyct/79666f7d1bc3472ffeb9d8e60ba49ff8 to your computer and use it in GitHub Desktop.
Save aspyct/79666f7d1bc3472ffeb9d8e60ba49ff8 to your computer and use it in GitHub Desktop.
Ubuntu server expand lvm root volume
$ sudo lvm
lvm> lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv
Size of logical volume ubuntu-vg/ubuntu-lv changed from 4.00 GiB (1024 extents) to 110.78 GiB (28360 extents).
Logical volume ubuntu-vg/ubuntu-lv successfully resized.
lvm> exit
Exiting.
$ sudo resize2fs /dev/ubuntu-vg/ubuntu-lv
resize2fs 1.44.1 (24-Mar-2018)
Filesystem at /dev/ubuntu-vg/ubuntu-lv is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 14
The filesystem on /dev/ubuntu-vg/ubuntu-lv is now 29040640 (4k) blocks long.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment