|
@@ -0,0 +1,92 @@
|
|
|
+#!/bin/bash
|
|
|
+
|
|
|
+: '
|
|
|
+lsscsi -g
|
|
|
+[0:0:0:0] tape IBM ULT3580-HH5 BBNF /dev/st0 /dev/sg8
|
|
|
+[0:0:0:1] mediumx IBM 3573-TL B.20 /dev/sch0 /dev/sg9
|
|
|
+[0:0:1:0] tape IBM ULT3580-HH5 BBNF /dev/st1 /dev/sg10
|
|
|
+
|
|
|
+mtx -f /dev/sg9 status
|
|
|
+ Storage Changer /dev/sg9:2 Drives, 48 Slots ( 3 Import/Export )
|
|
|
+Data Transfer Element 0:Empty
|
|
|
+Data Transfer Element 1:Empty
|
|
|
+ Storage Element 1:Full :VolumeTag=000001L5
|
|
|
+ Storage Element 2:Full :VolumeTag=000002L5
|
|
|
+ Storage Element 3:Full :VolumeTag=000003L5
|
|
|
+ Storage Element 4:Full :VolumeTag=000004L5
|
|
|
+ Storage Element 5:Full :VolumeTag=000005L5
|
|
|
+ Storage Element 6:Full :VolumeTag=000006L5
|
|
|
+ Storage Element 7:Full :VolumeTag=000007L5
|
|
|
+ Storage Element 8:Full :VolumeTag=000008L5
|
|
|
+ Storage Element 9:Full :VolumeTag=000009L5
|
|
|
+ Storage Element 10:Full :VolumeTag=000010L5
|
|
|
+ Storage Element 11:Full :VolumeTag=000011L5
|
|
|
+ Storage Element 12:Full :VolumeTag=000012L5
|
|
|
+ Storage Element 13:Full :VolumeTag=000013L5
|
|
|
+ Storage Element 14:Full :VolumeTag=000014L5
|
|
|
+ Storage Element 15:Full :VolumeTag=000015L5
|
|
|
+ Storage Element 16:Full :VolumeTag=000016L5
|
|
|
+ Storage Element 17:Full :VolumeTag=000017L5
|
|
|
+ Storage Element 18:Full :VolumeTag=000018L5
|
|
|
+ Storage Element 19:Full :VolumeTag=000019L5
|
|
|
+ Storage Element 20:Full :VolumeTag=000020L5
|
|
|
+ Storage Element 21:Full :VolumeTag=000045L5
|
|
|
+ Storage Element 22:Full :VolumeTag=000022L5
|
|
|
+ Storage Element 23:Full :VolumeTag=000023L5
|
|
|
+ Storage Element 24:Full :VolumeTag=000024L5
|
|
|
+ Storage Element 25:Full :VolumeTag=000025L5
|
|
|
+ Storage Element 26:Full :VolumeTag=000026L5
|
|
|
+ Storage Element 27:Full :VolumeTag=000027L5
|
|
|
+ Storage Element 28:Full :VolumeTag=000028L5
|
|
|
+ Storage Element 29:Full :VolumeTag=000029L5
|
|
|
+ Storage Element 30:Full :VolumeTag=000030L5
|
|
|
+ Storage Element 31:Full :VolumeTag=000031L5
|
|
|
+ Storage Element 32:Full :VolumeTag=000046L5
|
|
|
+ Storage Element 33:Full :VolumeTag=000033L5
|
|
|
+ Storage Element 34:Full :VolumeTag=000034L5
|
|
|
+ Storage Element 35:Full :VolumeTag=000035L5
|
|
|
+ Storage Element 36:Full :VolumeTag=000036L5
|
|
|
+ Storage Element 37:Full :VolumeTag=000037L5
|
|
|
+ Storage Element 38:Full :VolumeTag=000038L5
|
|
|
+ Storage Element 39:Full :VolumeTag=000039L5
|
|
|
+ Storage Element 40:Full :VolumeTag=000040L5
|
|
|
+ Storage Element 41:Full :VolumeTag=000041L5
|
|
|
+ Storage Element 42:Full :VolumeTag=000042L5
|
|
|
+ Storage Element 43:Full :VolumeTag=000043L5
|
|
|
+ Storage Element 44:Full :VolumeTag=000044L5
|
|
|
+ Storage Element 45:Full :VolumeTag=CLNU00L1
|
|
|
+ Storage Element 46 IMPORT/EXPORT:Empty
|
|
|
+ Storage Element 47 IMPORT/EXPORT:Empty
|
|
|
+ Storage Element 48 IMPORT/EXPORT:Empty
|
|
|
+'
|
|
|
+
|
|
|
+logfile=/home/thierry/$0.log
|
|
|
+ rm $logfile
|
|
|
+
|
|
|
+echo "start Erase Script @ $(date)" >> $logfile
|
|
|
+
|
|
|
+i="1"
|
|
|
+while [ $i -lt 44 ]
|
|
|
+do
|
|
|
+echo "---------------------------------------------------------------" >> $logfile
|
|
|
+ echo "load and erase tape's $i & $[$i+1] "$(date) >> $logfile
|
|
|
+ mtx -f /dev/sg9 load $i "0" >> $logfile
|
|
|
+ mtx -f /dev/sg9 load $[$i+1] 1 >> $logfile
|
|
|
+
|
|
|
+ echo "erase drive0 tape $i" >> $logfile
|
|
|
+ mt -f /dev/st0 erase >> $logfile &
|
|
|
+ echo "erase drive0 tape $[$i+1]" >> $logfile
|
|
|
+ mt -f /dev/st1 erase >> $logfile
|
|
|
+
|
|
|
+ wait
|
|
|
+
|
|
|
+ mtx -f /dev/sg9 unload $i "0" >> $logfile
|
|
|
+ mtx -f /dev/sg9 unload $[$i+1] 1 >> $logfile
|
|
|
+ i=$[$i+2]
|
|
|
+done
|
|
|
+
|
|
|
+ echo "done Erasing 44 tapes script @ $(date)" >> $logfile
|
|
|
+
|
|
|
+exit
|
|
|
+
|
|
|
+
|