I have same problem, i mount /var/lib/docker, it's so sad if you want sync existing filesystem, You must prepare an additional clean partition or disk to store the metadata, it's also mentioned here.
root@node51:~# df -hT Filesystem Type Size Used Avail Use% Mounted on tmpfs tmpfs 392M 1.4M 390M 1% /run /dev/mapper/ubuntu--vg-lv--0 xfs 97G 8.9G 89G 10% / tmpfs tmpfs 2.0G 0 2.0G 0% /dev/shm tmpfs tmpfs 5.0M 0 5.0M 0% /run/lock /dev/sda2 ext4 2.0G 256M 1.6G 14% /boot /dev/sda1 vfat 1.1G 6.1M 1.1G 1% /boot/efi tmpfs tmpfs 392M 4.0K 392M 1% /run/user/0 /dev/sdb xfs 20G 369M 20G 2% /var/lib/docker root@node51:~# cat /etc/drbd.d/ global_common.conf r0.res root@node51:~# cat /etc/drbd.d/r0.res resource "r0" { device minor 1; disk "/dev/sdb"; meta-disk internal; on "node51" { address 192.168.72.51:7789; } on "node52" { address 192.168.72.52:7789; } }
fail logs
root@node51:~# sudo drbdadm --force create-md r0 open(/dev/sdb) failed: Device or resource busy Exclusive open failed. Do it anyways? *** confirmation forced via --force option *** open(/dev/sdb) failed: Device or resource busy Exclusive open failed. Do it anyways? *** confirmation forced via --force option *** md_offset 21474832384 al_offset 21474799616 bm_offset 21474144256 Found xfs filesystem 20971520 kB data area apparently used 20970844 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 1 v08 /dev/sdb internal create-md --force' terminated with exit code 40 root@node51:~#