media write protector
1.how to identfy write protector is enabled or disabled for a media in GUI and CLI ?
2.If wrire protector is enabled how to disable that one ?
3.how to identify the bad medias ?
Assuming you are referring to an LTO based tape system, the Write Protect is a physical red tab on each tape that must be manually closed (write-protected) or opened (write-enabled) by a person. It is not enabled or disabled by the tape library or by NetBackup. To the best of my knowledge, there is no report or way to know if a tape is write-protected. The only way I can think of is to mount the tape in a drive and try to write to it and get an error from the tape drive that tells you it is write-protected. But that's probably dependent on your tape drive and/or tape library as to whether or not it will report such information.
Bad media must be determined by the backup admin. Normally this is done by recognizing repeated attempts to read or write to the same tape and getting error messages from the tape drive each time. NetBackup will change the tape status to "Frozen". For instance, if NetBackup tries to write to a tape but gets no response from the tape drive, NetBackup will usually mark the tape as "Frozen" in its database. the Backup admin has to unfreeze the tape and figure out if the problem is really the tape or if the drive was the problem. I have seen instances where a tape drive's path had been changed due to a reboot of the media server, but the NetBackup path was not updated. The library mounted a scratch tape in the drive, but because the drive path had changed, NBU waited for the drive to report the tape was ready and never got that confirmation, so NBU froze the scratch tape and mounted the next scratch tape. It did this over and over until all scratch tapes were frozen and the job was failed due to no more scratch tapes.
This type of thing is what the backup admin must do as part of their daily job duties: monitor for problems and determine the root cause of the errors. They might not be actual bad media; you may just have a tape drive that needs to be rediscovered by NBU!