Product SiteDocumentation Site

7.3. Configure DRBD

Before we configure DRBD, we need to set aside some disk for it to use.

7.3.1. Create A Partition for DRBD

If you have more than 1Gb free, feel free to use it. For this guide however, 1Gb is plenty of space for a single html file and sufficient for later holding the GFS2 metadata.
# vgdisplay | grep -e Name -e Free
  VG Name               vg_pcmk1
  Free  PE / Size       31 / 992.00 MiB
# lvs
  LV        VG          Attr     LSize   Pool Origin Data%  Move Log Copy%  Convert
  lv_root   vg_pcmk1 -wi-ao--   8.56g
  lv_swap   vg_pcmk1 -wi-ao-- 960.00m
# lvcreate -n drbd-demo -L 1G vg_pcmk1
Logical volume "drbd-demo" created
# lvs
  LV        VG          Attr     LSize   Pool Origin Data%  Move Log Copy%  Convert
  drbd-demo vg_pcmk1 -wi-a--- 1.00G
  lv_root   vg_pcmk1 -wi-ao--   8.56g
  lv_swap   vg_pcmk1 -wi-ao-- 960.00m
Repeat this on the second node, be sure to use the same size partition.
# ssh pcmk-2 -- lvs
LV   VG    Attr  LSize  Origin Snap% Move Log Copy% Convert
  lv_root   vg_pcmk1 -wi-ao--   8.56g
  lv_swap   vg_pcmk1 -wi-ao-- 960.00m
# ssh pcmk-2 -- lvcreate -n drbd-demo -L 1G vg_pcmk1
Logical volume "drbd-demo" created
# ssh pcmk-2 -- lvs
LV    VG    Attr  LSize  Origin Snap% Move Log Copy% Convert
  drbd-demo vg_pcmk1 -wi-a--- 1.00G
  lv_root   vg_pcmk1 -wi-ao--   8.56g
  lv_swap   vg_pcmk1 -wi-ao-- 960.00m