The usual IT babble
Mass-updating Tivoli Storage Manager drive status
I was fighting with our VTL again, and TSM was thinking all the drives were offline. In order to update the drive status, you’d need to go into the ISC and select each drive and set them to ONLINE. Since I’m a bit click-lazy, I wrote a simple nested for-loop, which gives me the output to update all the drives at once:
for i in 1 2; do
for k in $( seq -w 1 32 ); do
echo "UPDATE DRIVE VTL$i VTL${i}_DR${k} ONLINE=YES"
done
done
Result is a list like this:
... UPDATE DRIVE VTL1 VTL1_DR31 ONLINE=YES UPDATE DRIVE VTL1 VTL1_DR32 ONLINE=YES UPDATE DRIVE VTL2 VTL2_DR01 ONLINE=YES UPDATE DRIVE VTL2 VTL2_DR02 ONLINE=YES UPDATE DRIVE VTL2 VTL2_DR03 ONLINE=YES ...
The same goes for mass-updating the path status:
for i in 1 2; do
for k in $( seq -w 1 32 ); do
echo "UPDATE PATH TSM$i VTL${i}_DR${k} SRCTYPE=SERVER DESTTYPE=DRIVE LIBRARY=VTL$i ONLINE=YES"
done
done
Result is a list like this:
... UPDATE PATH TSM1 VTL1_DR31 SRCTYPE=SERVER DESTTYPE=DRIVE LIBRARY=VTL1 ONLINE=YES UPDATE PATH TSM1 VTL1_DR32 SRCTYPE=SERVER DESTTYPE=DRIVE LIBRARY=VTL1 ONLINE=YES UPDATE PATH TSM2 VTL2_DR01 SRCTYPE=SERVER DESTTYPE=DRIVE LIBRARY=VTL2 ONLINE=YES UPDATE PATH TSM2 VTL2_DR02 SRCTYPE=SERVER DESTTYPE=DRIVE LIBRARY=VTL2 ONLINE=YES
| Print article | This entry was posted by Christian on Friday, 28th August, 2009 at 15:10, and is filed under Life. Follow any responses to this post through RSS 2.0. Both comments and pings are currently closed. |
Comments are closed.