6 Finishing Up

Once you have completed configuration and data recovery, you should perform two last tasks:

Restoring Archiving File Systems to Normal Operation

If you disabled archiving and recycling, re-enable them now:

Enable Archiving

  1. Log in to the file-system metadata server as root.

    root@mds1:~# 
    
  2. Open the /etc/opt/SUNWsamfs/archiver.cmd file in a text editor, and scroll down to the first wait directive that you added to the file when you started recovery efforts.

    In the example, we use the vi editor:

    root@mds1:~# vi /etc/opt/SUNWsamfs/archiver.cmd
    # Configuration file for Oracle HSM archiving file systems
    #-----------------------------------------------------------------------
    # General Directives
    archivemeta = off
    examine = noscan
    #-----------------------------------------------------------------------
    # Archive Set Assignments 
    wait
    fs = hsmfs1
    logfile = /var/adm/hsmfs1.archive.log
    all .
        1 -norelease 15m
        2 -norelease 15m
    fs = hsmfs2
    logfile = /var/adm/hsmfs2.archive.log
    all .
    ...
    
  3. To enable archiving, delete every wait directive that you added to the file when you started recovery efforts. Save the file, and close the editor.

    In the example, we remove the single wait directive that we added:

    root@mds1:~# vi /etc/opt/SUNWsamfs/archiver.cmd
    ...
    #-----------------------------------------------------------------------
    # Archive Set Assignments
    fs = hsmfs1
    logfile = /var/adm/hsmfs1.archive.log
    all .
        1 -norelease 15m
        2 -norelease 15m
        3 -norelease 15m
    fs = hsmfs2
    ...
    :wq
    root@mds1:~# 
    
  4. Next, enable recycling.

Enable Recycling

  1. Log in to the file-system metadata server as root.

    root@mds1:~# 
    
  2. Open the /etc/opt/SUNWsamfs/recycler.cmd file in a text editor, and scroll down to the first -ignore parameter that you added to the file when you started recovery efforts.

    In the example, we use the vi editor:

    root@mds1:~# vi /etc/opt/SUNWsamfs/recycler.cmd
    # Configuration file for Oracle HSM archiving file systems
    #-----------------------------------------------------------------------
    logfile = /var/adm/recycler.log
    no_recycle tp VOL[0-9][2-9][0-9]
    lib1 -hwm 95 -mingain 60 -ignore
    
  3. Remove every -ignore parameter that you added when you started recovery efforts. Then save the file, and close the editor.

    In the example, we have only one -ignore parameter in the Oracle HSM configuration:

    root@mds1:~# vi /etc/opt/SUNWsamfs/recycler.cmd
    # Configuration file for Oracle HSM archiving file systems
    #-----------------------------------------------------------------------
    logfile = /var/adm/recycler.log
    no_recycle tp VOL[0-9][2-9][0-9]
    lib1 -hwm 95 -mingain 60
    :wq
    root@mds1:~# 
    
  4. Check the modified configuration files for errors. Use the commands archiver -lv to check the archiver.cmd file, and run the initialization command sam-fsd. Correct any errors.

    In the example, the configuration files are correct:

    root@mds1:~# archiver -lv
    Reading '/etc/opt/SUNWsamfs/archiver.cmd'.
    1: #-----------------------------------------------------------------------
    2: # General Directives
    3: archivemeta = off
    4: examine = noscan
    5: #-----------------------------------------------------------------------
    5: # Archive Set Assignments
    7: fs = hsmfs1
    ...
       .sort: path
    root@mds1:~# sam-fsd
    Trace file controls:
    sam-amld      /var/opt/SUNWsamfs/trace/sam-amld
    ...
    Would start sam-archiverd()
    Would start sam-stagealld()
    Would start sam-stagerd()
    Would start sam-amld()
    root@mds1:~# 
    
  5. Reconfigure the Oracle HSM software using the restored configuration files. Use the command samd config.

    Archiving and recycling processes resume.

    root@mds1:~# samd config
    
  6. If you are recovering from a server problem or from loss or damage to one more file systems, save the newly restored Oracle HSM configuration.

  7. Otherwise, stop here.

Preserving the New Configuration Information

If you have changed the Oracle HSM configuration in the course of recovery efforts, you should back up the configuration again now.

Save the Newly Restored Oracle HSM Configuration

  1. Log in to the file-system metadata server as root.

    root@mds1:~# 
    
  2. Run the samexplorer command and create a SAMreport. Save it in the directory that holds your backup configuration information. Use the command samexplorer path/hostname.YYYYMMDD.hhmmz.tar.gz, where path is the path to the chosen directory, hostname is the name of the Oracle HSM file system host, and YYYYMMDD.hhmmz is a date and time stamp.

    The default file name is /tmp/SAMreport.hostname.YYYYMMDD.hhmmz.tar.gz. In the example, we already have a directory for saving SAMreports, /zfs1/sam_config/. So we create the report in this directory:

    root@mds1:~# samexplorer /zfs1/sam_config/explorer/server1.20140430.1659MST.tar.gz
         Report name:     /zfs1/sam_config/explorer/samhost1.20140430.1659MST.tar.gz
         Lines per file:  1000
         Output format:   tar.gz (default) Use -u for unarchived/uncompressed.
     
         Please wait.............................................
         Please wait.............................................
         Please wait......................................
     
         The following files should now be ftp'ed to your support provider
         as ftp type binary.
     
         /zfs1/sam_config/explorer/samhost1.20140430.1659MST.tar.gz
    
  3. Copy the /etc/opt/SUNWsamfs/ directory and its contents to an independent file system.

    The /etc/opt/SUNWsamfs/ directory may contain any or all of the following:

    • mcf (the master configuration file for the Oracle HSM file systems)

    • archiver.cmd (configures the archiving process)

    • inquiry.conf (lists the vendor and product identification strings that SCSI devices report in response to an inquiry command)

    • scripts/* (locally customized Oracle HSM scripts)

    • defaults.conf (overrides specified, default parameter values)

    • diskvols.conf (identifies disk storage that is used for archiving)

    • hosts.family-set-name (defines server and client host names and IP addresses for a shared file-system)

    • hosts.family-set-name.local (defines server and client host names and IP addresses for a shared file-system)

    • preview.cmd (customizes the priorities of archiving and staging requests for volumes that are not currently loaded)

    • recycler.cmd (customizes the recycling process)

    • releaser.cmd (customizes the releasing process)

    • rft.cmd (controls the Oracle HSM file transfer service)

    • samfs.cmd (defines file system mount parameters)

    • stager.cmd (customizes the staging process)

    • samremote (the SAM-Remote server configuration file)

    • family-set-name (a SAM-Remote client configuration file)

    • network-attached-library (a parameters file for a network-attached library

  4. Back up the library catalogs, including the historian catalog. For each catalog, use the command dump_cat -V catalog-file, where catalog-file is the path and name of the catalog file. Redirect the output to dump-file in an independent file system.

    In the example, we first dump the catalog data for lib1 to the file lib1cat2.dump in a directory on the independent NFS-mounted file system zfs1. Then we dump the historian catalog:

    root@mds1:~# dump_cat -V /var/opt/SUNWsamfs/catalog/lib1 > /zfs1/hsmcfg/lib1cat2.dump
    root@mds1:~# dump_cat -V /var/opt/SUNWsamfs/catalog/historian > /zfs1/hsmcfg/historian2.dump
    
  5. Copy system configuration files that were modified during Oracle HSM installation and configuration. These may include:

    /etc/
         syslog.conf
         system
         vfstab
    /kernel/drv/
         sgen.conf
         samst.conf
         samrd.conf
         sd.conf
         ssd.conf
         st.conf
    /usr/kernel/drv/dst.conf
    
  6. Copy any custom shell scripts and crontab entries that you created as part of the Oracle HSM configuration to the selected subdirectory.

    For example, if you created a crontab entry to manage creation of recovery points, you would save a copy now.

  7. Record the revision level of the currently installed software, including Oracle Oracle HSM, Solaris, and Solaris Cluster (if applicable), and save a copy of the information in a readme file in the chosen subdirectory.

  8. In the chosen subdirectory, save copies of any newly downloaded Oracle Oracle HSM, Solaris, and Solaris Cluster packages so that you can restore the software quickly, should it again become necessary.