I need to reduce the size of a hard disk.

corianito

Well-Known Member
Jul 20, 2019
46
0
46
38
Excuse my translation, I use a translator.

I need to reduce the size of a hard disk.

I have tried it with a test VPS and it seems to have worked, but before doing it in the real one, I want to ask if I am doing the right thing.

I do the following:

1. I run the iso gparted and reduce the partition.
2. I execute this command in proxmox:

qemu-img resize --shrink /var/lib/vz/images/1041/vm-1041-dzma3ixclmttiqhy-zjcr1l48qyhmgmxl.raw -5G

Result:

WARNING: Image format was not specified for '/var/lib/vz/images/1041/vm-1041-dzma3ixclmttiqhy-zjcr1l48qyhmgmxl.raw' and probing guessed raw.
Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
Specify the 'raw' format explicitly to remove the restrictions.
Image resized.

Is this the correct way to proceed with reduction or do I need to do something else?
 
Does anyone know anything about this disc reduction thing? I need to reduce it and I don't want to have any problems. That's why I ask about the procedure first, so they can tell me if it's right or wrong.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!