Score:0

DRBD terminated with exit code 40

ru flag

I am trying to setup DRBD on Ubuntu with an existing filesystem and when I run sudo drbdadm create-md r0 I get the following error message

md_offset 7889832898560
al_offset 7889832865792
bm_offset 7889592086528

Found LVM2 physical volume signature
  7704911872 kB data area apparently used
  7704679772 kB left usable by current configuration

Device size would be truncated, which
would corrupt data and result in
'access beyond end of device' errors.
You need to either
   * use external meta data (recommended)
   * shrink that filesystem first
   * zero out the device (destroy the filesystem)
Operation refused.

Command 'drbdmeta 0 v08 /dev/sda4 internal create-md' terminated with exit code 40

Not sure what I am doing wrong. Could someone please explain this to me and provide how to fix it?

Score:0
kr flag

You're about to write DRBD meta-data (which is needed to add DRBD being able to manage your volume) to an already existing file system. There's a good chance to damage your data, so drbdadm create-md stopped here.

You'd need to shrink the filesystem by 128 MB (that's the usual meta-data size) on the primary server, or make the underlaying physical storage 128MB larger - this created a gap for drbd to write the metadata into. Or you (maybe the safer solution here) create a small LV and use external metadata for this volume.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.