Git Product home page Git Product logo

thin-provisioning-reduction's Introduction

thin provisioned disk shrinking approach

The problem of thin provisioned disks for vms begins, when manny data is read and written to disk inside an VM. The then thin provishioned sys disk is not reduced after deletion, because the data is not overwritten, only marked. This means that a later hole punching of the thin provisioned disk is not possible. A solution is to first fill the disk with zeros, then delete the zero file. This makes hole punching possible.

The script needs to be executed in the VM. It writes the remaining size of the root file system disk with zeros. Then the file is deleted. This only works if the vm's root filesystem does not have compression on a filesystem level enabled (e.g btrfs with compression).

Afterwards the handling in the backend depends on the used hypervisor.

VMware ESXI

On an esxi system thin provisioned disk can be shrunk with this command. ''' vmkfstools -K [VM Name].vmdk '''

More information can be found here.

ZFS backed hypervisor

If youre disk are provided from a zfs storage, it is enough to have file system compression enabled. The zero file is realy easy to compress. The footprint is further reduced if deduplication is enabled, as it then will link all zero blocks to the same block. If you have exported a zvol of a zfs system to an VMware ESXI host, you can run the command on the ESXI server in addition.

Other cases i am currently not aware of, but if this is helpfull on your virtualisation system, use the simple script. Furthermore, if you want to, open an issue to add the information in this readme.

thin-provisioning-reduction's People

Contributors

tibersam avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.