Problem
In 2017 we replaced an IBM storage sysdem with an Hitachi Vantara storage system (actually, we replaced the complete SAN infrastructure). We handled it by attaching both storage systems to VMware (v5.5) and migrating the datastores. A recommendation from Hitachi Vantara was to set the queue depth for fibre channel disks to 64.
Solution
Here is a little script which does that. Due to issues as described in a previous post which caused HA/FA (High Availability / Fault Tolerance) reactions in VMware to trigger, we played it safe and added a little sleep after each change. The script also checks of the queue depth is already set to the desired value and does nothing in this case. It’s small enough to just copy&paste it directly into a shell on the host.
SLEEPTIME=210 # 3.5 minutes !!!! only if all RDMs on the host are reserved!!!
TARGET_DEPTH=64
for LDEV in $(esxcli storage core device list | grep "HITACHI Fibre Channel Disk" | awk '{gsub(".*\\(",""); gsub("\\).*",""); print}'); do
echo $LDEV
DEPTH="$(esxcli storage core device list -d $LDEV | awk '/outstanding/ {print $8}')"
if [ "$DEPTH" -ne $TARGET_DEPTH ]; then
echo " setting queue depth $TARGET_DEPTH"
esxcli storage core device set -d $LDEV -O $TARGET_DEPTH
echo " sleeping $SLEEPTIME"
sleep $SLEEPTIME
else
echo " queue depth OK"
fi
done