HSM Administration Commands

There are some examples of these commands in use, in the started task tips page.

DFHSM works on volumes, primary volumes hold user accessible data, ML1 and ML2 volumes hold migrated data. Three of the volume management commands are

Volume Commands

  • ADDVOL - To define volumes to HSM
  • FREEVOL - To move data off HSM managed volumes
  • DELVOL - to delete volumes from HSM

   EADM Advert

Accelerate DB2 Write with zHyperWrite and "EADM™ by Improving DB2 Logs Volumes Response Time:

I have used these commands to move an HSM ML1 volume dynamically. You cannot use a DFDSS COPY of FDRCOPY job for this without shutting DFHSM down, as DFHSM is holding the disk. You could use a product like FDRPAS or TDMF, or you can use the procedure below.

Check you have enough space to move your volume, if not, clear some space in the ML1 pool

Issue the HSM command

ADDVOL volser UNIT(3390) MIGRATION(DRAIN)

Issue the HSM command

FREEVOL MVOL(volser) AGE(0) TARGETLEVEL(ML1)

The drain process could take an hour or two. It is best to move the data to existing ML1 volumes, as the recall service is maintained. If you move direct to ML2, you lock out access to the data while your move is running.

    GFS

When you get the notify that the freevol command has completed, The ML1 volume is now free, so move it your normal way. If the volume contains an SDSP, you can either move it with the disk, or delete/redefine it.

Add the volume back to HSM, using the command

ADDVOL volser UNIT(3390) MIGRATION(ML1 SDSP NODRAIN)

Use the FREEVOL command to clear out an ML2 tape. If the tape is damaged, then FREEVOL will clear out as much as it can and report on all failures.

FREEVOL MVOL(volser) TARGETLEVEL(ML2)

EXPIREBV

DFHSM does not expire backup volumes automatcially, you need to tell it to do that with the EXPIREBV command. Two examples are shown below. The first command will list out any backup volumes that are eligible for expiration, then second command will actually expire them. You should schedule that second command to run regularily.

HSEND EXPIREBV DISPLAY HSEND EXPIREBV EXECUTE

SETSYS COMMANDS

You can use SETSYS commands to dynamically change HSM operating parameters, but be aware that any changes will be reset when HSM is restarted. Lots of potential commands are available, these three are a sample of what you can do.

Alter the Primary Migration run time, so it starts at 02:00 and ends at 06:00

HSM SETSYS PRIMARYSPMGSTART(0200 0600)

Increase the maximum number of concurrent migration tasks to 6, possibly to get on top of some space issues

HSM SETSYS MAXMIGRATIONTASKS(6)

Reduce the maximum number of recall tasks to 4, maybe to reduce CPU consumption

HSM SETSYS MAXRECALLTASKS(4)

AUDIT Command

You use this command to check DFHSM control data sets and volumes for problems, and fix the problems.

The command to check and fix problems with an SDSP is

HSEND AUDIT MEDCTL(SDSP) VOLUMES(ML1010) -
  NOFIX ODS(output.dataset)
HSEND AUDIT MEDCTL(SDSP) VOLUMES(ML1010) -
  FIX ODS(output.dataset)

The command to check and fix problems with the BCDS is

HSEND AUDIT BCDS NOFIX ODS(output.dataset)
HSEND AUDIT BCDS FIX ODS(output.dataset)

If you run the AUDIT with NOFIX first, you can check your output file to make sure that the audit will do what you want. This is not practical if you are auditing a 3590 tape, as it takes so long. The command with NOFIX will output FIXCDS commands to your output file.
It is not a good idea to run the FIXCDS commands yourself manually, as several of the AUDIT commands will do more than just issue FIXCDS commands. For instance, AUDIT MEDIACONTROLS will also scratch an invalid catalog entry. AUDIT may also create a catalog entry for a data set that is in an SDSP and has an MCD record but no catalog entry. If you just run the FIXCDS commands manually, you would lose this data.

EXPIREBV command

You need to run this command to remove expired backups. If you do not run the command, the BCDS grows and tapes are never re-used. I once went into a site that had not run EXPIREBV for over two years, and were struggling to manage a large BCDS. That was one of my quickest ever wins. The command is simply

HSEND EXPIREBV EXECUTE

LIST Command

You use this command to get information from HSM volumes. A following example is to get information about datasets archived to a tape. This command will produce hundreds of lines of output, so send the output to a dataset, not your terminal.

HSEND LIST TTOC (A01086) ODS(output.dataset)

HSEND LIST ML1 TERM

will list out the status of all your ML1 volumes.

AUTH Command

You use this command the change the access that a user has in DFHSM. You have three options, USER, CONTROL or REVOKE. A USER can issue all commands except AUTH, You must have at least one CONTROL user who can issue AUTH commands to enable access to others. This can be a problem when testing out disaster recovery procedures, as your authorised user might not be present. What you need to do is add a line to your ARCCMDxx member as shown below, with 'userid' set to an on-site user.

AUTH userid DBA(CONTROL)

You then need to 'bounce' DFHSM.
To find out who is authorised to use HSM commands, use

HSEND LIST USER

FIXCDS Command

You use this command to display or alter data within the three CDS files. IBM seem to have withdrawn the documentation for this command. The AUDIT command will build FIXCDS commands as described above, so when you use the AUDIT command you can see FIXCDS in use.

The example below is a fix to reset the SDSP enqueue bit if HSM is cancelled. This fix has certainly worked for me in the past, but there is no guarantee that it still works now! Use this procedure at your own risk.

The symptom of the problem is that recalls from an SDSP are failing. First display the status of the SDSP using

TSO HSEND FIXCDS V volser

Where volser is the ML1 volume that contains the SDSP file. Check field x'59' in the display output. If bit 5 at x'59' is on then issue the following command:

F HSM,FIXCDS V volser PATCH(X'59' BITS(.....0..))

There are some other examples of the use of FIXCDS in the 'HSM Tape and Dataset tips' section

Statistics Gathering Commands

The REPORT command will tell you things like how many files have been migrated, backed up, recalled and restored. The syntax to get the current stats is

HSEND REPORT DAILY FUNCTION

If you leave the command to simply say FUNCTION, you will get stats on all the HSM functions, but it might be better to restrict the output to a specific function with FUNCTION(BACKUP) or DELETE, MIGRATION, RECALL or RECOVER.
You can also get data for several days with the FROM and TODATE parameters, how much you will get will depend on how often you purge this data from HSM

HSEND LIST DAILY FUNCTION(RECALL) FROMDATE(08/07/01) TODATE(08/07/15)

You can also report on volume activity with the REPORT VOLUMES command. If you specify a particular VOLSER you will get a detailed dataset report for that volume. If you do not, you get a summary report for every volume that HSM has. Pipe this one to a file, it will contain a lot of data.

HSEND REPORT VOLUMES(optionalvolser) ODS(file.name)

back to top