Knowledge Base

The VMware Knowledge Base provides support solutions, error messages and troubleshooting guides
 
Search the VMware Knowledge Base (KB)   View by Article ID
 

Disabling simultaneous write protection provided by VMFS using the multi-writer flag (1034165)

Details

VMFS is a clustered file system that disables (by default) multiple virtual machines from opening and writing to the same virtual disk ( .vmdk file). This prevents more than one virtual machine from inadvertently accessing the same .vmdk file.

The multi-writer option allows VMFS-backed disks to be shared by multiple virtual machines. This option is used to support VMware fault tolerance, which allows a primary virtual machine and a standby virtual machine to simultaneously access a .vmdk file.

You can use this option to disable the protection for certain cluster-aware applications where the applications ensure that writes originating from two or more different virtual machines will not cause data loss. This document describes the steps that need to be taken to modify the flag for a virtual disk.

Warning: Be careful when you disable this protection. This change might cause data corruption in cases where the applications in the virtual machine do not maintain consistency in the writes performed to the shared disk. As a result, some virtual machine operations and vSphere features are not supported. Specifically supported virtual machine operations include:

  • power on/off (but not suspend)
  • restart, hot-add disks to existing adapters
  • hot-remove devices
  • connect/disconnect devices
The virtual machine runs its operating system and applications as expected. See a list of limitations below.

Use cases:

  • VMware FT relies on VMware vLockstep technology to establish and maintain an active secondary virtual machine that runs in virtual lockstep with the primary virtual machine. The secondary virtual machine resides on a different host and executes exactly the same sequence of virtual (guest) instructions as the primary virtual machine. The multi-writer flag is automatically enabled when you turn on FT in the vSphere Client.

  • Third-party cluster-aware applications where the applications ensure that writes originating from two or more different virtual machines will not cause data loss (for example, you would use this for Oracle RAC virtual machines). For this case, manually enable the multi-writer flag using the instructions in this article. Follow the same procedure when using virtual RDMs.

Supported actions:
  • Powering on/off/restart
  • Hot-add disks to existing adapters
  • Hot-removal of devices
  • Connect/disconnect devices
  • Snapshots of virtual machines without virtual machine memory are supported in vSphere 5.1 U2 and later versions
Unsupported actions: 
  • Most snapshots and any other action which utilizes snapshots
    • Virtual backup solutions leverage snapshots via the vStorage APIs; for example, VMware Data Recovery, vSphere Data Protection
  • Cloning a virtual machine one or more disks configured with the multi-writer flag
    • Other vSphere features utilize cloning; for example, vSphere Replication, View Manager
  • Storage vMotion of a virtual machine one or more disks configured with the multi-writer flag
  • Change Block Tracking (CBT) 
  • Suspending a virtual machine 
  • Hot-extending a virtual disk

Limitations:
For more information on the steps described in this article, see:


Solution

Enabling Virtual Disk Sharing

To configure a shared virtual disk by setting the multi-writer flag:
  1. Create a virtual disk to be shared using any acceptable approach. For example, through the vSphere Client:
    1. Create a new disk for a virtual machine on a VMFS data store:



    2. In the Create a Disk window, for ESX/ESXi versions earlier than 5.0, click Support clustering features such as Fault Tolerance to create the new virtual disk in the required format, eager zeroed thick.



      In ESXi 5.x versions, the Create a Disk window provides Thick Provision Lazy Zeroed, Thick Provision Eager Zeroed, and Thin Provision options under Disk Provisioning. Be sure to select Thick Provision Eager Zeroed. Also, note that the documentation may refer to this as Flat pre-initialized.



    3. Choose the appropriate Virtual Device Node setting, such as SCSI (1:0). Make a note of it, as it is required later.



      Note: There are command-line alternatives to perform the previous operation, but this instruction is beyond the scope of this article.

  2. Add the multi-writer flag to configure sharing. There are two ways to achieve this:

    Note: Do not change the SCSI Controller's SCSI Bus Sharing options. Keep the default selection, None.

    1. Power off the virtual machine.
    2. In the . vmx file that defines the virtual machine, add an entry similar to:

      scsiX:Y.sharing = "multi-writer"

      where X is the controller ID and Y is the disk ID on that controller. The setting screen of a virtual machine shows these values.



      Add this setting for each virtual disk that you want to share. For example, to share four disks, the configuration file entries look like this:

      scsi1:0.sharing = "multi-writer"
      scsi1:1.sharing = "multi-writer"
      scsi1:2.sharing = "multi-writer"
      scsi1:3.sharing = "multi-writer"

    3. Save the .vmx file and power on the virtual machine.

    4. In the vSphere Client, power off the virtual machine, go to Edit Settings > Options > Advanced > General > Configuration Parameters. Add rows for each of the shared disks and set their value to multi-writer.

      Example:



  3. Add this disk to another virtual machine:

    1. In the vSphere Client inventory, right-click the virtual machine and click Edit Settings.
    2. Click the Hardware tab and click Add.
    3. Select Hard Disk and click Next.
    4. Select Use an Existing Virtual Disk.

      Note: You do not need to create a disk because the disk is already created.

  4. Enable sharing on this virtual machine, using one of the approaches listed in step 2.


Tags

multi-writer-flag

Keywords

RAC

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.

Feedback

  • 66 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.
What can we do to improve this information? (4000 or fewer characters)
  • 66 Ratings
Actions
KB: