Every now and again I need to work out mappings between emcpower devices, vxdisk list output and Sun Cluster did devices. Today I got a bit bored with trying to work it out manually again, so I wrote this script.
It could maybe be more elegant but I couldn't work out a way of avoiding using the temporary file. It works, anyway, so here goes;
for i in `vxdisk list | grep emcpower | nawk '{print $1}'`
do
echo
inq 2>/dev/null | grep `inq 2>/dev/null | grep $i | nawk '{print $5}'` > /tmp/inqout
j=`head -1 /tmp/inqout | nawk '{print $1}' | sed 's/\/dev\/rdsk\/c.//' | sed 's/s2//'`
echo VxVM device:
echo $i
echo did device:
scdidadm -L | grep $j
echo EMC devices:
cat /tmp/inqout
rm /tmp/inqout
done
Tuesday, May 12, 2009
Friday, May 1, 2009
How to Mount a Solaris Volume Manager Mirror While Booted From Media
Useful link this one;
http://www.sun.com/bigadmin/features/articles/splitsvm.jsp#mount
Where it says "metasync" though, it is OK to do a "metasync -r" at this point which saves a very lengthy wait for mirrors to resync.
http://www.sun.com/bigadmin/features/articles/splitsvm.jsp#mount
Where it says "metasync" though, it is OK to do a "metasync -r" at this point which saves a very lengthy wait for mirrors to resync.
Labels:
svm
Subscribe to:
Comments (Atom)
