Linux – Can’t resize ext4 partition

clonefilesystemslinuxssd

I have an 500GB HDD disk (480GB free) that I need to clone it to an SSD 240GB.

I have read that cloning the HDD to the SSD should work for NTFS filesystems. But it isn't working for the ext partition.

So, what I am trying to do is resizing the ext4 partition into two partitions:

  1. Ext4 – 20GB
  2. 480GB Unallocated

I tried using gparted UI to resize the HDD but I am not being able.

Any suggestions?

Best Answer

try 'resize2fs'...

with 'resize2fs -P /dev/yourpartition ' it shows you the minimal size to resize.

and with 'resize2fs -M /dev/yourpartition': Shrink the file system to minimize its size as much as possible, given the files stored in the file system.

if you've more then one partition on disk you have to move this partitions (after shrinking) and of course make a backup!