I need to reduce the size of a hard disk.

corianito

Well-Known Member
Jul 20, 2019
48
0
46
39
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.