Resolving NetWorker media database corruption

The scope of this post is to provide a how to like procedure aimed at resolving a common issue whereby NetWorker doesn't recycle tapes due to index corruption.

On the NetWorker server, simply perform the following steps:

# nsrim -X

This checks the consistency of the data structures of the save set with the data structures of the volume.

# nsrck -m

Invokes a consistency check to detect and remove inconsistent records from the media database.

# nsrck -L 6

Runs a consistancy check on the client file indices with level 6 (level 7 will recover the index from media)

# nsrck -m

Rerun consistency checks against the media database.


The above steps can resolve a number of symptoms and errors seens under NetWorker, but not limited to the following:-

  • Media database corruption
  • Error: ‘media database must be scavenged'
  • Error: ‘nsrmmdbd: WISS error, database was not shutdown cleanly'
  • Index corruption
  • Error: ‘error on open of recfile for index [index-name]‘
  • Error: ‘Cannot mount index [index-name]‘
  • Error: ‘nothing in index at this time'
  • Unable to perform backup due to index corruption
  • Unable to perform recovery due to index corruption
  • Slow writing to tape
  • Error: ‘nsrmmdbd: WISS error: Unable to mount /nsr/mm/mmvolume6: bad database header'
  • Error: ‘nsrmmdbd: WARNING: clients file missing from /nsr/mm/mmvolume6’
  • Error: ‘nsrmmdbd: WISS error, database was not shutdown cleanly'
  • Error: ‘nsrd: nsrmmdbd has exited on signal 11’
  • Error: ‘nsrmmdbd: WISS error: invalid slot number'
  • Error: ‘nsrmon #(number): query resdb failed, err: Cancelled.'
  • Error: ‘nsrmmdbd: media db must be scavenged'
  • Error: ‘media database must be scavenged'
  • Error: ‘bad database header'
  • Error: ‘WISS Error'
  • Error: ‘nsrmmdbd: Error on close of volume index file #x (invalid file number)' mmlocate loses locations of volumes when NetWorker daemons are restarted
  • Error: ‘save: error, media index problem'