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 1U Firewall Appliance 10GbE, PFSense, Mikrotik, OPNsense, VPN, 2th Gen I3 2328M, 2350M, 2370M, RJ16, 6 x 2.5GbE I226-V, 2 x SFP+ 82599ES 10GbE, 0 RAM, 0 Storage, Barebone No System 1U Firewall Appliance 10GbE, PFSense, Mikrotik, OPNsense, VPN, 2th Gen I3 2328M, 2350M, 2370M, RJ… Aktuell keine Bewertungen 306,99 EUR
2 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 309,99 EUR
3 ROUAFWIT Mini PC 10Gbe Firewall 13th Gen U300E, 2 x 10 Gigabit SFP Micro Router Appliance Computer, 4 x i226V 2.5GbE Support Windows OPNsense, Barebone, NO RAM NO Storage NO System ROUAFWIT Mini PC 10Gbe Firewall 13th Gen U300E, 2 x 10 Gigabit SFP Micro Router Appliance Computer… Aktuell keine Bewertungen 439,45 EUR
4 MINIS FORUM MS-A2 Mini PC, AMD Ryzen 9 9955HX 16C/32T bis zu 5,4 GHz mit AMD Radeon 610M, Barebone ohne DDR5 RAM(Max bis zu 96GB)/SSD/OS, 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 9955HX 16C/32T bis zu 5,4 GHz mit AMD Radeon 610M, Barebone… Aktuell keine Bewertungen 835,00 EUR
5 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 695,00 EUR
6 Protectli Vault Pro VP2440-4 Port, Micro Appliance/Mini PC - Intel N150, 2X 10G SFP+ NICs, 2X 2.5G NICs, DDR5 RAM, 32GB eMMC on-Board, M.2 SATA SSD Storage, AES-NI, Barebones Protectli Vault Pro VP2440-4 Port, Micro Appliance/Mini PC – Intel N150, 2X 10G SFP+ NICs, 2X 2.5G… Aktuell keine Bewertungen 559,00 EUR
7 MINIS FORUM Mini PC MS-A2, AMD Ryzen 9 8945HX 16 Kerne/32 Threads Prozessor bis zu 5,4 GHz, Barebone ohne DDR5 RAM(Max bis zu 96GB)/SSD/OS, HDMI/USB-C x 2, 2,5G RJ45 x 2/10G SFP+ x 2, Wi-Fi 6E, BT5.2 MINIS FORUM Mini PC MS-A2, AMD Ryzen 9 8945HX 16 Kerne/32 Threads Prozessor bis zu 5,4 GHz, Barebone… Aktuell keine Bewertungen 610,00 EUR
8 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 595,00 EUR
9 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,00 EUR
10 MINIS FORUM MS-01 Mini PC, Core i9-13900H 14 Core/20 Thread Prozessor bis zu 5,4 GHz, Barebone ohne DDR5/PCIE SSD/OS, Mini-Desktop-Computer, HDMI/2 x USB4, 10G SFP+ Port ×2,2,5G RJ45x2 MINIS FORUM MS-01 Mini PC, Core i9-13900H 14 Core/20 Thread Prozessor bis zu 5,4 GHz, Barebone ohne… Aktuell keine Bewertungen 649,00 EUR