Originally posted by: frenger
Hi
Yes there is a way to get it from the ODM.
We use these one-liners to get the CU/LDEV either in dec or hex (depends what your SAN guys are using to map them).
It might not be the most elegant way to get it but it does the job for us even a lpar see these LUNs through a virtualizing VIO.
Thest them partially or as a whole, caution this forum might misunderstand my codesigns due there is no way here to post it as "code"
Cheers
Cut HDS CULDEV Hex
lspv | while read i k; do odmget -q "attribute=unique_id and name=$i" CuAt|grep -p HITACHI; done | egrep "name|value" | sed "s/\"//g" | awk '{print $3,$4}' | sed 'N;s/\n//' | awk '{print $2}' | cut -c 17-20
Cut HDS CULDEV Dec
lspv | while read i k; do odmget -q "attribute=unique_id and name=$i" CuAt|grep -p HITACHI; done | egrep "name|value" | sed "s/\"//g" | awk '{print $3,$4}' | sed 'N;s/\n//' | awk '{print $2}' | cut -c 17-20 | while read i; do echo "ibase=16; $i" | bc ; done
#AIX-Forum