MAN page from RedHat EL 8 drbdlinks-1.29-1.el8.noarch.rpm


Section: Maintenance Commands (8)
Updated: September 3, 2008


drbdlinks - manages links into a shared DRBD partition 


drbdlinks[OPTION]... [start|stop|auto|status|monitor|checklinks] 


drbdlinksis a program that will manage creation and removal of symbolic links.It is primarily used with clusters of machines using either sharedstorage or the "DRBD" replicated block device.

While the name of the program is "drbdlinks", it can be used in anyshared-storage sort of environment where the shared storage is onlymounted on the active node. In cases like NFS where the shared storageis always mounted on all nodes, drbdlinks is not necessary.

The advantage over creating static symbolic links is that package updatesoften require that directories point at real files, so updates can oftenfail if you do not have the shared storage mounted.

drbdlinksalso supports multiple instances of links, in the case ofactive/active clusters. For example, if you have MySQL running in oneresource group, and Apache running in another, you can use the "-c"switch to specify a configuration file for each resource group.

A simple configuration file, "/etc/drbdlinks.conf", specifies the links.This can be used to manage links for /etc/httpd, /var/lib/pgsql, and othersystem directories that need to appear as if they are local to the systemwhen running applications after a drbd shared partition has been mounted.

Optionally, configuration directives can also be written to files in"/etc/drbdlinks.d" with the suffix ".conf", which are loaded after the"/etc/drbdlinks.conf" file, in sorted order.

When run with "start" as the mode, drbdlinks will rename the existingfiles/directories, and then make symbolic links into the DRBDpartition. "stop" does the reverse.

Mode "checklinks" will report any links that do not exist in thedestination area. During initial setup and configuration, this can helpcheck that you have the destination file-system set up with the requiredcomponents.

If run with "initialize_shared_storage", destination links specified in theconfiguration file will be populated from the source storage. This isuseful for initial setup to populate the shared storage. Preceding pathswill be populated if they share the same name from source to destination.

The "monitor" and "status" modes will check the file-system against theconfiguration file and will report "running" (monitor mode) or "OK" (statusmode) if all links appear to be up. Otherwise they report "down" or"stopped" (respectively).

By default, the rename appends .drbdlinks to the name, but this can beoverridden in the configuration file.

The "list" mode just show the list of links, with each line showing thelink, destination, and a 0/1 flag for bindMount status. This may be usefulfor user scripts without having to parse the configuration.

An init script is included which runs "stop" before heartbeat starts,and after heartbeat stops. This is done to try to ensure that whenthe shared partition isn't mounted, the links are in their normalstate.



drbdlinkshas several options, using either short or long variants.

-h, --help
Print a short help message describing the available options and exit.

-c, --config-file=CONFIGFILE
Specify an alternate config file. The default config file is/etc/drbdlinks.conf. Alternate config files should have a "drbdlinks-"prefix, e.g. "drbdlinks-httpd.conf".

-s, --suffix=SUFFIX
Name to append to the local file-system name when the link is in place. Thedefault is "drbdlinks", which would result in a renamed file like"/etc/httpd.drbdlinks".

-v, --verbose
Increase verbosity level by 1 for every occurrence of this option.



Here are a few examples of how drbdlinks can be used.

The most straight-forward, and default, method for starting drbdlinks:

drbdlinks start

To use a suffix different from the default when linking to a file ordirectory, the -s option can be used, specifying the desired string:

drbdlinks -s orig start

would rename the file-system name to "name.orig".

Increase the verbosity to assist in debugging:

drbdlinks -v -v start

Use an alternate configuration file, possibly from with a DRBD mountedfile-system:

drbdlinks -c /shared1/drbdlinks-httpd.conf start

This would use the specified configuration file, found on our DRBD devicemounted on /shared1. This would allow us to easily keep drbdlinksconfigurations tied to a specific set of data on a DRBD disk in anactive/active sort of HA configuration.





drbdlinks was written by Sean Reifschneider <>.

This manual page was written by Cyril Bouthors <>,for the Debian project (but may be used by others). Sean Reifschneidermodified it for status and monitor arguments, and included it in the basedrbdlinks release. Mike Loseke <> added the sections onoptions and examples.




This document was created byman2html,using the manual pages.