Topic: [SOLVED] Can't shrink ext4 smaller than 30GB but still 8GB free
I have a spinning disk with software on it that I want to propagate using dd to a flash drive - to do a partition copy. The source partition on sdd below is 29.7 GB, the target partition on sdb is 29GB
The source partition has about 8GB free so the interesting content will fit nicely on the target, sdb. I tried to shrink the source partition using gparted but hit a barrier of some kind at 30GB nominal and can't get gparted to take a smaller figure, 28GB say, which would be fine.
Does anyone have experience with this shrinking limit? I'm a little hesitant to try it and see without scoping it out a bit.
Dave
gparted 1.0.0 mint 19
$ sudo fdisk /dev/sdb
[sudo] password for dave:
Welcome to fdisk (util-linux 2.34).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): p
Disk /dev/sdb: 29 GiB, 31142707200 bytes, 60825600 sectors
Disk model: USB Flash Disk
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x8b07ed85
Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 60823551 60821504 29G 83 Linux
Command (m for help): q
dave@dave-2021:~$ sudo fdisk /dev/sdd
Welcome to fdisk (util-linux 2.34).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): p
Disk /dev/sdd: 698.65 GiB, 750156374016 bytes, 1465149168 sectors
Disk model: USB3.0 Device
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x4fa27943
Device Boot Start End Sectors Size Id Type
/dev/sdd1 * 2048 62169087 62167040 29.7G 83 Linux
Command (m for help): q