Imaging to a smaller disk

Rockel83

New Member
Sep 10, 2024
5
1
3
I've bought myself a cheap mini PC (Bmax) to run Proxmox.
It's a fine PC for so far to run some small servers for 24/7. But I'm only a bit sceptical about the SSD, while they just put all the cheap stuff they can find in mini PC's like this.

So I wanted to change the original 512GB SSD to something "more reliable".

I've bought myself a ne 256GB SSD, while it is more then sufficient for my use. But not realizing that disk images might act a bit differently.

There's just a small portion used on this original 528GB disk. Even way less then 256GB. But it seems my image software (Macrorit) sees it as a full disk.

I already made a sector to sector backup. But when trying to put this on a smaller 256GB I realized that this could be problematic since it's recognized as a full disk and that it not seems to recognize free disk space, being able to shrink/fit the image on a smaller 256GB disk.

Is there a way to shrink the image or disk of the 528GB disk so I can transfer it to a smaller 256GB disk without problems or data loss?
 
Last edited:
If you installed proxmox to standard ext4/lvm, reinstall to the smaller disk and copy your config over. Then restore VM/LXC from backup.

Trust me, this is going to be way easier than d--king around with LVM, shrinking, recreating lvm-thin, etc. or clonezilla.

You're not talking about a few megs here, your destination disk is literally half the size.

If you installed to ZFS you have more options.

https://github.com/kneutron/ansitest/tree/master/proxmox

Look into the bkpcrit script, point it to external disk / NAS, run it nightly in cron. Setup PBS on separate hardware if you haven't yet, and take advantage of dedup.