VMWare Reclaims disk space

Source: Internet
Author: User
Tags pdf manual

Two-part content:

1) Recover the disk space of the guest VM in VMware Player and return it to host under the actual operation experience;

2) by the way, turn over the previous notes about VMware Unmap/reclaim, a comparison summary.

1. Reclaim VMware disk space

The notebook uses Vmwareplayer 7 (for personal version, installed in Win/mac), which contains UBUNTU15. Thin disk. Less than half a year, a few toss down to find the VM accounted for the space on the go up now to occupy 40+GB. Under reflection, mainly due to linuxpackage upgdate, create delete dockerimage. The immediate consequence is that the 180GB space is exhausted. Delete the useless files in the VM, the next major problem, the VM will need to thin disk space back to the book.

Try the player's menu to do defragmentation-compression, as long as the back 3GB, not enough, guest Linux has 38GB free

[Email protected]:/media/osboxes/vmware tools$ DF-LH

Filesystem Size used Avail use% mounted on

Udev 568M 0 568M 0%/dev

Tmpfs 116M 9.3M 107M 9%/run

/DEV/SDA1 48G 7.2G 38G 17%/

You should start with VMware Tools from the guest OS, and Vwmare will put a tool in the guest OS (it should be mount to guest). Need to install it yourself, Linux called Vmware-toolbox-cmd, through it to initiate recycling.

[Email protected]:~ #vmware-toolbox-cmd Help disk

Disk:perform Disk shrink Operations

Subcommands:

List:list Available Locations

Shrink <location>: Wipes and shrinks a file system at the Givenlocation

Shrinkonly:shrinks All disks

Wipe <location>: Wipes a file Systemat the given location

I'm using a shrink. Root privileges are required, there are some limitations (it is best to look at the following PDF manual, the sound path does not support JOURNALINGFS:EXT4/XFS/JFS, what fuck ext3 do not forget? Anyway, I run it straight ext4, and I'm right.

1. Preparation phase : The main collection of unused guest OS unused blocks (such as deleted files). VMware will take the reclaimed space to the master/inflate, lest it be taken away by others. 48GBSSD 83% is deleted recyclable; scan for about a few minutes; during which VMS can be accessed normally. And you'll find that the entire disk is basically occupied.

[Email protected]:/media/osboxes/vmware tools$ DF-LH

Filesystem Size used Avail use% mounted on

Udev 568M 0 568M 0%/dev

Tmpfs 116M 9.3M 107M 9%/run

/DEV/SDA1 48G 44G 909M 99%/

2. Recovery phase: takes longer than 20 minutes and the VM does not respond. Network outage

When you are finished, resume (the error begins and is ignored.) Can the error indicate that the system is not dead ...)

Thin LUN. Still shows 50GB, but most of it is hole/unprovisoing. The windows of the book have been shown more 30+GB

[Email protected]:~$ DF-LH

Filesystem Size used Avail use% mounted on

Udev 568M 0 568M 0%/dev

Tmpfs 116M 9.4M 107M 9%/run

/DEV/SDA1 48G 7.9G 37G 18%/

2. VMWare Reclaim Storage Summary

Mainly the PPT that was done before,

VSphere Reclaim is available after basic to 5.1, 5.0 although it is supported but is not recommended because of a major bug. Two ways in ESX 5.5

1. Vmkfstools–y <%free space to unmap>

-It crease a tempfile in top dir named.asyncunmapfile. Reserved size= Number *blocksize

2. esxcli Storagevmfs unmap --volume-label=volume_label|--volume-uuid=volume_uuid-- reclaim-unit= number

-Number of Vmfsblocks to UNMAP per iteration. If not specified, default value of 200.

-Run may fail or runlong time depending on #and how storage array behaves/performance

Main implementation Steps (Official Chart):


The basic idea is simple: the upper layer does not have to notify the lower layer: where, how big, please pay attention to recycling (not guarantee), but a lot of (at least 3 is not the array inside), a lot of details especially the early layout did not consider shrink function; it's a struggle.

    1. VMware Tools Eitherwipe or shrink FS is required in Guestos. The main purpose is to collect free block &location. Typically you want to work with FS at the FS level. Unless you clear the disk. Care data

    2. VMWare Tools Get Results/Metadata

    3. VSphere notifies Vmfs/sparse disk to do Re-org:unmap to VSCSI SE sparse disk

This is going to move the data. Depending on the design of the Sparse/thin layout, the principle is bulk recycling. VMware's design is relatively simple and rough.

read/write to Move,update sparsedisk metadata, compact, use a temp file . Asyncunmapfil. vSphere Issue "shrink" When enough free at end of SE disk,

Not to say how bad the rough, but it is likely that the design of the beginning of this aspect of consciousness and consideration, the final homework, often ineffective or poor effect. How to do is uncomfortable feeling. I can't wait to pull back

4. Then the VMFS level frees up space: by SCSI unmap or nfs-truncate

5. Finally inform the backstage share storage reclaim space, so that resources can be assigned to other users. Async to reclaim, there are too many layers in the enterprise storage (SW defined essence ...), basically take the 4 steps above again. Asynchronous-Save-move-update metadata,io dense, metadata load/lock/update. It's not easy. When the space is really recycled, it is impossible to elaborate, of course, the basic transparent online. You will alloc-on-demand when you need space later, then ... Cycle.

Of course, the user operation is basically half/automation, the awareness of the face of a lump of hard work, and very prone to error, affecting performance. I shrink, and the guest Linux partition starts reporting system detectexception. Fuck also do not know which rib error, but can continue to use, then wronged.

The new storage system basically at the beginning of the design to fully consider thin,shrink, of course, the end-to-end support to cooperate; Shrink/reclaim efficiency, performance impact it depends on the work of each family, especially the entanglement of snap, Dedup these share-data and auto-balancee/rebuild/tiering, such as IO-intensive applications, in the architecture, layout aspects to be considered in the first consideration.

Other references:

1. VMware Tool Manual, Linux/windows ***BSD support: http://www.vmware.com/pdf/vmware-tools-installation-configuration.pdf

2. How to use Vmotion+vsphere: http://blogs.vmware.com/vsphere/2012/04/vaai-thin-provisioning-block-reclaimunmap-in-action.html

VMWare Reclaims disk space

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.