VMware Cloud Community
UteTech
Contributor
Contributor

Deleting old snapshot caused increased storage usage

I found an old snapshot (~ 2yrs old) running on a VM. I first exported OVF file with VM shut down. Then, after rebooting VM, I deleted snapshot. Now my storage usage on the VM is greater than the Hard Disk space. Is this normal behavior? How do I rectify this?

0 Kudos
7 Replies
a_p_
Leadership
Leadership

Please provide some details like a complete file listing from the VM's folder, i.e. the output of the ls -lisa command.

André

0 Kudos
UteTech
Contributor
Contributor

I am not sure how or where to run this command. I can work my way through vSphere ok. Is there anything in there I can show you? Its V6.7

0 Kudos
a_p_
Leadership
Leadership

One way is to:

  1. start the SSH service on the ESXi host from the WEB Client (the service may be named SSH-TSM)
  2. connect to the ESXi host using e.g. putty
  3. resize the putty window to avoid line breaks in the following commands
  4. run: cd /vmfs/volumes/<datastore-name>/<vm-name>
  5. run: ls -lisa

Once you've copied the text output, and pasted it to a reply post, you may close the putty session (run: exit), and stop the previously started SSH service.

André

0 Kudos
UteTech
Contributor
Contributor

[root@esxi:/vmfs/volumes/5f489109-4d6ad5bc-9203-d492343834d8/FTDC02] ls -lisa
total 87152832
196 128 drwxr-xr-x 1 root root 77824 Sep 20 17:10 .
4 1024 drwxr-xr-t 1 root root 73728 Sep 22 2020 ..
100663364 4194304 -rw------- 1 root root 4294967296 Jan 3 2022 FTDC02-0fb081ff.vswp
68 0 -rw-r--r-- 1 root root 227 Sep 14 2020 FTDC02-3726f903.hlog
8388676 82869248 -rw------- 1 root root 85899345920 Sep 21 20:59 FTDC02-flat.vmdk
20971588 64 -rw-r--r-- 1 root root 8684 Mar 13 2022 FTDC02.nvram
12582980 0 -rw------- 1 root root 551 Sep 20 17:10 FTDC02.vmdk
16777284 0 -rw-r--r-- 1 root root 43 Sep 20 17:09 FTDC02.vmsd
4194372 0 -rwxr-xr-x 1 root root 2655 Sep 20 17:09 FTDC02.vmx
88080452 0 -rw------- 1 root root 0 Jan 3 2022 FTDC02.vmx.lck
46137412 0 -rw------- 1 root root 47 Sep 14 2020 FTDC02.vmxf
92274756 0 -rwxr-xr-x 1 root root 2662 Sep 20 17:09 FTDC02.vmx~
37748804 1024 -rw-r--r-- 1 root root 772648 Sep 29 2020 vmware-1.log
62914628 1024 -rw-r--r-- 1 root root 445845 Dec 31 2020 vmware-2.log
79691844 1024 -rw-r--r-- 1 root root 464796 Jan 3 2022 vmware-3.log
96469060 1024 -rw-r--r-- 1 root root 480848 Sep 21 18:01 vmware.log
83886148 83968 -rw------- 1 root root 85983232 Jan 3 2022 vmx-FTDC02-263225855-1.vswp
[root@esxi:/vmfs/volumes/5f489109-4d6ad5bc-9203-d492343834d8/FTDC02]

0 Kudos
a_p_
Leadership
Leadership

8388676 82869248 -rw------- 1 root root 85899345920 Sep 21 20:59 FTDC02-flat.vmdk

It seems as the VM has a "Thin Provisioned" virtual disk configured.

The physical disk space used (blue), depends on the data within the guest OS, i.e. which data blocks/sectors the guest has written data to.
If the guest's logical usage is much lower that the configured 80GB, it may be an option - depending on the guest OS - to compact the file system, and then zero out the free disk space from within the guest OS.
After that you may shutdown the guest OS and punch out the zeroed blocks from the .vmdk file. See e.g. https://kb.vmware.com/s/article/2136514

André

UteTech
Contributor
Contributor

The VM referenced here, FTDC02, has a Local Disk (c:) that indicates 61.9 GB free of 79.5 GB. It is a Windows operating system so I believe the instructions in the KB article should reclaim a significant amount of disk space. My datastore has 330 GB of free space so I shouldn't have an issue when running sDelete. Do you foresee any problems?

0 Kudos
a_p_
Leadership
Leadership

No, that should work as expected. That said, it's always good to have a current backup (or export).

André

0 Kudos