Check for ESXi scratch persistence
In my last post, I looked at how the ESXi installer may not create a scratch partition if it identifies the local disks as remote during the install. I had stated that the following was good check to see if you had a scratch partition setup: cat /etc/vmware/locker.conf
However after a bit more testing down the rabbit hole, it appears this isn’t a good definitive test. Before I explain why, to check that the ESXi host is using a persistent scratch “location” run this instead:
vim-cmd hostsvc/advopt/view ScratchConfig.CurrentScratchLocation
If the value is null, i.e. value = “”, then no persistent scratch location is set in the running configuration. Changing the ScratchConfig.ConfiguredScratchLocation value will load this after the next reboot (as per the instruction in my last post)
The reason the locker.config file isn’t a definitive test is that ESXi can set the Configured value in several ways. If you use the vim-cmd method it creates an entry in the locker.conf file (and creates the file it if it doesn’t already exist). However if this file doesn’t exist, then ESXi goes on to check the following (from the KB):
2. A Fat16 filesystem of at least 4 GB on the Local Boot device.
3. A Fat16 filesystem of at least 4 GB on a Local device.
4. A VMFS Datastore on a Local device, in a .locker/ directory.
5. A ramdisk at /tmp/scratch/
I have found hosts where there is no locker.config file, but because a 4GB FAT partition had been created during the initial install, it uses that. In these cases there is no .locker directory, but everything sits directly in the partition and it is mounted under /vmfs/volumes/ as to be accessible by the vmkernel. Interestingly, in this configuration there is no sym linked datastore, so you won’t see this volume in the vSphere client.
For hosts where the 4GB FAT partition doesn’t exist, but a local VMFS datastore is present, you can find that a .locker folder is created. You can see these from the vSphere client datastore browser. But remember that if you are a POSIX style console (like the vMA or ESXi shell), then as this folder is prepended with a period (“full stop” in real English
), the folder will be hidden.
Various changes have occurred with regard to the scratch location during the 4.x cycle. I guess this is why ESXi has to check all these locations for possible dump sites. Also, when using vendor specific images, it could depend how they patch their master images before releasing them. So it’s very difficult to understand which versions are set in which ways.
The interesting thing, is that the existence of scratch specific “partition” does not categorically determine the persistence of scratch. ESXi can use a scratch folder and it will still be persistent across reboots. Only the 5th option above forces it into a volatile ramdisk. So the correct terminology is “persistent scratch location”. I for one welcome our new persistent scratch location nomenclature overlords…
Remember though, the moral of the first post is still valid. Some servers’ local disks are treated as non-local and therefore aren’t configured with a “persistent scratch location” at all (even though there is a local VMFS volume available). This inconsistency is something you want to check if you don’t want surprises.
Forbes Guthrie
Recent Posts
- Small update to the Reference Card
- Minor update to the vSphere 5 Reference Card
- vSphere 5 vReference Card released
- Cisco UCS boot from iSCSI SAN – ESXi design consideration
- vSphere 5 vReference card – Storage section
- Does 2008 R2 Failover Clustering require a change to the Notify Switches policy?
- vSphere 5 vReference card – Host section
- vSphere 5 vReference card – Install section
- Auto Deploy design concern
- vSphere 5 vReference card – vCenter section
Recent Comments
- honglus on How to PXE boot from your trunked vmnic0
- Sunmeet on Understanding ESXi – stateless, diskless, feckless
- Forbes Guthrie on vSphere 5 Card
- Forbes Guthrie on vSphere 5 Card
- Jakk on vSphere 5 Card
- Purushothama S on vSphere 5 notes
- Bjorn on vSphere 5 Card
- Chris on Minor update to the vSphere 5 Reference Card
- Michael Webster on Auto Deploy design concern
- Ankur Maheshwari on vSphere 5 notes
Twitter
- As much as I've become an NFS supporter over the years, VMFS5 & ATS is really making me like iSCSI & its better multipathing. : 2 weeks ago
- @__wintertale__ Hi Iona (& Lesley). Welcome to the twitterverse from a cloudy and wet Vancouver. How's the coffee? : 3 weeks ago
- RT @jtroyer: ... Kaua'i http://t.co/s4Ovo4jD << Staying in same resort next month. Pls, no destroying it with wild parties ;) : 3 weeks ago
- RT @dobaer: @forbesguthrie How was the run in your shiny new shoes? << Nice, the trails around Vancouver are stunning. : 3 weeks ago
- @h0bbel I'm a Salomon addict, but I'm scared to get these ones muddy :) : 3 weeks ago
- Just took my pwutty new #salomon trail shoes for an hour's run in Pacific Spirit Park. http://t.co/7dAQDXgl : 3 weeks ago
- RT @alim__k: @forbesguthrie @keith_aasen look at you guys, figuring this out over social media ;-) < that's where I do all my best designs : 3 weeks ago
- @keith_aasen Great, just what I was after. And presumably one per controller to prevent performance degradation on failover (after refill) : 3 weeks ago
- @keith_aasen You're the VDI sizing TR author :) You're my Guru! : 3 weeks ago
- NetApp gurus: VDI on 3170 - where's FlashCache watershed for 2x 512GB to 4. When is it 2TB not 1TB? Don't say "it depends" /cc @keith_aasen : 3 weeks ago





