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 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<refentry id="re-drbdadm">
<refentryinfo>
<date>6 May 2011</date>
<productname>DRBD</productname>
<productnumber>8.4.0</productnumber>
</refentryinfo>
<refmeta>
<refentrytitle>drbdadm</refentrytitle>
<manvolnum>8</manvolnum>
<refmiscinfo class="manual">System Administration</refmiscinfo>
</refmeta>
<refnamediv>
<refname>drbdadm</refname>
<refpurpose>Administration tool for DRBD <indexterm significance="normal">
<primary>drbdadm</primary>
</indexterm></refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis sepchar=" ">
<command moreinfo="none">drbdadm</command>
<arg choice="opt" rep="norepeat">-d</arg>
<arg choice="opt" rep="norepeat">-c<arg choice="req"
rep="norepeat"><replaceable>file</replaceable></arg></arg>
<arg choice="opt" rep="norepeat">-t<arg choice="req"
rep="norepeat"><replaceable>file</replaceable></arg></arg>
<arg choice="opt" rep="norepeat">-s<arg choice="req"
rep="norepeat"><replaceable>cmd</replaceable></arg></arg>
<arg choice="opt" rep="norepeat">-m<arg choice="req"
rep="norepeat"><replaceable>cmd</replaceable></arg></arg>
<arg choice="opt" rep="norepeat">-S</arg>
<arg choice="opt" rep="norepeat">-h<arg choice="req"
rep="norepeat"><replaceable>host</replaceable></arg></arg>
<arg choice="opt" rep="norepeat">--<arg choice="req"
rep="norepeat"><replaceable>backend-options</replaceable></arg></arg>
<arg choice="req" rep="norepeat"><replaceable>command</replaceable></arg>
<group choice="opt" rep="norepeat">
<arg choice="req" rep="norepeat">all</arg>
<arg choice="req" rep="repeat"><replaceable>resource<arg choice="opt"
rep="norepeat">/volume></arg></replaceable></arg>
</group>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para><option>Drbdadm</option> is the high level tool of the DRBD program suite.
<option>Drbdadm</option> is to <option>drbdsetup</option> and <option>drbdmeta</option> what
<option>ifup</option>/<option>ifdown</option> is to <option>ifconfig</option>.
<option>Drbdadm</option> reads its configuration file and performs the specified commands by
calling the <option>drbdsetup</option> and/or the <option>drbdmeta</option> program.</para>
<para><option>Drbdadm</option> can operate on whole resources or on individual volumes in a
resource. The sub commands: <option>attach</option>, <option>detach</option>,
<option>primary</option>, <option>secondary</option>, <option>invalidate</option>,
<option>invalidate-remote</option>, <option>outdate</option>, <option>resize</option>,
<option>verify</option>, <option>pause-sync</option>, <option>resume-sync</option>,
<option>role</option>, <option>csytate</option>, <option>dstate</option>,
<option>create-md</option>, <option>show-gi</option>, <option>get-gi</option>,
<option>dump-md</option>, <option>wipe-md</option> work on whole resources and on
individual volumes. </para>
<para>Resource level only commands are: <option>connect</option>, <option>disconnect</option>,
<option>up</option>, <option>down</option>, <option>wait-connect</option> and
<option>dump</option>.</para>
</refsect1>
<refsect1>
<title>Options</title>
<variablelist>
<varlistentry>
<term><option>-d</option>, <option>--dry-run</option></term>
<listitem>
<para>Just prints the calls of <option>drbdsetup</option> to stdout, but does not run
the commands.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-c</option>, <option>--config-file</option>
<replaceable>file</replaceable></term>
<listitem>
<para>Specifies the configuration file drbdadm will use. If this parameter is not
specified, drbdadm will look for <option>/etc/drbd-84.conf</option>,
<option>/etc/drbd-83.conf</option>, <option>/etc/drbd-08.conf</option> and
<option>/etc/drbd.conf</option>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-t</option>, <option>--config-to-test</option>
<replaceable>file</replaceable></term>
<listitem>
<para>Specifies an additional configuration file drbdadm to check. This option is only
allowed with the dump and the sh-nop commands.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-s</option>, <option>--drbdsetup</option>
<replaceable>file</replaceable></term>
<listitem>
<para>Specifies the full path to the <option>drbdsetup</option> program. If this option
is omitted, drbdadm will look for it beneath itself first, and then in the PATH.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-m</option>, <option>--drbdmeta</option>
<replaceable>file</replaceable></term>
<listitem>
<para>Specifies the full path to the <option>drbdmeta</option> program. If this option
is omitted, drbdadm will look for it beneath itself first, and then in the PATH.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-S</option>, <option>--stacked</option></term>
<listitem>
<para>Specifies that this command should be performed on a stacked resource.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-P</option>, <option>--peer</option></term>
<listitem>
<para>Specifies to which peer node to connect. Only necessary if there are more than two
host sections in the resource you are working on.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--</option> <replaceable>backend-options</replaceable></term>
<listitem>
<para>All options following the doubly hyphen are considered
<replaceable>backend-options</replaceable>. These are passed through to the backend
command. I.e. to <option>drbdsetup</option>, <option>drbdmeta</option> or
<option>drbd-proxy-ctl</option>.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>Commands</title>
<variablelist>
<varlistentry>
<term>attach</term>
<listitem>
<para>Attaches a local backing block device to the DRBD resource's device.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>detach</term>
<listitem>
<para><indexterm significance="normal">
<primary>drbdadm</primary>
<secondary>detach</secondary>
</indexterm> Removes the backing storage device from a DRBD resource's device.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>connect</term>
<listitem>
<para><indexterm significance="normal">
<primary>drbdadm</primary>
<secondary>connect</secondary>
</indexterm> Sets up the network configuration of the resource's device. If the peer
device is already configured, the two DRBD devices will connect. If there are more than
two host sections in the resource you need to use the <option>--peer</option> option to
select the peer you want to connect to.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>disconnect</term>
<listitem>
<para><indexterm significance="normal">
<primary>drbdadm</primary>
<secondary>disconnect</secondary>
</indexterm> Removes the network configuration from the resource. The device will then
go into StandAlone state.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>syncer</term>
<listitem>
<para><indexterm significance="normal">
<primary>drbdadm</primary>
<secondary>syncer</secondary>
</indexterm> Loads the resynchronization parameters into the device.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>up</term>
<listitem>
<para><indexterm significance="normal">
<primary>drbdadm</primary>
<secondary>up</secondary>
</indexterm> Is a shortcut for attach and connect.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>down</term>
<listitem>
<para><indexterm significance="normal">
<primary>drbdadm</primary>
<secondary>down</secondary>
</indexterm> Is a shortcut for disconnect and detach.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>primary</term>
<listitem>
<para><indexterm significance="normal">
<primary>drbdadm</primary>
<secondary>primary</secondary>
</indexterm> Promote the resource's device into primary role. You need to do this
before any access to the device, such as creating or mounting a file system.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>secondary</term>
<listitem>
<para><indexterm significance="normal">
<primary>drbdadm</primary>
<secondary>secondary</secondary>
</indexterm> Brings the device back into secondary role. This is needed since in a
connected DRBD device pair, only one of the two peers may have primary role (except if
<option>allow-two-primaries</option> is explicitly set in the configuration
file).</para>
</listitem>
</varlistentry>
<varlistentry>
<term>invalidate</term>
<listitem>
<para><indexterm significance="normal">
<primary>drbdadm</primary>
<secondary>invalidate</secondary>
</indexterm> Forces DRBD to consider the data on the <emphasis>local</emphasis> backing
storage device as out-of-sync. Therefore DRBD will copy each
and every block from its peer, to bring the local storage
device back in sync.
To avoid races, you need an established replication link,
or be disconnected Secondary.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>invalidate-remote</term>
<listitem>
<para><indexterm significance="normal">
<primary>drbdadm</primary>
<secondary>invalidate-remote</secondary>
</indexterm> This command is similar to the invalidate command, however, the
<emphasis>peer's</emphasis> backing storage is invalidated and hence rewritten
with the data of the local node.
To avoid races, you need an established replication link,
or be disconnected Primary.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>resize</term>
<listitem>
<para><indexterm significance="normal">
<primary>drbdadm</primary>
<secondary>resize</secondary>
</indexterm> Causes DRBD to re-examine all sizing constraints, and resize the
resource's device accordingly. For example, if you increased the size of your backing
storage devices (on both nodes, of course), then DRBD will adopt the new size after you
called this command on one of your nodes. Since new storage space must be synchronised
this command only works if there is at least one primary node present.</para>
<para>Note that all of the following options are <option>backend-options</option> (i.e., separated via "--").</para>
<para>The <option>--size</option> option can be used to online shrink the usable
size of a drbd device. It's the users responsibility to make sure that a file system
on the device is not truncated by that operation.
Example:
<programlisting format="linespecific">
# drbdadm -- --size=10G resize r0</programlisting></para>
<para>The <option>--assume-peer-has-space</option> allows you to resize a device which
is currently not connected to the peer. Use with care, since if you do not resize the
peer's disk as well, further connect attempts of the two will fail.</para>
<para>The <option>--assume-clean</option> allows you to resize an existing device and avoid
syncing the new space. This is useful when adding addtional blank storage to your device.
Example:
<programlisting format="linespecific">
# drbdadm -- --assume-clean resize r0</programlisting>
</para>
<para>The options <option>--al-stripes</option> and <option>--al-stripe-size-kB</option> may
be used to change the layout of the activity log online. In case of internal meta data
this may invovle shrinking the user visible size at the same time (unsing the
<option>--size</option>) or increasing the avalable space on the backing devices.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>check-resize</term>
<listitem>
<para><indexterm significance="normal">
<primary>drbdadm</primary>
<secondary>check-resize</secondary>
</indexterm> Calls drbdmeta to eventually move internal meta data. If the backing
device was resized, while DRBD was not running, meta data has to be moved to the end of
the device, so that the next <option>attach</option> command can succeed.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>create-md</term>
<listitem>
<para><indexterm significance="normal">
<primary>drbdadm</primary>
<secondary>create-md</secondary>
</indexterm> Initializes the meta data storage. This needs to be done before a DRBD
resource can be taken online for the first time. In case of issues with that command
have a look at <citerefentry>
<refentrytitle>drbdmeta</refentrytitle>
<manvolnum>8</manvolnum>
</citerefentry></para>
</listitem>
</varlistentry>
<varlistentry>
<term>get-gi</term>
<listitem>
<para><indexterm significance="normal">
<primary>drbdadm</primary>
<secondary>get-gi</secondary>
</indexterm> Shows a short textual representation of the data generation
identifiers.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>show-gi</term>
<listitem>
<para><indexterm significance="normal">
<primary>drbdadm</primary>
<secondary>show-gi</secondary>
</indexterm> Prints a textual representation of the data generation identifiers
including explanatory information.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>dump-md</term>
<listitem>
<para><indexterm significance="normal">
<primary>drbdadm</primary>
<secondary>dump-md</secondary>
</indexterm> Dumps the whole contents of the meta data storage, including the stored
bit-map and activity-log, in a textual representation.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>outdate</term>
<listitem>
<para><indexterm significance="normal">
<primary>drbdadm</primary>
<secondary>outdate</secondary>
</indexterm> Sets the outdated flag in the meta data.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>adjust</term>
<listitem>
<para><indexterm significance="normal">
<primary>drbdadm</primary>
<secondary>adjust</secondary>
</indexterm> Synchronizes the configuration of the device with your configuration
file. You should always examine the output of the dry-run mode before actually executing
this command.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>wait-connect</term>
<listitem>
<para><indexterm significance="normal">
<primary>drbdadm</primary>
<secondary>wait-connect</secondary>
</indexterm> Waits until the device is connected to its peer device.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>role</term>
<listitem>
<para><indexterm significance="normal">
<primary>drbdadm</primary>
<secondary>role</secondary>
</indexterm> Shows the current roles of the devices (local/peer). E.g.
Primary/Secondary</para>
</listitem>
</varlistentry>
<varlistentry>
<term>state</term>
<listitem>
<para><indexterm significance="normal">
<primary>drbdadm</primary>
<secondary>state</secondary>
</indexterm> Deprecated alias for "role", see above.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>cstate</term>
<listitem>
<para><indexterm significance="normal">
<primary>drbdadm</primary>
<secondary>cstate</secondary>
</indexterm> Shows the current connection state of the devices.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>dump</term>
<listitem>
<para><indexterm significance="normal">
<primary>drbdadm</primary>
<secondary>dump</secondary>
</indexterm> Just parse the configuration file and dump it to stdout. May be used to
check the configuration file for syntactic correctness.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>outdate</term>
<listitem>
<para><indexterm significance="normal">
<primary>drbdadm</primary>
<secondary>outdate</secondary>
</indexterm> Used to mark the node's data as outdated. Usually used by the peer's
fence-peer handler.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>verify</term>
<listitem>
<para><indexterm significance="normal">
<primary>drbdadm</primary>
<secondary>verify</secondary>
</indexterm> Starts online verify. During online verify, data on both nodes is
compared for equality. See <filename moreinfo="none">/proc/drbd</filename> for online
verify progress. If out-of-sync blocks are found, they are <emphasis>not</emphasis>
resynchronized automatically. To do that, <command moreinfo="none">disconnect</command>
and <command moreinfo="none">connect</command> the resource when verification has
completed.</para>
<para>See also the notes on data integrity on the drbd.conf manpage.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>pause-sync</term>
<listitem>
<para><indexterm significance="normal">
<primary>drbdadm</primary>
<secondary>pause-sync</secondary>
</indexterm> Temporarily suspend an ongoing resynchronization by setting the local
pause flag. Resync only progresses if neither the local nor the remote pause flag is
set. It might be desirable to postpone DRBD's resynchronization until after any
resynchronization of the backing storage's RAID setup.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>resume-sync</term>
<listitem>
<para><indexterm significance="normal">
<primary>drbdadm</primary>
<secondary>resume-sync</secondary>
</indexterm> Unset the local sync pause flag.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>new-current-uuid</term>
<listitem>
<para><indexterm significance="normal">
<primary>drbdadm</primary>
<secondary>new-current-uuid</secondary>
</indexterm> Generates a new currend UUID and rotates all other UUID values.</para>
<para>This can be used to shorten the initial resync of a cluster. See the
<option>drbdsetup</option> manpage for a more details.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>dstate</term>
<listitem>
<para><indexterm significance="normal">
<primary>drbdadm</primary>
<secondary>dstate</secondary>
</indexterm> Show the current state of the backing storage devices.
(local/peer)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>hidden-commands</term>
<listitem>
<para>Shows all commands undocumented on purpose.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>Version</title>
<simpara>This document was revised for version 8.4.0 of the DRBD distribution.</simpara>
</refsect1>
<refsect1>
<title>Author</title>
<simpara>Written by Philipp Reisner <email>philipp.reisner@linbit.com</email> and Lars
Ellenberg <email>lars.ellenberg@linbit.com</email></simpara>
</refsect1>
<refsect1>
<title>Reporting Bugs</title>
<simpara>Report bugs to <email>drbd-user@lists.linbit.com</email>.</simpara>
</refsect1>
<refsect1>
<title>Copyright</title>
<simpara>Copyright 2001-2011 LINBIT Information Technologies, Philipp Reisner, Lars Ellenberg.
This is free software; see the source for copying conditions. There is NO warranty; not even
for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</simpara>
</refsect1>
<refsect1>
<title>See Also</title>
<para><citerefentry>
<refentrytitle>drbd.conf</refentrytitle>
<manvolnum>5</manvolnum>
</citerefentry>, <citerefentry>
<refentrytitle>drbd</refentrytitle>
<manvolnum>8</manvolnum>
</citerefentry>, <citerefentry>
<refentrytitle>drbddisk</refentrytitle>
<manvolnum>8</manvolnum>
</citerefentry>, <citerefentry>
<refentrytitle>drbdsetup</refentrytitle>
<manvolnum>8</manvolnum>
</citerefentry>, <citerefentry>
<refentrytitle>drbdmeta</refentrytitle>
<manvolnum>8</manvolnum>
</citerefentry> and the
<ulink url="http://www.drbd.org/"><citetitle>DRBD project web site</citetitle></ulink></para>
</refsect1>
</refentry>
|