ESXCLI - Verwaltung von Storage Pfaden
Folgende Befehle können direkt auf der Shell des ESXi-Hosts ausgeführt werden. Natürlich ist dies auch per SSH Verbindung auf den ESXi-Host möglich.
Inhaltsverzeichnis
Storage
Storage Path Policies | Beschreibung |
---|---|
VMW_PSP_FIXED (fixiert den Pfad) |
The host uses the designated preferred path, if it has been configured. Otherwise, the host selects the first working path discovered at system boot time. If you want the host to use a particular preferred path, specify it through the vSphere Client or by the command.
The default policy for active-active storage devices is VMW_PSP_FIXED. |
VMW_PSP_MRU (meist verwendete Pfad) |
The host selects the path that it used most recently. When the path becomes unavailable, the host selects an alternative path. The host does not revert back to the original path when that path becomes available again. There is no preferred path setting with the MRU policy. MRU is the default policy for active-passive storage devices. |
VMW_PSP_RR (Round-Robin) |
The host uses an automatic path selection algorithm that rotates through all active paths when connecting to active-passive arrays, or through all available paths when connecting to active-active arrays. Automatic path selection implements load balancing across the physical paths available to your host. Load balancing is the process of spreading I/O requests across the paths. The goal is to optimize throughput performance such as I/O per second, megabytes per second, or response times. |
Storage Befehle
Anzeigen aller verbundenen LUNs:
esxcli storage nmp device list
Anzeigen aller verbundenen LUNs die die Storage-Path-Policy (VMW_PSP_RR) zugewiesen haben
esxcli storage nmp device list | grep -B4 <Storage-Path-Policy> | grep ^naa.
Alle LUNs fixieren
Alle LUNs die eine gewisse Storage-Path-Policy zugewiesen haben, auf eine andere Storage-Path-Policy abändern (Beispiel: Round-Robin zu Fixed)
for i in `esxcli storage nmp device list | grep -B4 VMW_PSP_RR | grep ^naa.` do esxcli storage nmp device set --device $i --psp VMW_PSP_FIXED done
Weitere Informationen: https://pubs.vmware.com/vsphere-50/index.jsp?topic=%2Fcom.vmware.vcli.examples.doc_50%2Fcli_manage_storage.6.5.html