Letztens habe ich aus Versehen bei einer sehr kleinen VM innerhalb von Proxmox die Festplatte mit dem normalen Resize Tool vergrößert und zwar viel zu groß. Aber auch schnell bemerkt die Proxmox GUI lässt einen natürlich nicht zurück und das RAW Device hat dann halt die ausgewählte größe und Ende. Also schnell mal gucken wie man das verkleinern kann.

Wenn es sich wie bei mir nur um ein RAW-Device handelt, dann ist der Weg sehr einfach.

# Finde den Pfad deines RAW Devices auf deinem System und verkleiner die Disk #
# --shrink - steht für die Zielgröße und nicht um wieviel kleiner gemacht werden soll #

qemu-img resize -f raw /var/lib/vz/images/100/vm-100-disk-0.raw --shrink 5G

Damit ist das RAW Device physikalisch schon mal kleiner, aber Proxmox weis das noch nicht so wirklich. Also ändern wir händisch in der Proxmox Umgebung diesen Status.

# QM Files liegen unter /var/pve/qemu-server/<vm-id>.conf #
nano /etc/pve/qemu-server/100.conf

# Ändere die Zeile in deine korrekt Größe der RAW Disk #
scsi0: local:100/vm-100-disk-0.raw,iothread=1,size=5G

Jetzt müssen wir nur noch „qm“ auch Bescheid geben, dass die Disk sich verkleinert hat. Ein „qm rescan“ löst auch das Problem.

# qm rescan guckt über ALLE Disks und passt ggf. die Größen an #

qm rescan

Jetzt ist deine Disk verkleinert und wird auch im Backup wieder normal mit dieser Größe erkannt.

# Vorschau Produkt Bewertung Preis
1 MINIS FORUM MS-01 Mini Workstation Intel Core i9-13900H (vPro Enterprise) Mini PC,2X 10Gbps SFP+/2X 2.5G RJ45/2x USB4/HDIM/1x PCIe4.0x16 slot/3x M.2 2280/22110/U.2 SSD,Pas de RAM/SSD MINIS FORUM MS-01 Mini Workstation Intel Core i9-13900H (vPro Enterprise) Mini PC,2X 10Gbps SFP+/2X… Aktuell keine Bewertungen 687,00 EUR
2 MINIS FORUM MS-01 Mini Workstation Intel Core i5-12600H (vPro Enterprise Support) Mini PC,2X 10Gbps SFP+/2X 2.5G RJ45/2x USB4/HDIM/1x PCIe4.0x16 Slot/Support 3X M.2 2280/22110/U.2 SSD,Pas de RAM/SSD MINIS FORUM MS-01 Mini Workstation Intel Core i5-12600H (vPro Enterprise Support) Mini PC,2X 10Gbps… Aktuell keine Bewertungen 439,85 EUR
3 MNBOXCONET S2 Mini PC N305 10GBE SFP+, Firewall Appliance Micro Büro Hardware, Barebone No RAM No SSD, 2xi226V 2.5Gbit LAN, USB C, TF Card Slot, Support Proxmox OPNsense, SPK/MIC MNBOXCONET S2 Mini PC N305 10GBE SFP+, Firewall Appliance Micro Büro Hardware, Barebone No RAM No… Aktuell keine Bewertungen 378,86 EUR
4 MNBOXCONET S2 Mini PC N150 10GBE SFP+, Firewall Appliance Micro Büro Hardware, Barebone No RAM No SSD, 2xi226V 2.5Gbit LAN, USB C, TF Card Slot, Support Proxmox OPNsense, SPK/MIC MNBOXCONET S2 Mini PC N150 10GBE SFP+, Firewall Appliance Micro Büro Hardware, Barebone No RAM No… Aktuell keine Bewertungen 331,82 EUR
5 MNBOXCONET S2 Mini PC N305 10GBE SFP+, Firewall Appliance Micro Büro Hardware, DDR5 8GB RAM 256GB SSD, 2xi226V 2.5Gbit LAN, USB C, TF Card Slot, Support Proxmox OPNsense, SPK/MIC MNBOXCONET S2 Mini PC N305 10GBE SFP+, Firewall Appliance Micro Büro Hardware, DDR5 8GB RAM 256GB… Aktuell keine Bewertungen
6 MINIS FORUM MS-01 Mini PC, Prozessor Core i5-12600H 12C/16T bis zu 4,5 GHz, Barebone ohne DDR5 SODIMM/M.2 2280 NVME SSD/3x M.2 2280/22110/U.2 SSD/OS, HDMI/2 x USB4/Port SFP+ 10G×2/2,5G RJ45x2 MINIS FORUM MS-01 Mini PC, Prozessor Core i5-12600H 12C/16T bis zu 4,5 GHz, Barebone ohne DDR… Aktuell keine Bewertungen 439,99 EUR
7 HAICOTECH 82599ES Firewall-Mini-PC Core i3-N300 Dual 10G SFP+ Barebone Computer, 3X 2,5-GbE-i226-V-LAN-Heimserver, AES-NI, 6 USB-Anschlüsse, SIM-Kartensteckplatz, Dual-4K-HDMI+DP-Mikrorouter HAICOTECH 82599ES Firewall-Mini-PC Core i3-N300 Dual 10G SFP+ Barebone Computer, 3X… Aktuell keine Bewertungen 320,98 EUR
8 UbiQuiti ER-X-SFP UbiQuiti ER-X-SFP Aktuell keine Bewertungen 69,90 EURAmazon Prime
9 MINIS FORUM MS-A2 Mini PC, AMD Ryzen 9 7945HX CPU 16 Kerne 32 Threads, bis zu 5,4 GHz, AMD Radeon 610M, Barebone ohne DDR5 RAM/PCIe 4.0 SSD, HDMI/USB-C x 2/2,5G RJ45 x 2/10G SFP x 2, Wi-Fi 6E, BT5.2 MINIS FORUM MS-A2 Mini PC, AMD Ryzen 9 7945HX CPU 16 Kerne 32 Threads, bis zu 5,4 GHz, AMD Radeon… Aktuell keine Bewertungen 599,00 EUR
10 MINIS FORUM MS-02 Ultra Mini PC, Core Ultra 9 285HX Prozessor (24C/24T bis 5,5 GHz) und Intel Graphics, Barebone Version 4 X DDR5/4 X NVMe SSD, HDMI/USB4/2 x USB4 V2, 2x25G SFP+, 10G RJ45, 2.5G RJ45 MINIS FORUM MS-02 Ultra Mini PC, Core Ultra 9 285HX Prozessor (24C/24T bis 5,5 GHz) und Intel… Aktuell keine Bewertungen 1.239,00 EUR