File: drbdlinks.8

package info (click to toggle)
drbdlinks 1.22-1
  • links: PTS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, sid, stretch
  • size: 156 kB
  • ctags: 77
  • sloc: python: 423; sh: 130; makefile: 54
file content (152 lines) | stat: -rw-r--r-- 5,605 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
.\"                                      Hey, EMACS: -*- nroff -*-
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH DRBDLINKS 8 "September  3, 2008"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
.\" .nh        disable hyphenation
.\" .hy        enable hyphenation
.\" .ad l      left justify
.\" .ad b      justify to both left and right margins
.\" .nf        disable filling
.\" .fi        enable filling
.\" .br        insert line break
.\" .sp <n>    insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.SH NAME
drbdlinks \- manages links into a shared DRBD partition
.SH SYNOPSIS
.B drbdlinks
[\fIOPTION\fR]... [start|stop|auto|status|monitor|checklinks]
.SH DESCRIPTION

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

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

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

.B drbdlinks
also supports multiple instances of links, in the case of
active/active clusters.  For example, if you have MySQL running in one
resource 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 other
system directories that need to appear as if they are local to the system
when running applications after a drbd shared partition has been mounted.

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

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

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

The "monitor" and "status" modes will check the file-system against the
configuration file and will report "running" (monitor mode) or "OK" (status
mode) 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 be
overridden in the configuration file.

The "list" mode just show the list of links, with each line showing the
link, destination, and a 0/1 flag for bindMount status.  This may be useful
for 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 when
the shared partition isn't mounted, the links are in their normal
state.

.SH OPTIONS
.PP
.B drbdlinks
has several options, using either short or long variants.
.PP
.IP "\fB-h, --help\fP"
Print a short help message describing the available options and exit.

.IP "\fB-c, --config-file=CONFIGFILE\fP"
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".

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

.IP "\fB-v, --verbose\fP"
Increase verbosity level by 1 for every occurrence of this option.

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

The most straight-forward, and default, method for starting drbdlinks:
.PP
.RS
drbdlinks start
.RE

To use a suffix different from the default when linking to a file or
directory, the -s option can be used, specifying the desired string:
.PP
.RS
drbdlinks -s orig start
.RE

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

Increase the verbosity to assist in debugging:
.PP
.RS
drbdlinks -v -v start
.RE

Use an alternate configuration file, possibly from with a DRBD mounted
file-system:
.PP
.RS
drbdlinks -c /shared1/drbdlinks-httpd.conf start
.RE

This would use the specified configuration file, found on our DRBD device
mounted on /shared1.  This would allow us to easily keep drbdlinks
configurations tied to a specific set of data on a DRBD disk in an
active/active sort of HA configuration.


.SH SEE ALSO
.BR DRBD (8),
.BR drbdadm (8),
.BR drbdsetup (8),
.BR heartbeat (8).
.SH AUTHOR
drbdlinks was written by Sean Reifschneider <jafo@tummy.com>.
.PP
This manual page was written by Cyril Bouthors <cyril@bouthors.org>,
for the Debian project (but may be used by others).  Sean Reifschneider
modified it for status and monitor arguments, and included it in the base
drbdlinks release.  Mike Loseke <mike@tummy.com> added the sections on
options and examples.