1DRBDMETA(8) System Administration DRBDMETA(8)
2
3
4
6 drbdmeta - Manipulate the DRBD on-disk metadata
7
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
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
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
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 [--initialize-bitmap-mode={automatic|zeroout|pwrite|skip}]
56 [--al-stripes=val] [--al-stripe-size-kB=val] (metadata version v09)
57
58 Initialize the metadata. This is necessary before a DRBD resource
59 can be attached. If drbdmeta finds an older version of DRBD
60 metadata on the device, it asks if the format should be converted.
61
62 When drbdadm calls drbdmeta's create-md command for a device, it
63 sets the number-of-bitmap-slots argument to the number of peers in
64 the resource. To reserve additional bitmap slots (which allows to
65 add more peers in the future), call drbdmeta directly instead.
66
67 When a device is used before being connected to its peers the first
68 time, DRBD assumes that peers can only handle 4 KiB requests by
69 default. The --peer-max-bio-size option allows to set more
70 optimistic values; use this if the versions of DRBD that this
71 device will connect to are known. DRBD supports a maximum bio size
72 of 32 KiB since version 8.3.8, of 128 KiB since version 8.3.9, and
73 of 1 MiB since version 8.4.0.
74
75 By default, we explicitly initialize the bitmap area to all zero.
76 With --initialize-bitmap-mode you can chose to only try the fast
77 method (zeroout, try ioctl BLKZEROOUT only), only use explicit
78 pwrite calls, or skip this bitmap initialization phase completely.
79 If you intend to do an initial full sync anyways, you can use skip
80 to leave the bitmap initialization to the kernel. This can make a
81 noticable difference when initializing huge volumes. Default is
82 automatic, which is zeroout with an implicit fallback to pwrite.
83
84 If you want to use more than 6433 activity log extents, or live on
85 top of a spriped RAID, you may specify the number of stripes
86 (--al-stripes, default 1), and the stripe size
87 (--al-stripe-size-kB, default 32). To just use a larger linear
88 on-disk ring-buffer, leave the number of stripes at 1, and increase
89 the size only:
90
91 drbdmeta 0 v08 /dev/vg23/lv42 internal create-md --al-stripe-size
92 1M
93
94 To avoid a single "spindle" from becoming a bottleneck, increase
95 the number of stripes, to achieve an interleaved layout of the
96 on-disk activity-log transactions. What you give as "stripe-size"
97 should be what is a.k.a. "chunk size" or "granularity" or "strip
98 unit": the minimum skip to the next "spindle".
99
100 drbdmeta 0 v08 /dev/vg23/lv42 internal create-md --al-stripes 7
101 --al-stripe-size 64
102
103 get-gi [--node-id=id]
104
105 Show the data generation identifiers for a device on a particular
106 connection. DRBD version 9.0.0 and beyond support multiple peers;
107 use the node-id option to define which peer's data generation
108 identifiers to show.
109
110 show-gi [--node-id=id]
111
112 Similar to get-gi, but with explanatory information.
113
114 dump-md
115
116 Dump the metadata of a device in text form, including the bitmap
117 and activity log.
118
119 outdate
120 Mark the data on a lower-level device as outdated. See drbdsetup(8)
121 for details.
122
123 dstate
124 Show the current disk state of a lower-level device.
125
126 check-resize
127
128 Examine the device size of a lower-level device and its last known
129 device size (saved in /var/lib/drbd/drbd-minor-minor.lkbd by
130 drbdsetup check-resize). For internal metadata, if the size of the
131 lower-level device has changed and the metadata can be found at the
132 previous position, move the metadata to the new position at the end
133 of the block device.
134
135 apply-al
136
137 Apply the activity log of the specified device. This is necessary
138 before the device can be attached by the kernel again.
139
140 repair-md [--tentative]
141
142 Repair known problems in metadata. Only problems that can be
143 automatically fixed in a safe manner will be repaired. When
144 --tentative is set, the metadata will only be checked, it will not
145 be changed.
146
148 The drbdmeta utility can be used to fine tune metdata. Please note that
149 this can lead to destroyed metadata or even silent data corruption; use
150 with great care only.
151
152 set-gi gi [--node-id=id]
153
154 Set the generation identifiers. The gi argument is a generation
155 counter for the v06 and v07 formats, and a set of UUIDs for v08 and
156 beyond. Accepts the same syntax as in the get-gi output. DRBD
157 version 9.0.0 and beyond support multiple peers; use the --node-id
158 option to define which peer's data generation identifiers to set.
159
160 restore-md dump_file
161
162 Replace the metadata on the device with the contents of dump_file.
163 The dump file format is defined by the output of the dump-md
164 command.
165
167 This document was revised for version 9.0.0 of the DRBD distribution.
168
170 Written by Philipp Reisner <philipp.reisner@linbit.com> and Lars
171 Ellenberg <lars.ellenberg@linbit.com>.
172
174 Report bugs to <drbd-user@lists.linbit.com>.
175
177 Copyright 2001-2008,2012 LINBIT Information Technologies, Philipp
178 Reisner, Lars Ellenberg. This is free software; see the source for
179 copying conditions. There is NO warranty; not even for MERCHANTABILITY
180 or FITNESS FOR A PARTICULAR PURPOSE.
181
183 drbdadm(8) drbd.conf(5)
184
185
186
187DRBD 9.0.0 6 December 2012 DRBDMETA(8)