Site icon Virtual Maestro

VMFS 5/6 and VMFS locking

Advertisements

We will discuss about VMFS filesystem and VMFS locking mechanisms in this post along with VMFS 5 and VMFS 6 characteristics in vSphere 7. Also we will discuss VMFS upgrade possibilities from VMFS 5 to VMFS 6.

VMFS 5

VMFS 6

Can we upgrade to VMFS 6 from VMFS 5?

There is structural differences in metadata between VMFS 5 and VMFS 6, so we cannot directly upgrade from VMFS 5 to VMFS 6. However, since we do have co-existence available, we can simply migrate the data using storage vMotion from VMFS 5 datastore to VMFS 6 datastore and later decommission the VMFS 5 datastore if required.

VMFS Locking mechanisms

There are two types of locking mechanisms that are supported in VMFS filesystem:

Before we dig into these methods, let’s understand the purpose of using these locking mechanisms. VMFS datastore uses locking mechanisms like SCSI reservation to prevent multiple hosts from concurrently writing to the metadata and ensure the data integrity is maintained while metadata operations for datastore or virtual machines are being performed by a host. Metadata update is required each time when metadata operations are being performed.

The Metadata operations are: 

With that being discussed, lets move on to our next block and look into each of the locking mechanisms. i.e. SCSI reservation and ATS

SCSI reservations

SCSI reservations allows a host to lock the entire LUN and block access to other hosts while performing an operation that requires metadata protection. We already talked about these metadata operations earlier in this post. Reserving the LUN prevents any possible data corruption that may be caused if other hosts overwrites the metadata. 

An initiator on ESXi host sets the reservation on target LUN by issuing SCSI Reserve command. Once the metadata operation is completed, the lock owner host releases the lock by issuing SCSI Release command.

However, there is one more possibility of lock getting released i.e. SCSI bus reset. If a SCSI bus reset is performed due to some error recovery, that would cause the reservation to be released without lock owner releasing the lock.

VAAI primitive ATS

ATS is anytime preferred over SCSI reservations due to the fact that ATS allows disk locking per sector, unlike SCSI reservation where entire LUN getting locked. Hence the performance degradation does not happen with ATS. ESXi host uses ATS for VMFS datastore’s that are backed by an array with VAAI support.

Usage in VMFS

VMFS datastore can use ATS-only or the combination of ATS and SCSI reservations (i.e. ATS+SCSI). With ATS + SCSI combination, VMFS datastore first attempts to use ATS if possible, or else resorts to SCSI reservations as alternate method.

ATS+SCSI mechanism is used by VMFS5 datastore’s that are upgraded from VMFS 3 and also for new VMFS5 or VMFS6 datastore’s that are backed by storage that does not support VAAI.

To display information related to VMFS locking mechanisms, use esxcli cmdlet.

esxcli storage vmfs lockmode list

Check more info here in VMware Docs for locking modes.

Thats all in this post. Feel free to comment to discuss more. Also check about SCSI-3 Persistent reservation which is added in vSphere 7 at VMDK level.

If you liked it, do share, like.

Exit mobile version