"qemu-img: Cannot resize device files" when trying to shrink vm disk

kakao73

Member
Aug 1, 2018
20
1
8
I tried below:
Bash:
$ qemu-img resize -f raw --shrink $(pvesm path <lvm-thin-storage>:<vm-disk>) -1G
qemu-img: Cannot resize device files

How can I shrink it?
 
AFAIK, qemu-img doesn't handle LVM(-thin). You will need to use the lvreduce command directly.