This script does not actually perform any syncing of Networker to a 3494's internal inventory, but will print results of what's not in sync.
Output:
Lines beginning with "SILO" indicate volumes that are in the silo, but not in Networker. Use "nsrjb -a -T <volume>" to correct them.
Lines beginning with "NSRJB" indicate volumes that Networker thinks are in the silo, but in fact are not. "nsrjb -w -T <volume>" should correct this.
Lines beginning with "MMLOCATE" indicate volumes that mmlocate reports as being in the silo, but in fact are not. Use "mmlocate -n <volume> -u <real_location>" to correct this.
[tt]
#!/bin/ksh
# syncinv
# 2001 Jeremy Collins
# as far as licensing applies to a script, the modified BSD license applies.
# Stuff for the local environment
SILLOC="ftwsilo"
# siloloc is the value mmlocate reports for volume that are in the silo
SILOSERIES="[EN]"
# siloseries is a greppable regex. I use both "E" and "N" series in mine.
# if you have only one series, siloseries can be that single letter
LMCP=/dev/lmcp0
# the default value for lmcp is probably sufficient
# you probably won't need to modify the rest of this, unless you care
# to reimplement it. I'm sure it could be done better and faster.
#echo "Comparing Silo inventory with Legato inventory..."
cat /tmp/LIBINV.${UNIQUE} | while read TAPE MISC
do
COUNT=`grep ${TAPE} /tmp/LEGINV.${UNIQUE} | wc -l`
if test ${COUNT} -eq 0
then
#echo "Silo has ${TAPE}, Legato does not"
echo "SILO ${TAPE}"
fi
done
#echo "Comparing nsrjb inventory to Silo..."
cat /tmp/LEGINV.${UNIQUE} | while read SLOT TAPE MISC
do
COUNT=`grep ${TAPE} /tmp/LIBINV.${UNIQUE} | wc -l`
if test ${COUNT} -eq 0
then
#echo "Legato nsrjb has ${TAPE}, but it's not in the silo"
echo "NSRJB ${TAPE}"
fi
done
#echo "Comparing mmlocate data to Silo inventory..."
cat /tmp/LOCATE.${UNIQUE} | while read TAPE MISC
do
COUNT=`grep ${TAPE} /tmp/LIBINV.${UNIQUE} | wc -l`
if test ${COUNT} -eq 0
then
#echo "Legato location of ${TAPE} is silo, but it's not there"
echo "MMLOCATE ${TAPE}"
fi
done
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.