VMware vSphere

 View Only
  • 1.  VM disk consolidation

    Posted Jul 05, 2018 05:16 PM

    Hello All,

    I started at a new company recently and was tasked with figuring out why a few servers weren't backing up and found that the disks needed consolidation.  We're on vsphere 6.0 and one of the servers is a production SQL box.  Are there any issues with consolidating the disks during production hours?

    What would be best practice in this scenario?  Is there a chance of data loss/corruption?

    Thanks



  • 2.  RE: VM disk consolidation

    Posted Jul 05, 2018 05:56 PM

    Welcome to the Community,

    Depending on the size of the snapshot(s), the free disk space, and the provisioning type (thin or thick) of the base disk, you may need to be careful, to not run out of disk space during the consolidation. Snapshot consolidation can basically run during production hours, but I recommend against running it during high disk I/O requirements.

    In case you are unsure, run the command ls -lisa in the VM's folder, and post the output. Also mention the free disk space on the datastore.

    André



  • 3.  RE: VM disk consolidation

    Posted Jul 06, 2018 08:32 PM

    Thanks will do, is there a way to schedule the disk consolidation during less busy times?



  • 4.  RE: VM disk consolidation

    Posted Jul 09, 2018 05:55 AM

    Hello,

    Snapshot consolidation is useful when snapshot disks fail to compress after a Delete or Delete all operation. This might happen, for example, if you delete a snapshot but its associated disk does not commit back to the base disk.

    The Needs Consolidation column in the vSphere Web Client shows the virtual machines to consolidate.

    Before vSphere 6.0, the consolidation and commit phases of any VM snapshot has always followed the same procedure: an additional helper snapshot was created to “freeze” not just the base virtual disk, but also the snapshot disk, and once the changes stored in the snapshot disk have been merged into the base disk, the helper snapshot was also committed, and at some point the I/O was not directed anymore to the snapshot, but back to the original disk.

    In vSphere 6.0 the snapshot consolidation process also uses the mirror driver [as in Storage vMotion]. With the mirror driver mechanism, changes to the VM are written to the active VMDK and the base disk (while protecting write order) during consolidation. One should now hopefully see snapshot consolidations completing in 1 pass (with minimal or indeed no helper disks) and with hopefully a dramatically shorter stun time, and a much small chance of consolidation failure.

    Please consider marking this answer "correct" or "helpful" if you think your question have been answered correctly.

    Cheers,

    VCIX6-NV|VCP-NV|VCP-DC|

    @KakHassan

    linkedin.com/in/hassanalkak



  • 5.  RE: VM disk consolidation

    Posted Jul 09, 2018 07:05 AM

    Sometimes backup programs can not remove snapshots that they create for their work. Therefore, you need to carefully monitor this. And if you use SQL then consolidation is better done not during working hours (and not during the automatic maintenance of the database). And also, as already mentioned, to control the availability of free space.



  • 6.  RE: VM disk consolidation

    Broadcom Employee
    Posted Jul 09, 2018 07:04 PM

    let me first cover the best practices around snapshots - https://kb.vmware.com/s/article/1025279

    This document answers a part of your question from the SQL on vSphere best practice guide - https://www.vmware.com/content/dam/digitalmarketing/vmware/en/pdf/solutions/sql-server-on-vmware-best-practices-guide.pdf    page 28 and 29

    It is best to start consolidation when the I/O is less on VM so that it is not busy and completes faster.

    Periodically check for left over snapshots using 3rd party tools like RVtools so that you can do a clean up manually.

    Thanks

    Devakumar