VMFS locking mechanisms | VMware


In a multi-host storage access environment like vSphere, a locking mechanism is required for datastore/LUN to ensure data integrity. For VMFS there are two types of locking mechanisms:
  1. SCSI reservations
  2. Atomic Test and Set - ATS
SCSI reservations

This method is used by storage which does not support Hardware Acceleration. In this method, the host locks the datastore when it execute operations which requires metadata protection and will release the lock once it completes the activity. SCSI reservation does not lock a LUN, but it reserves the LUN to get the On-disk lock. Whenever a host locks, it must renew the lease on lock to indicate that it stills holds the lock and not crashed. When a new host need to access a file, it checks whether the lease has been renewed. If it hasn't renewed, another host can break the lock and access it.
In a multi-host environment, excessive SCSI reservations might degrade the storage performance.

The operations that require reservation are :
  • Creating, resignaturing, or expanding a VMFS datastore
  • Powering on a virtual machine
  • Creating or deleting a file
  • Creating a template
  • Deploying a virtual machine from a template
  • Creating a new virtual machine
  • Migrating a virtual machine with VMotion
  • Growing a file, such as a thin provisioned virtual disk

ATS

This alogorithm is used by storage which supports Hardware Acceleration. This method supports discrete locking per disk sector. This will not lock LUN as such. ATS comes as a part of VAAI (vSphere Storage API for Array Integration).

Comments

Popular posts from this blog

VMware and Windows Interview Questions: Part 2

VMware and Windows Interview Questions: Part 3

VMware vMotion error at 14%