A file share's affinityLocation configuration should be aligned with the share's storage policy's affinity setting on vSAN 7.0 U2 and above
search cancel

A file share's affinityLocation configuration should be aligned with the share's storage policy's affinity setting on vSAN 7.0 U2 and above

book

Article ID: 326640

calendar_today

Updated On:

Products

VMware vSAN

Issue/Introduction

Symptoms:
When a file share is created in a stretched cluster, you may specify the affinityLocation in the file share's configuration spec.

Meanwhile, a storage policy may also be specified for creating the share. There may be an affinity setting specified in the storage policy. The file share's affinityLocation configuration should be aligned with the storage policy's affinity setting. Otherwise, creating a file share will fail with the below error message:

Invoke vim.vsan.VsanFileServiceSystem.reconfigureFileShare failed: (vim.fault.InvalidState) {
--> faultMessage = (vmodl.LocalizableMessage) [
--> (vmodl.LocalizableMessage) {
--> key = 'com.vmware.vsan.fileservice.fault.shareconfigerror',
--> message = 'affinityLocation does not match with storagePolicy'


Environment

VMware vSAN 7.0.x

Resolution

The file share's affinityLocation configuration can be specified in the UI page as shown below:

2733982_01.jpg

Storage policy affinity setting can be specified in the UI page as shown below:

2733982_02.jpg
  • If a file share's affinityLocation configuration is "Preferred", the storage policy affinity setting should be "keep data on Preferred" (or None).
  • If a file share's affinityLocation configuration is "Secondary", the storage policy affinity setting should be "keep data on Secondary" (or None).
  • If a file share's affinityLocation configuration is "Either", the storage policy affinity setting could be any.
  • Other combinations will lead to the error.