[PVE-User] shrinking a qcow2 disk

Eneko Lacunza elacunza at binovo.es
Mon May 18 09:46:50 CEST 2015


Hi Miguel,

Did you check:
https://pve.proxmox.com/wiki/Shrink_Qcow2_Disk_Files

For real resizing, you must:

0. Make a backup
1. Reboot to a live CD
2. Reduce the filesystem(s) in the disk if necessary
3. Reduce and/or move the partitions, so that there isn't any on the end 
of the disk.
4. Reduce the disk using qemu-img

Good luck!
Eneko

On 16/05/15 20:30, Miguel Gonzalez wrote:
> Dear all,
>
>   I have been searching around how to resize a disk that was created 
> for 256 Gb but currently only has 50 Gb. Unfortunately it grew up to 
> 108 Gb and now I can't claim the spaces by the files I have already 
> deleted.
>
>   If possible, I would like to avoid any downtime or minimize it. Some 
> people claim that using qemu-img convert would do the trick instead of 
> converting to raw format.
>
>   Is there any way to avoid downtime or any configuration to avoid it 
> in the future? I'm running proxmox 3.3-1
>
>
>
> # qemu-img info vm-102-disk-1.qcow2
> image: vm-102-disk-1.qcow2
> file format: qcow2
> virtual size: 256G (274877906944 bytes)
> disk size: 180G
> cluster_size: 65536
> Snapshot list:
> ID        TAG                 VM SIZE DATE       VM CLOCK
> 1         snapshot_21022015         0 2015-02-21 16:24:32 00:00:00.000
> Format specific information:
>     compat: 1.1
>     lazy refcounts: false
>
>
>
>
> _______________________________________________
> pve-user mailing list
> pve-user at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user


-- 
Zuzendari Teknikoa / Director T├ęcnico
Binovo IT Human Project, S.L.
Telf. 943575997
       943493611
Astigarraga bidea 2, planta 6 dcha., ofi. 3-2; 20180 Oiartzun (Gipuzkoa)
www.binovo.es

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pve.proxmox.com/pipermail/pve-user/attachments/20150518/9d584608/attachment-0015.html>


More information about the pve-user mailing list