Expand a filesystem on Ubuntu / Linux without losing DATA

Expand the drive attached to your VM

lsblk 

Output would be something like this

 

Find the disk you want to expand

use resize2fs

sudo resize2fs /dev/sda

Output would look something like this

Filesystem at /dev/sda is mounted on /mnt/volume-example; on-line resizing requirednold_desc_blocks = 25, new_desc_blocks = 32nThe filesystem on /dev/sda is now 131072000 (4k) blocks long.

Leave a Reply

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