At the end of a restore operation a fatresize command is always performed even if one doesn't select the option to maximize the partition. Moreover, the fatresize command fails and produce a warning: Restore partition from ‘/home/taurus/efi.backup’ to ‘/dev/sda2’ Job: Restore the file system from file ‘/home/taurus/efi.backup’ to partition ‘/dev/sda2’ Copying 10 blocks (104857600 bytes) from 94371840 to 73495740416, direction: right. Copying 10 blocks (104857600 bytes) finished. Closing device. This may take a few seconds. Restore the file system from file ‘/home/taurus/efi.backup’ to partition ‘/dev/sda2’: Success Job: Check file system on partition ‘/dev/sda2’ Command: fsck.fat -a -w -v /dev/sda2 Check file system on partition ‘/dev/sda2’: Success Job: Maximize file system on ‘/dev/sda2’ to fill the partition Resizing file system from 104857600 to 204800 sectors. Command: fatresize --verbose --size 104857600 /dev/sda2 Maximize file system on ‘/dev/sda2’ to fill the partition: Error WARNING: Maximizing file system on target partition ‘/dev/sda2’ to the size of the partition failed. Restore partition from ‘/home/taurus/efi.backup’ to ‘/dev/sda2’: Warning
If I remember correctly, file system is always resized at the end of fsck operation. We manually run resize job in case filesystem size is less than partition size. GParted does that too. Does KDE Partition Manager report that operation succeeded (since it's a warning only)? It wasn't clear to me from this bug.
(In reply to Andrius Štikonas from comment #1) > Does KDE Partition Manager report that operation succeeded (since it's a > warning only)? It wasn't clear to me from this bug. Yes, the final result reported by PM is that the operation succeeded. This is just a warning issued in the details log.
Hmm, I think this might be off by 1 error in fatresize or libparted... Trying to resize to partition size - 1 seems to work.
Git commit 7ecdaf3ac8f63de014fce26e95444f4a420ffcb3 by Andrius Štikonas. Committed on 04/10/2020 at 21:21. Pushed by stikonas into branch 'master'. Fix resizing of fat partitions. Workaround a bug in fatresize (or libparted) where resizing to partition length failed. Instead try to resize to length - 1. M +1 -1 src/fs/fat16.cpp https://invent.kde.org/system/kpmcore/commit/7ecdaf3ac8f63de014fce26e95444f4a420ffcb3