(Accidentally opened this topic early, whoops! Asking about pvmove was an xy problem)
The actual issue I have is that I’m trying to do pvresize --setphysicalvolumesize 470G /dev/nvme0n1p3, but get this output instead:
/dev/nvme0n1p3: Requested size 470.00 GiB is less than real size <475.94 GiB. Proceed? [y/n]: y
WARNING: /dev/nvme0n1p3: Pretending size is 985661440 not 998115983 sectors.
/dev/nvme0n1p3: cannot resize to 120319 extents as later ones are allocated.
0 physical volume(s) resized or updated / 1 physical volume(s) not resized
For the pvmove problem, which I note because that’s a problem I was just hitting and this post turned up in my search results, you need the dm-mirror kernel module, which probably means adding "dm-mirror" to the boot.initrd.kernelModules list in your hardware-configuration.nix.
For the pvresize problem, pvmove might be the solution you need: the issue is that the PV contains data that’s stored somewhere that would be beyond the end of the PV after you had shrunk it.
You’ll need to move that data somewhere else, either earlier in the physical volume or onto a different volume. pvdisplay -m is useful for working out what extents are located where, then your next steps will depend on what you want to do with the data that’s past where you want the PV to end, but the examples at the bottom of man pvmove might be useful.