Configure LVM for DRBD

  1. Edit the LVM Config File.
nano /etc/lvm/lvm.conf
  1. Add your block device to the LV Filter.
filter = [ “r|/dev/vd*|”, “r|/dev/zd*|”, “a|/dev/drbd*|” ]
  1. Set the write cache state to 0, default is 1.

    write_cache_state = 0

  2. Remove the LVM Cache.

rm -f /etc/lvm/cache/.cache


$ vgcreate "{VOL_GRP_NAME}" "{DRBD_DEVICE_NAME}"
            {vg_drbd0}       {/dev/drbd0}
Volume group “{VOL_GRP_NAME}” successfully created

$ lvcreate -l "{SIZE IN GB HERE}" -n "{LOG_VOL_NAME}" "{VOL_GRP_NAME}"
               {20}                   {drbdvol0}       {vg_drbd0}
Logical Volume {LOG_VOL_NAME} created