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
- Enter the following command on the primary server:
On Windows:
install_path\NetBackup\bin\admincmd\nbemmcmd -deletealldevices -machinename server_name -machinetype media
On UNIX:
/usr/openv/netbackup/bin/admincmd/nbemmcmd -deletealldevices -machinename server_name -machinetype media
Replace server_name with the name of the media server.
To delete disk pools from a media server
- 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 primary server:
On Windows:
install_path\NetBackup\bin\admincmd\bpsturep -label storage_unit_label -delhost host_name
On UNIX:
/usr/openv/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.
- 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 primary server for each disk pool:
On Windows:
install_path\NetBackup\bin\admincmd\nbdevconfig -changestate -stype server_type -dp disk_pool_name -state DOWN
On UNIX:
/usr/openv/netbackup/bin/admincmd/nbdevconfig -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.
For each disk pool, do the following:
Remove the media server from disk pool access by entering the following command on the primary server:
On Windows:
install_path\NetBackup\bin\admincmd\nbdevconfig -changedp -dp -disk_pool_name -stype server_type -del_storage_servers storage_server
On UNIX:
/usr/openv/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:
On Windows:
install_path\NetBackup\bin\admincmd\nbdevconfig -deletedp -dp disk_pool_name -stype server_type
On UNIX:
/usr/openv/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:
On Windows:
install_path\NetBackup\bin\admincmd\bpexpdate -dp disk_pool_name -stype server_type -nodelete
On UNIX:
/usr/openv/netbackup/bin/admincmd/bpexpdate -dp disk_pool_name -stype server_type -nodelete
Determine the media IDs in the disk pool as follows:
On Windows:
install_path\NetBackup\bin\admincmd\bpimmedia -dp disk_pool_name -stype server_type -nodelete
On UNIX:
/usr/openv/netbackup/bin/admincmd/bpimmedia -dp disk_pool_name -stype server_type
Delete each media ID in the disk pool as follows:
On Windows:
install_path\NetBackup\bin\nbdelete -dt disk_type -media_id name
On UNIX:
/usr/openv/netbackup/bin/nbdelete -dt disk_type -media_id name