actual size shrink. how

Discussion in 'Proxmox VE: Installation and configuration' started by parbat bhatiya, Nov 4, 2018.

  1. parbat bhatiya

    parbat bhatiya New Member

    Joined:
    Jun 19, 2018
    Messages:
    22
    Likes Received:
    0
    hello

    i have. http://local:108/vm-108-disk-1.qcow2

    qcow2. size is. 1tb hard drive but used only 200 gb but even disk file qcow2 is 1tb size

    is there any way i can decrease as my data is only 200 gb

    how i can shrink and keep as what data size only can be disk size also possible or how ?
     
  2. dcsapak

    dcsapak Proxmox Staff Member
    Staff Member

    Joined:
    Feb 1, 2016
    Messages:
    3,515
    Likes Received:
    318
    how do you determine the size? notice that ls shows the 'virtual' size, not the one actual used. for this you can use 'du'
    like this:
    Code:
    du -sh /var/lib/vz/108/vm-108-disk-1.qcow2
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. parbat bhatiya

    parbat bhatiya New Member

    Joined:
    Jun 19, 2018
    Messages:
    22
    Likes Received:
    0
    yes i did like this but seeing full size instead of actual size ther eshould be 200 gb only as total 1tb but used only 200 gb
     
  4. janos

    janos Member

    Joined:
    Aug 24, 2017
    Messages:
    147
    Likes Received:
    13
    Run fstrim inside the VM, what will empty the unused bloks.
     
  5. parbat bhatiya

    parbat bhatiya New Member

    Joined:
    Jun 19, 2018
    Messages:
    22
    Likes Received:
    0
    data will not lost ?
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice