1DRBDMETA(8)                  System Administration                 DRBDMETA(8)
2
3
4

NAME

6       drbdmeta - Manipulate the DRBD on-disk metadata
7

SYNOPSIS

9       drbdmeta [--force] [--ignore-sanity-checks] {device} {v06 minor |
10                v07 meta_dev index | v08 meta_dev index | v09 meta_dev index}
11                {command} [cmd args...]
12

DESCRIPTION

14       The drbdmeta utility is used for creating, displaying, and modifying
15       DRBD's on-disk metadata. Users usually interact with the drbdadm
16       utility, which provides a more high-level interface to DRBD than
17       drbdmeta. (See drbdadm's --dry-run option to see how drbdadm uses
18       drbdmeta.)
19
20       This utility can only be used on devices which are not currently in use
21       by the kernel.
22
23       The first argument (device) specifies the drbd device associated with a
24       volume, or “-” if no device is associated with that volume. If the drbd
25       device is specified, the drbdmeta utility makes sure that the drbd
26       device does not currently have a volume attached to prevent meta-data
27       of an active volume from being destroyed.
28
29       The second argument specifies the metadata version to use (v06, v07,
30       v08, v09). In most metadata versions, the third argument (meta_dev)
31       specifies the device which contains the metadata; this argument can be
32       the same as device. The fourth argument (index) can be one of the
33       keywords internal (for internal metadata), flex-internal (in v07 for
34       variable-sized metadata; v07 otherwise defaults to fixed-size internal
35       metadata), flex-external (for variable-sized external metadata), or a
36       numeric matadata index (for fixed-size external metadata). See the
37       meta-disk parameter in drbd.conf(5).
38

OPTIONS

40       --force
41
42           Assume yes as the answer to all questions drbdmeta would ask.
43
44       --ignore-sanity-checks
45
46           Normally, drbdmeta performs some sanity checks before writing to
47           the metadata device: for example, if the device appears to contain
48           a file system, it refuses to destroy the file system by writing
49           into it. Use this option to ignore these checks.
50

COMMANDS

52       create-md [--peer-max-bio-size=val] (metadata versions v06, v07, and
53       v08),
54       create-md {number-of-bitmap-slots} [--peer-max-bio-size=val]
55       [--al-stripes=val] [--al-stripe-size-kB=val] (metadata version v09)
56
57           Initialize the metadata. This is necessary before a DRBD resource
58           can be attached. If drbdmeta finds an older version of DRBD
59           metadata on the device, it asks if the format should be converted.
60
61           When drbdadm calls drbdmeta's create-md command for a device, it
62           sets the number-of-bitmap-slots argument to the number of peers in
63           the resource. To reserve additional bitmap slots (which allows to
64           add more peers in the future), call drbdmeta directly instead.
65
66           When a device is used before being connected to its peers the first
67           time, DRBD assumes that peers can only handle 4 KiB requests by
68           default. The --peer-max-bio-size option allows to set more
69           optimistic values; use this if the versions of DRBD that this
70           device will connect to are known. DRBD supports a maximum bio size
71           of 32 KiB since version 8.3.8, of 128 KiB since version 8.3.9, and
72           of 1 MiB since version 8.4.0.
73
74           If you want to use more than 6433 activity log extents, or live on
75           top of a spriped RAID, you may specify the number of stripes
76           (--al-stripes, default 1), and the stripe size
77           (--al-stripe-size-kB, default 32). To just use a larger linear
78           on-disk ring-buffer, leave the number of stripes at 1, and increase
79           the size only:
80
81           drbdmeta 0 v08 /dev/vg23/lv42 internal create-md --al-stripe-size
82           1M
83
84           To avoid a single "spindle" from becoming a bottleneck, increase
85           the number of stripes, to achieve an interleaved layout of the
86           on-disk activity-log transactions. What you give as "stripe-size"
87           should be what is a.k.a. "chunk size" or "granularity" or "strip
88           unit": the minimum skip to the next "spindle".
89
90           drbdmeta 0 v08 /dev/vg23/lv42 internal create-md --al-stripes 7
91           --al-stripe-size 64
92
93       get-gi [--node-id=id]
94
95           Show the data generation identifiers for a device on a particular
96           connection. DRBD version 9.0.0 and beyond support multiple peers;
97           use the node-id option to define which peer's data generation
98           identifiers to show.
99
100       show-gi [--node-id=id]
101
102           Similar to get-gi, but with explanatory information.
103
104       dump-md
105
106           Dump the metadata of a device in text form, including the bitmap
107           and activity log.
108
109       outdate
110           Mark the data on a lower-level device as outdated. See drbdsetup(8)
111           for details.
112
113       dstate
114           Show the current disk state of a lower-level device.
115
116       check-resize
117
118           Examine the device size of a lower-level device and its last known
119           device size (saved in /var/lib/drbd/drbd-minor-minor.lkbd by
120           drbdsetup check-resize). For internal metadata, if the size of the
121           lower-level device has changed and the metadata can be found at the
122           previous position, move the metadata to the new position at the end
123           of the block device.
124
125       apply-al
126
127           Apply the activity log of the specified device. This is necessary
128           before the device can be attached by the kernel again.
129

EXPERT COMMANDS

131       The drbdmeta utility can be used to fine tune metdata. Please note that
132       this can lead to destroyed metadata or even silent data corruption; use
133       with great care only.
134
135       set-gi gi [--node-id=id]
136
137           Set the generation identifiers. The gi argument is a generation
138           counter for the v06 and v07 formats, and a set of UUIDs for v08 and
139           beyond. Accepts the same syntax as in the get-gi output. DRBD
140           version 9.0.0 and beyond support multiple peers; use the --node-id
141           option to define which peer's data generation identifiers to set.
142
143       restore-md dump_file
144
145           Replace the metadata on the device with the contents of dump_file.
146           The dump file format is defined by the output of the dump-md
147           command.
148

VERSION

150       This document was revised for version 9.0.0 of the DRBD distribution.
151

AUTHOR

153       Written by Philipp Reisner <philipp.reisner@linbit.com> and Lars
154       Ellenberg <lars.ellenberg@linbit.com>.
155

REPORTING BUGS

157       Report bugs to <drbd-user@lists.linbit.com>.
158
160       Copyright 2001-2008,2012 LINBIT Information Technologies, Philipp
161       Reisner, Lars Ellenberg. This is free software; see the source for
162       copying conditions. There is NO warranty; not even for MERCHANTABILITY
163       or FITNESS FOR A PARTICULAR PURPOSE.
164

SEE ALSO

166       drbdadm(8) drbd.conf(5)
167
168
169
170DRBD 9.0.0                      6 December 2012                    DRBDMETA(8)
Impressum