0

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?

1 Answers1

0

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.

vautee
  • 470
  • 3
  • 11