DRBDMETA(8)

πŸ“¦
version 9.34.0 Β· 2 versions
  • 9.34.0 Β· alpine 3.22, alpine 3.23, alpine 3.24, debian bookworm, debian trixie, epel 9, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 9.15.0 Β· ubuntu jammy
, in alpine 3.22, alpine 3.23, alpine 3.24, debian bookworm, debian trixie, epel 9, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ drbdmeta β€” the girlboss of DRBD meta data πŸ’…

okay so bestie, welcome to drbdmeta, the manual page from DRBDMETA(8) in section 8 (System Administration), and she is the meta data management tool for DRBD. lowkey iconic, highkey powerful, and yes she will absolutely let you ruin your own life if you don't read the whole thing. so let's read the whole thing. 🫢


🌸 SYNOPSIS 🌸

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

that's the shape of it, bestie. --force and --ignore-sanity-checks up front if you're feeling spicy, then the {device}, then which meta data version you're on, then the {command} and whatever [cmd args...] it wants. periodt.


πŸ’– DESCRIPTION πŸ’–

so drbdmeta is used to create, display and modify the contents of DRBD's meta data storage. fr fr, that's her whole job description. πŸ’…

but like… usually you do not want to use this command directly, okay? normally you start it via the frontend drbdadm(8) and let that girl handle it. iykyk.

this command only works if the DRBD resource is currently down, or at least detached from its backing storage. no cap. she will not work with a resource that's still holding on.

the first parameter is the device node associated to the resource. the second parameter is where you pick the version of the meta data. and the good news? currently all major DRBD releases (0.6, 0.7 and 8) are supported. slay. 🌈


πŸŽ€ OPTIONS πŸŽ€

  • --force β€” every single question that drbdmeta asks gets treated as if the user answered 'yes'. all of them. no take-backs, bestie, she's just going to assume you meant it. πŸ’€
  • --ignore-sanity-checks β€” some sanity checks cause drbdmeta to terminate. like, for example, if a file system image would get destroyed by creating the meta data. by using that option you can force drbdmeta to ignore these checks. she's looking away. πŸ™ˆ

πŸ‘‘ COMMANDS πŸ‘‘

🌟 create-md --peer-max-bio-size val --al-stripes val --al-stripe-size-kB val

create-md initializes the meta data storage. this needs to be done before a DRBD resource can be taken online for the first time, so like, it's giving "first day of school" energy. ✨

in case there is already a meta data signature of an older format in place, drbdmeta will ask you if it should convert the older format to the selected format. polite of her honestly.

if you will use the resource before it is connected to its peer for the first time, DRBD may perform better if you use the --peer-max-bio-size option. for DRBD versions of the peer, use up to these values: <8.3.7 -> 4k, 8.3.8 -> 32k, 8.3.9 -> 128k, 8.4.0 -> 1M.

if you want to use more than 6433 activity log extents, or live on top of a spriped RAID, you may specify the number of stripes (--al-stripes, default 1), and the stripe size (--al-stripe-size-kB, default 32). to just use a larger linear on-disk ring-buffer, leave the number of stripes at 1, and increase the size only:

drbdmeta 0 v08 /dev/vg23/lv42 internal create-md --al-stripe-size 1M

to avoid a single "spindle" from becoming a bottleneck, increase the number of stripes, to achieve an interleaved layout of the on-disk activity-log transactions. what you give as "stripe-size" should be what is a.k.a. "chunk size" or "granularity" or "strip unit": the minimum skip to the next "spindle". so many names for one little number, she contains multitudes. πŸ’œ

drbdmeta 0 v08 /dev/vg23/lv42 internal create-md --al-stripes 7 --al-stripe-size 64k

πŸ¦‹ get-gi

get-gi shows a short textual representation of the data generation identifier. in version 0.6 and 0.7 these are generation counters, while in version 8 it is a set of UUIDs. short, sweet, to the point. main character energy honestly.

πŸ“ show-gi

show-gi prints a textual representation of the data generation identifiers including explanatory information. so like, the same tea but with the full backstory. β˜•

🧚 dump-md

dumps the whole contents of the meta data storage including the stored bit-map and activity-log in a textual representation. the entire thing. she's not gatekeeping. πŸ”₯

πŸ’œ outdate

sets the outdated flag in the meta data. this is used by the peer node when it wants to become primary, but cannot communicate with the DRBD stack on this host. so like, "i'm taking over, you're not answering, sorry bestie." πŸ’…

🌈 dstate

prints the state of the data on the backing storage. the output is always followed by /DUnknown since drbdmeta only looks at the local meta data. she's local-only, she doesn't know what the other nodes are doing, and honestly same. 🫢

⭐ check-resize

examines the device size of a backing device, and it's last known device size, recorded in a file /var/lib/drbd/drbd-minor-??.lkbd. in case the size of the backing device changed, and the meta data can be found at the old position, it moves the meta data to the right position at the end of the block device. glow-up relocation, we love to see it. ✨


πŸ’€ EXPERTS COMMANDS πŸ’€

so… drbdmeta allows you to modify the meta data as well. this is intentionally omitted for the command's usage output, since you should only use it if you really know what you are doing. and when she says really, she means really.

by setting the generation identifiers to wrong values, you risk to overwrite your up-to-data data with an older version of your data. that's not a typo bestie, that's just the horror. 😭

🌸 set-gi gi

set-gi allows you to set the generation identifier. gi needs to be a generation counter for the 0.6 and 0.7 format, and a UUID set for 8.x. specify it in the same way as get-gi shows it. match the format exactly, no improvising. πŸŽ€

🌟 restore-md dump_file

reads the dump_file and writes it to the meta data. put the vibe back. πŸ’–


🌸 VERSION 🌸

this document was revised for version 8.3.2 of the DRBD distribution. yes she's an older girl but she still ate. πŸ’…


🫢 AUTHOR 🫢

written by Philipp Reisner <philipp.reisner@linbit.com> and Lars Ellenberg <lars.ellenberg@linbit.com>. legends, honestly. πŸ‘‘


πŸŽ€ REPORTING BUGS πŸŽ€

report bugs to <drbd-user@lists.linbit.com>. they want to hear from you, bestie, that's literally the whole point of a mailing list. πŸ’Œ


Copyright 2001-2008 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. like, none. zero. zilch. you break it, you bought it. 😭


πŸ¦‹ SEE ALSO πŸ¦‹


and that's the whole page! this one came from DRBD 8.4.11, dated 20 Mar 2020, and it lives in section 8 of the manual as DRBDMETA(8). go forth and manage your meta data responsibly, bestie β€” she's rooting for you. πŸ’–βœ¨πŸŽ€πŸ¦‹