Fixing NetWorker client id corruption using nsrclientfix?

With the introduction of NetWorker 8 comes a new command nsrclientfix. The nsrclientfix command is used for the analysis of the media database to look for client id corruption. It can also merge clients together in both the resource database and the media database.

Platform specific comments
OSComments
Solaris, UNIX, Linux Should be already included on any of the NetWorker versions (8.0.3, 8.1.1 and 8.2)
Windows To get the nsrclientfix for NetWorker for Windows 8.0.3 and 8.1.1 contact EMC NetWorker Technical Support. You must provide the NetWorker Server version and cumulative/build number. For example: NetWorker 8.1.1.4 build 285

Backup the resource and media database.

The nsrclientfix command will make changes to both the media and configuration databases. In case there are any problems or mistakes, having a backup of both databases is strongly recommended.

  1. Shutdown the NetWorker daemons on the NetWorker server
  2. Make sure all daemons are down
    1. Solaris/UNIX/Linux: ps -ef | grep nsr
    2. Windows: tasklist | findstr nsr
  3. Copy /nsr/mm to /nsr/mm.before_nsrclientfix
  4. Copy /nsr/res/nsrdb to /nsr/res/nsrdb.before_nsrclientfix
  5. Copy /nsr/res/nsrladb to /nsr/res/nsrladb.before_nsrclientfix
  6. Start the NetWorker daemons

Identify which clients have clientid problems

To report clients with clientid problems on a NetWorker server (this command will only report findings, no action will be taken):

Syntax:

nsrclientfix -a - -p

For example:

root@nwsvr# nsrclientfix -a - -p
smurf, smurf.lab                   <-- One or more clients
schlumpf                           <-- One client
localhost                          <-- One client

The file read in and output are of the same format. The file consists of a comma separated list of clients separated by newlines. The number of clients on the line represents the actions taken.

Create a text file with the list of clients to be corrected by nsrclientfix.

Syntax:

nsrclientfix -a <file> -p

This command won't take any corrective action. It will just create the text file used by nsrclientfix to correct the problems.

Example:

root@nwsvr# nsrclientfix -a text1 -p
smurf, smurf.lab
schlumpf
localhost

Review the list of clients to be merged

Open the text file created in the previous step and review each line:

One client

When there is only one client on the line it means it is marked to be purged. This will not show up during the analysis step unless the —p flag is used. Clients are usually reported for purging (when requested) when an old client exists with no resource or media database entries. This is caused by either really old decommissioned clients or from merging one client into another.

More than one client

More than one client means that the clients listed are to be merged together. The first name in the list is the primary name who's name and client id will be preserved (if it already exists). The following names (secondary names) will all be merged in to the primary name. Any client resources of the secondary names will be renamed to the primary name and the alias lists of all of the clients will be combined. The media database entries will also have their client IDs and names merged into the primary name.

NOTE: If the aliases you want to merge, for example, "old name" and "new name" do not appear on the same line, you need to add the "old name" as a NetWorker alias of the "new name".

For example:

Add nwclientold or nwclientdummy as an alias for nwclient.

Warning: It is very important to make sure that all the aliases listed on the same line belong to the same host. If there is an alias that belong to a different host, nsrclientfix will merge its save sets to the first alias in the list. If the save sets need to be split at a later time, this will require a complicated and time consuming workaround (basically, remove the save sets from the media database and scan them again.).

Use nsrclientfix with the text file to correct clientid problems on the clients listed.

Syntax:

nsrclientfix -u <file>

Example:

root@nwsvr# nsrclientfix -u text1
Merging the following clients into 'smurf': smurf.lab
Merging the resource database for client 'smurf'.
Merging the media database for client 'smurf'.
The merging is complete for client 'smurf'.
Purging the client 'schlumpf'.
Purging the resource database of client 'schlumpf'.
Purging the media database of client 'schlumpf'.
Removing any index backups related to client 'schlumpf' in the media database.
Successfully purged client 'schlumpf'.
Purging the client 'localhost'.
Purging the resource database of client 'localhost'.
Purging the media database of client 'localhost'.
Removing any index backups related to client 'localhost' in the media database.
Successfully purged client 'localhost'.

NOTE: The merged clients won't be removed. The nsrclientfix command must run again to remove the aliases that were merged and not removed.

Purge clients that were previously merged and now have no save sets attached

The merged clients were not removed. To remove them, nsrclientfix needs to be run again:

root@nwsvr# nsrclientfix -a text2 -p
schlumpf.lab
root@nwsvr# nsrclientfix -u text2
Purging the client 'schlumpf.lab'.
Purging the resource database of client 'schlumpf.lab'.
Purging the media database of client 'schlumpf.lab'.
Removing any index backups related to client 'schlumpf.lab' in the media database.
Successfully purged client 'schlumpf.lab'.