Specifications
Administration Guide
300 VMware, Inc.
VMFS Locking and SCSI Reservation
For!a!shared!SCSI!disk!that!can!be!accessed!by!multiple!ESX!Server!machines,!two!kinds!
of!locking!may!be!in!use.!These!two!kinds!of!locking!are!somewhat!independent!and!
can!cause!confusion.!The!shared!SCSI!disk!may!be!on!shared!SCSI!bus!or,!more!likely,!
on!a!storage!area
!network!(SAN).
VMFS File System Locking
The!first!kind!of!locking!is!VMFS!file!system!locking.!ESX!Server!locks!VMFS!file!
systems!on!a!server!level!when!a!VMFS!file!system!is!configured!as!a!public!or!shared!
file!system.!This!locking!is!done!to!ensure!that!there!is!no!corruption!caused!by!multiple!
accesses!to!the
!file!system!by!different!hosts.!
If!a!VMFS‐1!volume!is!configured!in!public!mode,!only!one!server!can!access!that!VMFS!
at!a!time.!If!one!server!is!accessing!the!VMFS‐1!volume,!through!a!virtual!machine!or!a!
file!system!command,!a!file!system!operation!by!another!host!
fails.!For!example,!a!
vmkfstools!command!fails!with!a!message!that!says:
vmkfstools: file system is locked by another server. Use 'vmkfstools
--recover' to unlock file system if no other server is accessing
Typically,!do!not!run!vmkfstools --recover,!because!another!host!is!using!the!file!
system.!The!error!message!indicates!that!this!server!cannot!access!the!VMFS!until!the!
other!server!has!finished!accessing!it.!However,!if!a!server!fails!while!accessing!the!file!
system,!the!file!system!may!stay!in!the!locked!
state!and!you!might!need!to!run!
vmkfstools --recover.
In!a!public!VMFS‐2!volume,!locking!is!at!a!per‐file!level,!resulting!in!fewer!locking!
issues.!You!might!still!get!the!preceding!message!and!need!to!use!vmkfstools!
--recover,!if!a!server!fails.
If!a!VMFS!is!used!to!store!a
!virtual!disk!that!is!accessed!by!multiple!virtual!machines!
on!multiple!physical!servers!for!the!purposes!of!failover!clustering,!the!VMFS!should!
be!configured!as!a!shared!file!system.!The!locking!protocol!is!relaxed!to!allow!multiple!
virtual!machines!on!different!servers!to!access!the!same!VMFS!file!at!the!
same!time.!
However,!file!system!commands!do!the!same!locking!as!with!public!file!systems!(that!
is,!per‐VMFS!in!VMFS‐1!volumes!and!per‐file!in!VMFS‐2!volumes).
Additionally,!when!multiple!virtual!machines!access!the!VMFS,!the!VMFS!file!system!
enters!a!read‐only!mode!in!which!it!is!
impossible!to!create,!delete,!or!change!the!size!of!
files.!The!contents!of!the!individual!files!can!still!be!modified.!If!you!later!want!to!create!
or!remove!VMFS!files,!you!must!stop!all!virtual!machines!using!the!VMFS!and!re‐enter!
writable!mode!using!the!command:
vmkfstools --config writable vmhba0:1:0:0