Deleting all devices from a media server

You can delete all devices from a media server. The media server can be up, down, or failed and unrecoverable. All devices include robots, drives, and disk pools.

Two procedures exist: one to delete all robots and drives and the other to delete disk pools.

To delete all robots and drives from a media server

To delete disk pools from a media server

  1. If the media server has disk pools configured, remove the media server from the storage units that use those disk pools. For each storage unit, run the following command on the master server:

    install_path\NetBackup\bin\admincmd\bpsturep -label storage_unit_label -delhost host_name

    Replace storage_unit_label with the name of the storage unit and host_name with the name of the media server.

  2. If the media server is the only storage server for the disk pools, change the state of the disk pools to DOWN. To do so, enter the following command on the master server for each disk pool:

    install_path\NetBackup\bin\admincmd\nbdev config -changestate -stype server_type -dp disk_pool_name -state DOWN

    
    
    

    Replace server_type with the type of storage server: AdvancedDisk, PureDisk, or the vendor string that identifies the OpenStorage server type.

    Replace disk_pool_name with the name of the disk pool.

  3. For each disk pool, do the following:

    • Remove the media server from disk pool access by entering the following command on the master server:

      install_path\NetBackup\bin\admincmd\nbdevconfig -changedp -dp -disk_pool_name stype server_type -del_storage_servers storage_server

      Replace disk_pool_name with the name of the disk pool.

      Replace server_type with the type of storage server: AdvancedDisk, PureDisk, or the vendor string that identifies the OpenStorage server type.

      Replace storage_server with the name of the media server.

    • If the disk pool is on disk storage available only to the media server and is no longer required, delete the disk pool as follows:

      install_path\NetBackup\bin\admincmd\nbdevconfig -deletedp -dp disk_pool_name -stype server_type

      You cannot delete a disk pool that has unexpired backup images. You must first expire the images and delete the image fragments, as follows:

      • Expire the image as follows:

        install_path\NetBackup\bin\admincmd\bpexpdate -dp disk_pool_name -stype server_type -nodelete

      • Determine the media IDs in the disk pool as follows:

        install_path\NetBackup\bin\admincmd\bpimmediate -dp disk_pool_name -stype server_type -nodelete

      • Delete each media ID in the disk pool as follows:

        install_path\NetBackup\bin\nbdelete -dt disk_type -media_id name