Saturday, January 3, 2015

Multipath

#!/bin/ksh
for i in `ls -l /dev/mapper | grep 3600 |awk '{print $10}'`;
do
echo -ne "$i : \c";
echo -ne "LUN: `multipath -ll $i| grep -A 3 $i| grep sd | awk '{print $2}' | awk -F: '{print $4}'` :\c";
echo -ne "WWID: \c"
/sbin/scsi_id -gus /block/`multipath -ll $i | grep -A 3 dm- | grep sd | awk '{print $3}'`
done

No comments:

Post a Comment