How to find bad Tapes and fix bad tapes in TSM
This TSM SQL select command will give a list of tapes that have reported read and write errors.
select volume_name, read_errors,write_errors from volumes where read_errors>0 and stgpool_name='TAPEPOOL' or write_errors>0 and stgpool_name='TAPEPOOL'
This will give you list of tapes that have been put in this state,
q volume access=readonly and q volume access=unavailable
probably because the system has identified an error.
However, a tape will be marked as unavailable if TSM tried to mount it and it is not in library.
Look for tapes which have errors
select volume_name, read_errors,write_errors from volumes where (read_errors > 0 or write_errors > 0)
This will give a list of tapes that have reported read and write errors.
To fix a problem, run the audit command
AUDIT VOLUME volser FIX=YES
the audit command will try to fix it. If audit command cannot fix a problem file, and a copy exists on another tape,
then you need to use the RESTORE VOLUME command. If there is no copy, then the AUDIT command just deletes the entry from the database.
If the tape is hopelessly trashed, and you do not have a copy, the only answer the ‘delete volume discard=yes’ command. However, its always worth trying a MOVE DATA command first to see if you can rescue something from the tape.
This TSM SQL select command will give a list of tapes that have reported read and write errors.
select volume_name, read_errors,write_errors from volumes where read_errors>0 and stgpool_name='TAPEPOOL' or write_errors>0 and stgpool_name='TAPEPOOL'
This will give you list of tapes that have been put in this state,
q volume access=readonly and q volume access=unavailable
probably because the system has identified an error.
However, a tape will be marked as unavailable if TSM tried to mount it and it is not in library.
Look for tapes which have errors
select volume_name, read_errors,write_errors from volumes where (read_errors > 0 or write_errors > 0)
This will give a list of tapes that have reported read and write errors.
To fix a problem, run the audit command
AUDIT VOLUME volser FIX=YES
the audit command will try to fix it. If audit command cannot fix a problem file, and a copy exists on another tape,
then you need to use the RESTORE VOLUME command. If there is no copy, then the AUDIT command just deletes the entry from the database.
If the tape is hopelessly trashed, and you do not have a copy, the only answer the ‘delete volume discard=yes’ command. However, its always worth trying a MOVE DATA command first to see if you can rescue something from the tape.