In order to make space for an additional unencrypted FAT32 partition on my SSD, I am trying to shrink an existing LUKS Container.
To this end booted on a LUBUNTU Live USB 22.04.1, launched KDE Partition Manager, unlocked the LUKS Container, successfully downsized the logical volumes inside and in a final step tried to apply a resize/shrink to the container.
this produced the following error:
Date: 8 Oct 2022 17:14:46 Program version: 21.12.3 Backend: pmsfdiskbackendplugin (1) KDE Frameworks version: 5.91.0 Machine: Linux lubuntu 5.15.0-43-generic #46-Ubuntu SMP Tue Jul 12 10:30:17 UTC 2022 x86_64
Shrink partition ‘/dev/nvme0n1p3’ from 951.70 GiB to 935.72 GiB Job: Check file system on partition ‘/dev/nvme0n1p3’ Command: lvm pvck
--verbose /dev/mapper/luks-24ed092b-c069-4d2c-8b25-bfb3f08840ee Check file system on partition ‘/dev/nvme0n1p3’: Success Job: Resize file system on partition ‘/dev/nvme0n1p3’ to 1,962,346,496 sectors
Resizing file system from 1,995,857,920 to 1,962,346,496 sectors.
Command: lvm pvmove --alloc anywhere /dev/mapper/luks-24ed092b-c069-4d2c-8b25-bfb3f08840ee:239544-243629 /dev/mapper/luks-24ed092b-c069-4d2c-8b25-bfb3f08840ee:0-239543 Command: lvm pvresize --yes --setphysicalvolumesize -17157849088B /dev/mapper/luks-24ed092b-c069-4d2c-8b25-bfb3f08840ee
Resizing encrypted file system on partition ‘/dev/nvme0n1p3’ failed.
Resize file system on partition ‘/dev/nvme0n1p3’ to 1,962,346,496 sectors: Error
Resize/move failed: Could not resize file system to shrink partition ‘/dev/nvme0n1p3’.
any suggestion or idea is welcome - need help on this !