1 2 Previous Next 23 Replies Latest reply on Jun 18, 2019 7:55 PM by wenqi22

    thin provisioned VMDKs inflated to max size after snapshot deletion job ran (powercli)

    lulu62 Novice

      Hello VMware community,

       

      We observed an issue with some of our thin provisioned VMs and snapshots:

       

      We have a powercli script that runs everyday and delete snapshots older than x days:

       

      Import-Module VMware.VimAutomation.Core

      Connect-ViServer -Server vcenter.company.local

       

      # This script will delete snapshots older than x days

       

      # Exception added for VMtest(snapshots of this VM are not deleted at all) request of xxx 19-04-2019

      $vm_range = (get-vm | where-object name -NotLike "VMtest").name

       

      $snapshots_of_vm_range = (get-vm $vm_range | Get-Snapshot)

       

      # Adjust number of days below

      $snapshots_to_delete = $snapshots_of_vm_range | Where-Object {$_.created -lt (Get-Date).AddDays(-5)}

       

      if($snapshots_to_delete)

      {

      Remove-Snapshot $snapshots_to_delete -confirm:$false -RunAsync

      }

       

      We are aware that this script will delete all snapshots at once and therefore will put some pressure on our storage (i/o, latency etc.)

       

      We have a full flash storage array (Pure Storage FA-m20r2) and it seems to hold on well.

       

      Last Sunday the script ran and deleted 53 snapshots at once.

       

      Some VMs got 2 snapshots deleted at once and I noticed that these VMs had their thin-provisioned VMDKs inflated to the maximum size after snapshots were deleted but still remained in thin provision and size didn't shrink.

       

      Prior to the snapshot deletion job, VMDKs were matching the true size in Windows.

      After the snapshot deletion job, VMDKs inscreased to maximum size.

       

      VM properties:

      Guest OS: Microsoft Windows Server 2012 (64-bit)

      Compatibility: ESXi 6.5 and later (VM version 13)

      VMware Tools: Running, version:10341 (Current)

      All disks thin provisioned - dependent mode

       

      Datastore properties:

      Type VMFS 6.81

      Drive type Flash

      Thin Provisioning Supported

      Space Reclamation Priority Low: Deleted or unmapped blocks are reclaimed on the LUN at low priority

       

      Device Backing

      Device: PURE Fibre Channel Disk (naa.624[...])

      Capacity 5 TB

      Partition Format: GPT

      Drive Type Flash

      Sector format 512n

       

      Hardware acceleration is supported on all hosts.

       

      Why thin provisioned disks inflated after last snapshot deletion with powercli script above?

        1 2 Previous Next