Home » News & Politics » How to Resize a Live Filesystem on Linux

How to Resize a Live Filesystem on Linux

Written By emptythevoid on Monday, Jan 14, 2019 | 01:54 PM

 
Before anything else, BACKUP your stuff! This method is risky, and only works on ext2/3/4 filesystems Use fdisk /dev/sda to check current start/end sectors Use fdisk to delete the partition Use fdisk to create a new partition with same starting sector, but new end sector. Verify that your changes are what you want. Write fdisk changes. Verify the new partition is the expected size. Use sudo resize2fs /dev/sda1 to resize the filesystem to utilize all space in the new partition. Verify the partition is the expected size. Reboot for safety.