Sekundäre TSLM-Instanz auf AIX installieren

Das folgende Beispiel zeigt, wie die sekundäre TSLM-Instanz auf einem AIX® -System installiert wird.

  1. Erstellen Sie den Abschnitt für die sekundäre Instanz in /etc/tslm.cfg als TSLM_1 mithilfe von manageTSLMClone.pl.
    Syntax:
    manageTSLMClone.pl -C -T Ziel -s Quellenverzeichnis -d Zielverzeichnis -u Benutzer -g Gruppe -h Ausgangsverzeichnis -a DB-Administratorverzeichnis -l sqllibpath -i db2user -j db2group
    -C
    Einen Abschnitt in der TSLM-Konfigurationsdatei erstellen.
    Ziel
    Der Zielinstanzname. Beispiel: TSLM_1.
    Quellenverzeichnis
    Das Quellenverzeichnis.
    Zielverzeichnis
    Das Zielverzeichnis.
    Benutzer
    Der Benutzername der neuen Instanz.
    Gruppe
    Der Gruppenname der neuen Instanz.
    Ausgangsverzeichnis
    Das Ausgangsverzeichnis der neuen Instanz.
    DB-Administratorverzeichnis
    Das Administratorverzeichnis der Db2® -Instanz.
    SQL-Bibliothekspfad
    Das SQPlus ® -Verzeichnis der Db2 -Instanz.
    db2user
    Der Benutzername der Db2 -Instanz.
    db2group
    Die Gruppe db2 der Db2 -Instanz.
  2. Überprüfen /etc/tslm.cfg.
    #  /opt/IBM/ermm/install/manageTSLMClone.pl -q
    [TSLM_0]
            TSLM_BASEDIR=/opt/IBM/ermm
            TSLM_USER=ermm
            TSLM_GROUP=ermm
            TSLM_NO=TSLM_0
            TSLM_USERDIR=/home/ermm
            DB_ADM_DIR=/home/db2inst2
            SQLLIB_PATH=/home/db2inst2/sqllib/bin
            DB_ADM_NAME=db2inst2
            DB_ADM_GRP_NAME=db2grp2
    [TSLM_1]
            TSLM_BASEDIR=/opt/IBM/ermm2
            TSLM_USER=ermm2
            TSLM_GROUP=ermm2
            TSLM_NO=TSLM_1
            TSLM_USERDIR=/home/ermm2
            DB_ADM_DIR=/home/db2inst3
            SQLLIB_PATH=/home/db2inst3/sqllib/bin
            DB_ADM_NAME=db2inst3
            DB_ADM_GRP_NAME=db2grp3
            
    # cat /etc/tslm.cfg
    [TSLM_0]
    TSLM_BASEDIR=/opt/IBM/ermm
    TSLM_USER=ermm
    TSLM_GROUP=ermm
    TSLM_NO=TSLM_0
    TSLM_USERDIR=/home/ermm
    DB_ADM_DIR=/home/db2inst2
    SQLLIB_PATH=/home/db2inst2/sqllib/bin
    DB_ADM_NAME=db2inst2
    DB_ADM_GRP_NAME=db2grp2
    [TSLM_1]
    TSLM_BASEDIR=/opt/IBM/ermm2
    TSLM_USER=ermm2
    TSLM_GROUP=ermm2
    TSLM_NO=TSLM_1
    TSLM_USERDIR=/home/ermm2
    DB_ADM_DIR=/home/db2inst3
    SQLLIB_PATH=/home/db2inst3/sqllib/bin
    DB_ADM_NAME=db2inst3
    DB_ADM_GRP_NAME=db2grp3
    
  3. Erstellen Sie den Klon von TSLM_0 für TSLM_1 (die sekundäre Instanz).
    Syntax
    manageTSLMClone.pl -c -T Ziel
    -c
    Eine Instanz erstellen.
    Ziel
    Der Zielinstanzname. Beispiel: TSLM_1.
    # /opt/IBM/ermm/install/manageTSLMClone.pl -c -T TSLM_1
    # tslm-system package
    Reading /etc/tslm.cfg...
    IBM Tape System Library Manager
    Licensed Materials - Property of IBM
    (C) Copyright IBM Corp. 2004, 2018 All Rights Reserved
    Reading /etc/tslm.cfg...
    IBM Tape System Library Manager
    Licensed Materials - Property of IBM
    (C) Copyright IBM Corp. 2004, 2018 All Rights Reserved
    Creating /home/ermm2/tslmprofile...
    Creating /home/db2inst3/tslmprofile...
    # tslm-mm package
    # tslm-lm package
    Giving user "ermm2" access to SCS log directory "/var/log"...
    The group of /var/log is "bin". Adding user "ermm2" to group "bin"...
    Done!
    Giving group "bin" access permissions to "/var/log"...
    Done!
    # tslm-hdm package
    detected AIX
    -n Telling init to re-examine /etc/inittab...
    done
    # tslm-elm package
    # tslm-3494 package
    the file[/opt/IBM/ermm/codelvel/3494.lvl] doesn't exist. tslm-3494 is not installed.
    # tslm-cli package
    # tslm-libbal package
    the file[/opt/IBM/ermm/codelvel/libbal.lvl] doesn't exist. tslm-libbal is not installed.
    # tslm-pwgen package
    Done
    
  4. Schließen Sie alle Konfigurationen für den sekundären TSLM-Server ab.
    1. Überprüfen Sie /home/ermm2/.profile und /home/db2inst3/.profile.
      # cat /home/ermm2/.profile
      
      
      PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:.
      
      export PATH
      
      if [ -s "$MAIL" ]           # This is at Shell startup.  In normal
      then echo "$MAILMSG"        # operation, the Shell checks
      fi                          # periodically.
      
      # TSLM binaries search path
      PATH=/opt/IBM/ermm2/bin:$PATH
      
      # TSLM db2 instance access
      if [ -f /home/db2inst3/sqllib/db2profile ]; then
         . /home/db2inst3/sqllib/db2profile
      fi
      
      # TSLM environments
      if [ -f /home/ermm2/tslmprofile ]; then
          while read line
          do
              export $line
          done < /home/ermm2/tslmprofile
      fi
      
      # cat /home/db2inst3/.profile
      # TSLM db2 instance access
      if [ -f /home/db2inst3/sqllib/db2profile ]; then
         . /home/db2inst3/sqllib/db2profile
      fi
      
      
      # TSLM environments
      if [ -f /home/db2inst3/tslmprofile ]; then
          while read line
          do
              export $line
          done < /home/db2inst3/tslmprofile
      fi
    2. Überprüfen Sie /home/ermm2/tslmprofile und /home/db2inst3/tslmprofile.
      # cat /home/ermm2/tslmprofile
      TSLM_BASEDIR=/opt/IBM/ermm2
      TSLM_USER=ermm2
      TSLM_GROUP=ermm2
      TSLM_NO=TSLM_1
      TSLM_USERDIR=/home/ermm2
      DB_ADM_DIR=/home/db2inst3
      SQLLIB_PATH=/home/db2inst3/sqllib/bin
      DB_ADM_NAME=db2inst3
      DB_ADM_GRP_NAME=db2grp3
      
      # cat /home/db2inst3/tslmprofile
      TSLM_BASEDIR=/opt/IBM/ermm2
      TSLM_USER=ermm2
      TSLM_GROUP=ermm2
      TSLM_NO=TSLM_1
      TSLM_USERDIR=/home/ermm2
      DB_ADM_DIR=/home/db2inst3
      SQLLIB_PATH=/home/db2inst3/sqllib/bin
      DB_ADM_NAME=db2inst3
      DB_ADM_GRP_NAME=db2grp3
      
    3. Ändern /opt/IBM/ermm2/conf/mm.xml.
      mm.xml:    <ServerPort type="integer">6741</ServerPort>
      mm.xml:    <TraceFile type="string">/opt/IBM/ermm2/log/ermmtrace</TraceFile>
      
    4. Ändern /opt/IBM/ermm2/conf/lm-lmXXXX.xml.
      lm-lm3592-3.xml:   <TraceFile>/opt/IBM/ermm2/log/lm-lm3592-3.log</TraceFile>
      lm-lm3592-3.xml:   <PidFile>/opt/IBM/ermm2/run/lm-lm3592-3.pid</PidFile>
      lm-lm3592-3.xml:   <Port>6741</Port>
      
    5. Ändern /opt/IBM/ermm2/conf/genhdm.cfg.
      genhdm.cfg:   port = 6741
      genhdm.cfg:   
      logfile = /opt/IBM/ermm2/log/ermmGenHDM.log
      
    6. Ändern /opt/IBM/ermm2/conf/dbuserexit.conf .
      dbuserexit.conf:TSLMAUDITERRPATH=/opt/IBM/ermm2/ermmdbarchive/;
      dbuserexit.conf:TSLMDBLOGARCHIVE=/opt/IBM/ermm2/ermmdbarchive/logarchive/;
      dbuserexit.conf:TSLMDBBACKUPDIR=/opt/IBM/ermm2/ermmdbarchive/dbbackup/;
      dbuserexit.conf:TSLMDBLOGMIRRORDIR=/opt/IBM/ermm2/ermmdbarchive/logmirror/;
      
    7. Ändern /opt/IBM/ermm2/client/tsm/elm.cfg.
      elm.cfg:LogPath = /opt/IBM/ermm2/log
      elm.cfg:port = 6741
    8. Vorbereiten von ermmcli.conf unter /opt/IBM/ermm2/conf für den Rootbenutzer. Die Datei ermmcli.conf wird von ermmCollectLogs.pl verwendet.
      # cp /opt/IBM/ermm2/conf/ermmcli.conf.smp /opt/IBM/ermm2/conf/ermmcli.conf
      ermmcli.conf:port=6741
      
    9. Vorbereiten ermmcli.conf under /home/ermm2.
      .ermmcli.conf:port=6741
      
  5. Installation und Konfiguration der TSLM-Datenbank in Db2

    Bei der Installation der sekundären oder tertiären Instanzen muss die TSLM-Datenbank in Db2erstellt werden. Installieren Sie die TSLM-Datenbank in Db2 mithilfe der Scripts preInstallDatabase und installDatabase , die mit TSLM bereitgestellt werden. Verwenden Sie die folgenden Anweisungen:

    1. Melden Sie sich mit der Benutzerberechtigung root an. Führen Sie dann das folgende Script aus:
      # /opt/IBM/ermm2/install/preInstallDatabase -C TSLM_1
      Reading /etc/tslm.cfg...
      IBM Tape System Library Manager
      Licensed Materials - Property of IBM
      (C) Copyright IBM Corp. 2004, 2017 All Rights Reserved
      
      Bereiten Sie das Protokollarchiv für die Db2 -Instanz unter /home/db2inst3/sqllib/admvor.
    2. Melden Sie sich mit ermm2 -Benutzerberechtigungen an.
      # su - ermm2
      $
      
    3. Installieren Sie die TSLM-Datenbank auf einer lokalen Db2 -Instanz.
      $ /opt/IBM/ermm2/install/installDatabase
      TSLM_USER=ermm2
      IBM Tape System Library Manager
      Licensed Materials - Property of IBM
      (C) Copyright IBM Corp. 2004, 2018 All Rights Reserved
      
      Starting database instance ...
      Creating database ermm. This may take a while ...
      Connect to database ermm ...
      Creating buffer pool for database ermm ...
      Restarting database instance ...
      Creating temporary tablespaces ...
      Setting schema for ermm2 ...
      Creating database content ...
      Updating database content ...
      Verifying the system init record ...
      Configuring database ermm ...
      Disconnect from database ermm ...
      Updating APP_CTL_HEAP_SZ parameter ...
      Updating NUM_IOCLEANERS parameter ...
      Updating NUM_IOSERVERS parameter ...
      Updating LOGPRIMARY parameter ...
      Updating LOGSECONDARY parameter ...
      Successfully created TSLM database.
      
    4. Erstellen Sie eine neue Library Manager-Konfigurationsdatei.
    5. Starten Sie Media Manager als Benutzer ermm2 .
      $ echo $USER
      ermm2
      $ ermmStart
      IBM Tape System Library Manager
      Licensed Materials - Property of IBM
      (C) Copyright IBM Corp. 2004, 2018 All Rights Reserved
      
      Spawning IBM Tape System Library Manager daemon
      Using log file: /opt/IBM/ermm2/log/ermmstart.log. Please check this file in case of problems.
      $ ermmtool
      IBM Tape System Library Manager
      Licensed Materials - Property of IBM
      (C) Copyright IBM Corp. 2004, 2013 All Rights Reserved
          host: localhost
          port: 6741
        client: ERMMSystem
      instance: ERMMAdmin
      
    6. Erstellen Sie das Speicherarchivobjekt und das Library Manager-Objekt.
      ermmtool> addlib 3592-3
      ermmtool> addlm lm3592-3 3592-3
      ermmtool> chlib -lm lm3592-3 3592-3
    7. Starten Sie den Library Manager.
      $ echo $USER
      ermm
      $ ermmLmStart
      /opt/IBM/ermm
      IBM Tape System Library Manager
      Licensed Materials - Property of IBM
      (C) Copyright IBM Corp. 2004, 2018 All Rights Reserved
      
      US Government Users Restricted Rights - Use, duplication or
      disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
      Added lm-lmLTOT.xml into proc list.
      Update proccess list: /opt/IBM/ermm/run/ermmLmProc.lst
      Checking core files in /opt/IBM/ermm/bin/../run/lm-lmLTOT...
      Checking log files in /opt/IBM/ermm/bin/../log...
      No core dump file to process.
      Starting background daemon.
      ermmLmStart daemon is started.
      
      $ echo $USER
      ermm2
      $ ermmLmStart
      /opt/IBM/ermm2
      IBM Tape System Library Manager
      Licensed Materials - Property of IBM
      (C) Copyright IBM Corp. 2004, 2018 All Rights Reserved
      
      US Government Users Restricted Rights - Use, duplication or
      disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
      Added lm-lm3592-3.xml into proc list.
      Update proccess list: /opt/IBM/ermm2/run/ermmLmProc.lst
      Checking core files in /opt/IBM/ermm2/bin/../run/lm-lm3592-3...
      Checking log files in /opt/IBM/ermm2/bin/../log...
      No core dump file to process.
      Starting background daemon.
      ermmLmStart daemon is started.
      
      
      Note: If no HDM process is started, run "manageTSLMClone.pl -c -T target" again.
      
      For example:
      
      # ps -ef | grep ermmGenHDM
          root  7471374        1   0   May 23      -  0:00 /usr/bin/perl /opt/IBM/ermm/bin/ermmGenHDM
          root  9175934        1   0 12:28:32      -  0:00 /usr/bin/perl /opt/IBM/ermm3/bin/ermmGenHDM
      
      No HDM instance under /opt/IBM/ermm2 is started.
      Check /etc/inittab.
      
      # cat /etc/inittab
      : @(#)49  1.28.5.6  src/bos/etc/inittab/inittab, cmdoper, bos720, 1435A_720 8/11/14 00:17:16
      ...
      fmc:2:respawn:/opt/IBM/db2/V10.5/bin/db2fmcd #DB2 Fault Monitor Coordinator
      ghdm:2345:respawn:/opt/IBM/ermm/bin/ermmGenHDM  # TSLM Host Drive Manager
      GHDM_ermm3:2345:respawn:/opt/IBM/ermm3/bin/ermmGenHDM  # TSLM Host Drive Manager
      ...
      There is no entry of GHEM_ermm2.
      
      Check /etc/tslm.cfg
      # cat /etc/tslm.cfg
      [TSLM_0]
      TSLM_BASEDIR=/opt/IBM/ermm
      TSLM_USER=ermm
      TSLM_GROUP=ermm
      TSLM_NO=TSLM_0
      TSLM_USERDIR=/home/ermm
      DB_ADM_DIR=/home/db2inst1
      SQLLIB_PATH=/home/db2inst1/sqllib/bin
      DB_ADM_NAME=db2inst1
      DB_ADM_GRP_NAME=db2grp1
      [TSLM_1]
      TSLM_BASEDIR=/opt/IBM/ermm2
      TSLM_USER=ermm2
      TSLM_GROUP=ermm2
      TSLM_NO=TSLM_1
      TSLM_USERDIR=/home/ermm2
      DB_ADM_DIR=/home/db2inst2
      SQLLIB_PATH=/home/db2inst2/sqllib/bin
      DB_ADM_NAME=db2inst2
      DB_ADM_GRP_NAME=db2grp2
      [TSLM_2]
      TSLM_BASEDIR=/opt/IBM/ermm3
      TSLM_USER=ermm3
      TSLM_GROUP=ermm3
      TSLM_NO=TSLM_2
      TSLM_USERDIR=/home/ermm3
      DB_ADM_DIR=/home/db2inst3
      SQLLIB_PATH=/home/db2inst3/sqllib/bin
      DB_ADM_NAME=db2inst3
      DB_ADM_GRP_NAME=db2grp3
      
      Execute manageTSLMClone.pl.
      # /opt/IBM/ermm/install/manageTSLMClone.pl -c -T TSLM_1
      # tslm-system package
      Reading /etc/tslm.cfg...
      IBM Tape System Library Manager
      Licensed Materials - Property of IBM
      (C) Copyright IBM Corp. 2004, 2018 All Rights Reserved
      Reading /etc/tslm.cfg...
      IBM Tape System Library Manager
      Licensed Materials - Property of IBM
      (C) Copyright IBM Corp. 2004, 2018 All Rights Reserved
      Creating /home/ermm2/tslmprofile...
      Creating /home/db2inst2/tslmprofile...
      # tslm-mm package
      # tslm-lm package
      Giving user "ermm2" access to SCS log directory "/var/log"...
      The group of /var/log is "bin". Adding user "ermm2" to group "bin"...
      Done!
      Giving group "bin" access permissions to "/var/log"...
      Done!
      # tslm-hdm package
      detected AIX
      -n Adding GHDM_ermm2 to /etc/inittab...
      done
      -n Telling init to re-examine /etc/inittab...
      done
      # tslm-elm package
      # tslm-3494 package
      the file[/opt/IBM/ermm/codelvel/3494.lvl] doesn't exist. tslm-3494 is not installed.
      # tslm-cli package
      # tslm-libbal package
      the file[/opt/IBM/ermm/codelvel/libbal.lvl] doesn't exist. tslm-libbal is not installed.
      # tslm-pwgen package
      Done
      
      # ps -ef | grep ermmGenHDM
          root  7471374        1   0   May 23      -  0:00 /usr/bin/perl /opt/IBM/ermm/bin/ermmGenHDM
          root  7603068  8717222   0 19:21:13  pts/0  0:00 grep ermmGenHDM
          root  9175934        1   0 12:28:32      -  0:00 /usr/bin/perl /opt/IBM/ermm3/bin/ermmGenHDM
          root  7210212        1   0 19:20:19      -  0:00 /usr/bin/perl /opt/IBM/ermm2/bin/ermmGenHDM
      
      # cat /etc/inittab
      ...
      fmc:2:respawn:/opt/IBM/db2/V10.5/bin/db2fmcd #DB2 Fault Monitor Coordinator
      ghdm:2345:respawn:/opt/IBM/ermm/bin/ermmGenHDM  # TSLM Host Drive Manager
      GHDM_ermm3:2345:respawn:/opt/IBM/ermm3/bin/ermmGenHDM  # TSLM Host Drive Manager
      GHDM_ermm2:2345:respawn:/opt/IBM/ermm2/bin/ermmGenHDM  # TSLM Host Drive Manager
      
      Entry of HDM for ermm2 was added.