Product Announcements

Extending an EagerZeroedThick Disk

Here is something which came my way via an observation made by one of our customers (thanks Guido). When extending a VMDK which is EagerZeroedThick, the extended part is only LazyZeroed. Its probably easier to explain using the following example.

 

Step1 – Create an EagerZeroedThick VMDK:

~ # vmkfstools -c 2g -d eagerzeroedthick /vmfs/volumes/cs-ee-symmlun-001A/cormac.vmdk
Creating disk '/vmfs/volumes/cs-ee-symmlun-001A/cormac.vmdk' and zeroing it out…
Create: 100% done. 

 

Step 2 – Look at it's details. The VMFS — before the LVID indicates that it is eager zeroed thick:

~ # vmkfstools -t0 /vmfs/volumes/cs-ee-symmlun-001A/cormac.vmdk
Mapping for file /vmfs/volumes/cs-ee-symmlun-001A/cormac.vmdk (2147483648 bytes in size):
[           0:  2147483648] –> [VMFS — LVID:4e5cda72-26b067db-5bc1-d8d3855ff8b4/4e5cda72-14e9dc64-690f-d8d3855ff8b4/1:( 581291737088 –>  583439220736)] 

 

Step 3 – Extend it by 4GB.

~ # vmkfstools -X 4g  /vmfs/volumes/cs-ee-symmlun-001A/cormac.vmdk                  
Grow: 100% done. 

 

Step 4 – Look at it's details again. The VMFS Z- indicates that it is lazy zeroed. Interesting, eh? An eagerzeroedthick VMDK that has been extended with a lazyzeroed chunk!

~ # vmkfstools -t0 /vmfs/volumes/cs-ee-symmlun-001A/cormac.vmdk
Mapping for file /vmfs/volumes/cs-ee-symmlun-001A/cormac.vmdk (4294967296 bytes in size):
[           0:  2147483648] –> [VMFS — LVID:4e5cda72-26b067db-5bc1-d8d3855ff8b4/4e5cda72-14e9dc64-690f-d8d3855ff8b4/1:( 581291737088 –>  583439220736)]
[  2147483648:  2147483648] –> [VMFS Z- LVID:4e5cda72-26b067db-5bc1-d8d3855ff8b4/4e5cda72-14e9dc64-690f-d8d3855ff8b4/1:( 583439220736 –>  585586704384)]

 

Step 5 – If we use the correct options, we can of course grow the VMDK with an eagerzeroedthick chunk as shown below:

~ # vmkfstools -X 6G -d eagerzeroedthick  /vmfs/volumes/cs-ee-symmlun-001A/cormac.vmdk                                              
Grow: 100% done. All data on '/vmfs/volumes/cs-ee-symmlun-001A/cormac.vmdk' will be overwritten with zeros from sector <8388608> onwards.
Zeroing: 100% done. 

 

Step 6 – Look at it again & we see an initial eagerzeroedthicnk section, then a lazyzero section, and finally another eagerzeroedthick section:

~ # vmkfstools -t0 /vmfs/volumes/cs-ee-symmlun-001A/cormac.vmdk
Mapping for file /vmfs/volumes/cs-ee-symmlun-001A/cormac.vmdk (6442450944 bytes in size):
[           0:  2147483648] –> [VMFS — LVID:4e5cda72-26b067db-5bc1-d8d3855ff8b4/4e5cda72-14e9dc64-690f-d8d3855ff8b4/1:( 581291737088 –>  583439220736)]
[  2147483648:  2147483648] –> [VMFS Z- LVID:4e5cda72-26b067db-5bc1-d8d3855ff8b4/4e5cda72-14e9dc64-690f-d8d3855ff8b4/1:( 583439220736 –>  585586704384)]
[  4294967296:  2147483648] –> [VMFS — LVID:4e5cda72-26b067db-5bc1-d8d3855ff8b4/4e5cda72-14e9dc64-690f-d8d3855ff8b4/1:( 589881671680 –>  592029155328)]

 

If you need to grow your VMDK and you require your VMDK to be eagerzeroedthick, then be sure to use the parameters outlined in step 5 and do it via the CLI. If you do it via the UI, you have no control over the grow options and it will automatically use lazyzero'ing for the extension, even if the initial VMDK is eagerzeroedthick.

Get notification of these blogs postings and more VMware Storage information by following me on Twitter: Twitter @VMwareStorage