Understanding the vSphere Autodeploy Stateless/Stateful Caching Disk selection process with the remote parameter selection in Host Profiles
search cancel

Understanding the vSphere Autodeploy Stateless/Stateful Caching Disk selection process with the remote parameter selection in Host Profiles

book

Article ID: 340037

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

This article explains the process of the sorting algorithm used by ESXi 5.1, 5.5 and 6.0 to sort the selection list of the stateless/stateful caching disk when the remote option is entered for Arguments for first disk under the host profile key System Image Cache Profile Setting.


Environment

VMware vSphere ESXi 5.5
VMware vSphere ESXi 6.0
VMware vSphere ESXi 5.1

Resolution

The algorithm used for selecting the stateless/stateful caching changed in ESXi 5.5 Patch 2. In both cases LUN 0 will not be selected to highlight how the selection algorithm works before and after ESXi 5.5 P2.

Behavior prior ESXi 5.5 Patch 2

  1. The LUN's and their working paths are enumerated first. The working paths are not sorted at this time.

    (LUN 2)naa.60060e8007db81000030db810000e13f:
    Working Paths: vmhba1:C0:T0:L2, vmhba1:C0:T1:L2, vmhba2:C0:T1:L2, vmhba2:C0:T0:L2
    (LUN 0)naa.60060e801602f900000102f90000c125:
    Working Paths: vmhba1:C0:T1:L0, vmhba1:C0:T0:L0, vmhba2:C0:T1:L0, vmhba2:C0:T0:L0
    (LUN 1)naa.60060e8007db81000030db810000e12c:
    Working Paths: vmhba1:C0:T1:L1, vmhba1:C0:T0:L1, vmhba2:C0:T1:L1, vmhba2:C0:T0:L1


  2. The first working path is chosen for each LUN before the final sorting

    (LUN 2)vmhba1:C0:T0:L2 - naa.60060e8007db81000030db810000e13f
    (LUN 0)vmhba1:C0:T1:L0 - naa.60060e801602f900000102f90000c125
    (LUN 1)vmhba1:C0:T1:L1 - naa.60060e8007db81000030db810000e12c


  3. The list is then sorted to select the LUN to be used for the stateless/stateful caching disk.

    (LUN 2)vmhba1:C0:T0:L2 - naa.60060e8007db81000030db810000e13f selected LUN
    (LUN 0)vmhba1:C0:T1:L0 - naa.60060e801602f900000102f90000c125
    (LUN 1)vmhba1:C0:T1:L1 - naa.60060e8007db81000030db810000e12c

    In the preceding example LUN 0 was not picked as when the first working paths were selected vmhba1:C0:T1:L0 (Step 2) was used instead of vmhba1:C0:T0:L0.

Behavior after ESXi 5.5 Patch 2 and later
In this example the working paths will be changed to highlight what may happen when presenting LUN's from multiple SAN's. SAN 1 is presenting on targets 0 and 1 while SAN 2 is presenting on target 2 and 3.
  1. The LUN's and their working paths are enumerated first. A sort is now introduced to prevent the issues observed in the previous example.

    (LUN 2)naa.60060e8007db81000030db810000e13f:
    Sorted Working Paths: vmhba1:C0:T0:L2
    , vmhba1:C0:T1:L2, vmhba2:C0:T0:L2, vmhba2:C0:T1:L2
    (LUN 0)naa.60060e801602f900000102f90000c125:
    Sorted Working Paths: vmhba1:C0:T2:L0, vmhba1:C0:T3:L0
    , vmhba2:C0:T2:L0, vmhba2:C0:T3:L0
    (LUN 1)naa.60060e8007db81000030db810000e12c:
    Sorted Working Paths: vmhba1:C0:T0:L1
    , vmhba1:C0:T1:L1, vmhba2:C0:T0:L1, vmhba2:C0:T1:L1

  2. The first working path is chosen for each LUN before the final sort.

    (LUN 2)vmhba1:C0:T0:L2 - naa.60060e8007db81000030db810000e13f
    (LUN 0)vmhba1:C0:T2:L0 - naa.60060e801602f900000102f90000c125
    (LUN 1)vmhba1:C0:T0:L1 - naa.60060e8007db81000030db810000e12c

  3. The list is sorted to select the LUN to be used for the stateless/stateful caching disk.

    (LUN 1)vmhba1:C0:T0:L1 - naa.60060e8007db81000030db810000e12c selected LUN
    (LUN 2)vmhba1:C0:T0:L2
    - naa.60060e8007db81000030db810000e13f
    (LUN 0)vmhba1:C0:T2:L0
    - naa.60060e801602f900000102f90000c125

    In the above example LUN 0 was not selected as it is presented from target 2 ( vmhba1:C0:T2:L0). To have the remote option pick LUN 0 the LUN would need to be presented on the lowest target number and lowest LUN number.


Additional Information

In the host profile key System Image Cache Profile Setting there is an option to overwrite VMFS volumes. This option is off by default. If the option is set to off any LUN selected by host profiles will not be overwritten if it contains a VMFS volume.

Further options to specify the stateless/stateful caching disk:
  • esx - The first disk detected containing a valid installation of ESXi
  • local – The first local disk detected by ESXi after boot
  • device model
  • device vendor
  • vmkernel device driver name
The preceding values can be viewed with the command:

esxcli storage core device list

Understanding vSphere Auto Deploy Stateless Caching and Stateful Installs
Tagging the Stateless Caching Disk using Autodeploy displays an inaccurate Is Local: value
了解使用主机配置文件中远程参数选择的 vSphere Autodeploy 无状态/有状态缓存磁盘选择过程
vSphere Autodeploy でホスト プロファイルのリモート パラメータを選択した場合のステートレス/ステートフル キャッシュ ディスクの選択プロセスについて