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:
1 2 3 4 5 |
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:
1 2 3 4 5 6 7 |
... 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:
1 2 3 4 5 |
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:
1 2 3 4 5 |
... 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 |
Hi. Where do I put this script and how to do it to execute it
Hi, you would paste this into a dsmadmc.