April 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

Categories

April 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

Determine the Zeroed status of Thick Lazy disk

this article there is a potential write performance impact on the first-write to each block in the Lazy Zeroed Thick Disk. If you for some reason would like to know how large part of the Thick Lazy that has been zeroed of a production virtual machine and how much remains to be zeroed later you could use the vmkfstools command from the ESXi command line. This could be done while the VM is running, so no need to power off any machines.

zeroed-4

Navigate to the VM folder through the /vmfs/volumes path and then list the file name(s) of the “flat” (data) VMDK, not the small descriptor file. Use for example:

ls -l *flat.vmdk

Above we see a 10 GB flat vmdk file. This is a Lazy Zeroed disk, which has all its space (10 GB = 10737418240) allocated on the data store, however we do not really know what the zeroing status is.

This could be displayed by the command:
zeroed-5

vmkfstools -D vm-FLAT.vmdk (Note, must point to the flat file, not descriptor)

zeroed-6

From this output some interesting data could be observed.

len = Total size of disk in Bytes.

bs = Block size (would be 1 MB/1048576 Bytes on all new VMFS5 stores).

nb = Total number of blocks of the virtual disk.

This gives that: nb * bs = len
zeroed-7

And for the zeroing status: next to nb we find the “tbz” value.

tbz = The number of blocks remaining to be zeroed.

In this example the tbz is 7916 blocks. You could divide this value with nb (total number of blocks) to get the percentage.

Here 7916 blocks out of 10240 remains to be zeroed.

tbz / nb = percent of disk remaining to be zeroed

7916 / 10240 = 0,77 = 77 %

This could be useful to know in a performance troubleshooting situation where being able to verify the exact zeroing status of a Lazy Zeroed disk could give some more piece of information which might or might not be relevant to the situation.

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>