Description
Veritas has created the attached script to help automate the integration with SystemD managed services that require VxVM volume availability.
Current version: 2.1
NOTE:
Please download and run the self-extracting file "vrts-selfextract.sh" from Article100034008 https://www.veritas.com/support/en_US/article.100034008
Note: Implementing the VxVM and SystemD integration changes using "vrts-systemd.sh -ex" is a prerequisite.
This contains all the necessary files.
Either the "-e" (enable) or "-d" (disable) option must be specified; otherwise, the script will exit with the usage output.
Usage ./vrts-systemd.sh
Please select one of the following:
-e - enable a service integration
-d - disable a service integration
use one of the following to enable/disable the Veritas stack integration:
./vrts-systemd.sh -h
-s - use this to set-up sapinit integration with VxVM
-c <service> - use this to set-up your own service along with -m to be dependant on the /dev/vx/dsk mounts
-m - use this with -c for the custom services. you pass in the necessary dependant mounts, use comma [,] as the separator
-x - copies the latest changes from the vrts-sytemd directory, enables NetBackup.service & remote-fs.target
-h display usage
Example: showing httpd daemon is now dependent on the VERITAS VxVM service after using the -c 'custom' option to vrts-systemd.sh
Enable:
# ./vrts-systemd.sh -ec httpd
Veritas: enabled the httpd.service dependencies, please wait...
Please specify one or mount points belonging to /dev/vx/dsk devices within you /etc/fstab that your: httpd.service
is dependant on to be mounted and set this using the -m with comma [,] as the separator.
These are the current /dev/vx/dsk devices within the /etc/fstab
Device Mount
/dev/vx/dsk/nfs-dg/nfsmount /nfs/
/dev/vx/dsk/httpdg/httpd /etc/httpd
# ./vrts-systemd.sh -ec httpd -m /etc/httpd
Veritas: enabled the httpd.service dependencies, please wait...
# systemctl -l status httpd.service
# systemctl status httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/httpd.service.d
└─order-after-vxvm.conf
Active: active (running) since Tue 2020-02-18 15:32:26 GMT; 4s ago
Docs: man:httpd(8)
man:apachectl(8)
Main PID: 4836 (httpd)
Status: "Processing requests..."
CGroup: /system.slice/httpd.service
├─4836 /usr/sbin/httpd -DFOREGROUND
├─4839 /usr/sbin/httpd -DFOREGROUND
├─4840 /usr/sbin/httpd -DFOREGROUND
├─4841 /usr/sbin/httpd -DFOREGROUND
├─4842 /usr/sbin/httpd -DFOREGROUND
└─4843 /usr/sbin/httpd -DFOREGROUND
# systemd-analyze critical-chain httpd.service
httpd.service +1.098s
└─etc-httpd.mount @57.289s +2.204s
└─systemd-fsck@dev-vx-dsk-testdg-httpd.service @56.626s +646ms
└─remote-fs-pre.target @56.568s
└─vxvm-recover.service @51.640s +4.922s
└─vxvm-boot.service @10.285s +41.346s
└─blk-availability.service @10.238s +32ms
└─iscsi.service @9.748s +473ms
└─iscsid.service @10.024s +69ms
└─network.target @9.737s
If you wish to disable the custom service that is now dependent on the VERITAS VxVM service, you will need to run "vrts-systemd.sh -d -c <custom.service>"
Disable:
Example on how to disable the previously enabled httpd service that was dependant on the VxVM service.
# ./vrts-systemd.sh -dc httpd