'Library attempting to use one or more devices that are already in use' error when re-adding a tape library.
NetVault Backup environment details...
NetVault Server: 9.2 Windows with Smart Client and Dynamically Shared Drive (DSD) licenses installed (you need one DSD license per drive).
NetVault Client: 9.2 Windows (Smart Client)
Backup Device: Overland NEO2000 tape library with 2 drives and attached to the NetVault Server and Smart Client via FC. Drives are setup to be shared with the NetVault Server and Smart Client.
The Smart Client had crashed and since then all backups using that target failed, as marked the drive offline.
Rebooting the Smart Client didn't resolve the issue.
Reconfiguring the shared drive caused the following error message to appear:
"Library attempting to use one or more devices that are already in use"
The problem was that the device trees within the NVDB Indexes and Records sections of the MediaDatabase had corrupted.
This issue was resolved by re-creating the device trees as per the following "Recreating the NetVault device tree" KBA and finally could successfully re-add both tape library drives as shared again: