====== TSM linux client using systemctl ======
https://www-01.ibm.com/support/docview.wss?uid=swg21976275
Systemctl failed to start with dsmcad
Resolution is to implement a new script to start dsmcad and to be persistent after reboot. Follow these instructions:
Execute the following commands to stop the running dsmcad service (if any) and to clear the old style dsmcad service configuration. Execute as root:
# service dsmcad stop
# chkconfig --del dsmcad
# rm /etc/init.d/dsmcad
Into the latest (7.7) version of TSM client the service is still available, just activate it:
# ln -s /opt/tivoli/tsm/client/ba/bin/dsmcad.service /usr/lib/systemd/system
# systemctl enable dsmcad.service
# systemctl start dsmcad.service
# systemctl status dsmcad.service
To list the service:
# systemctl list-unit-files | grep dsm
dsmcad.service linked
//Notes://
1)There was a secondary failure where dsmcad could not open the dsmerror.log. As such the following "Environment" is added under the {Service] section of the Unit file:
Environment="DSM_LOG=/opt/tivoli/tsm/client/ba/bin"
2) (optional if DP for VMware is in use) Per the "Data Protection for VMware Installation Guide" manual ("Appendix A. Advanced configuration tasks"), it is our documented requirement/behavior:
"...To configure the Client Acceptor Service and Backup-Archive Scheduler Service to act as a vStorage Backup Server, set the following environment variable in the /etc/init.d/dsmcad file".
With SUSE 12 SP1 it was found that this needed to be added to the environment in the Unit file "Service" section.
LD_LIBRARY_PATH=/opt/tivoli/tsm/client/ba/bin
3) These two environment settings need to be on a single line else this has been seen to fail.
**Example for a scheduler**
[root@datamover]/etc/systemd/system # cat /etc/systemd/system/dsmsched_datamover.service
[Unit]
Description="Spectrum Protect Scheduler VM (dsmc sched)"
After=local-fs.target network-online.target
[Service]
Type=simple
GuessMainPID=no
Environment="DSM_LOG=/opt/tivoli/tsm/client/ba/bin"
Environment="JAVA_HOME=/opt/tivoli/tsm/tdpvmware/common/jre/jre"
Environment="LD_LIBRARY_PATH=/opt/tivoli/tsm/client/ba/bin:/opt/tivoli/tsm/tdpvmware/common/jre/jre/bin/classic"
Environment="PATH=/opt/tivoli/tsm/tdpvmware/common/jre/jre/bin:/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin"
Environment="LANG=en_US"
Environment="LC_ALL=en_US"
ExecStart=/opt/tivoli/tsm/client/ba/bin/dsmc sched -optfile=/opt/tivoli/tsm/client/ba/bin/dsm_datamover.opt
Restart=on-failure
[Install]
WantedBy=multi-user.target