A weeks ago I saw this
post on the Duncan Epping's blog(a very nice virtualization blog)!
I also use a script to change the PSP on my environment, but I start to use vMA for a repository of the script and cmd line maintenance of the ESX. Ok for now I'll continue to use the ESX and not the ESXi, but the future is ESXi and vMA.
I write this script for change the PSP
#Script per settaggio PathSelectionPolicy a Round Robin
#Autore: aLex
#ver 1.2
#date 30/03/2011
SERVER=$1
#Collegato a server in vifp
vifptarget -s $SERVER
#Modifica la policy di default per i device del Symmetrix - VMax
esxcli --server $SERVER nmp satp setdefaultpsp -s VMW_SATP_SYMM -P VMW_PSP_RR
# Inserimento ciclo for per prendere tutti i device.
for i in $(esxcfg-scsidevs -c | awk '{ print $1 }' | grep naa.600 );
do
esxcli --server $SERVER nmp device setpolicy -P VMW_PSP_RR -d $i;
done
echo 'Modifica terminata'
#Chiusura connessione vifp
vifptarget -c
I connect to the server, than I change the default PSP fot the satp of the EMC VMAX SAN and than I chnage the PSP for all the device.
For the script you need to have all the server added to the vifp db than you can run the script with the name of the server.
Disclaimer: This script is for education pourposes. It function correctly for my environment, but test it on a lab environment before you use in production.
aLex