apt-get install drbd8-utils
global { usage-count no; } common { startup { wfc-timeout 30; degr-wfc-timeout 15; outdated-wfc-timeout 10; } net { protocol C; shared-secret "MyS3cre3t"; max-buffers 36k; sndbuf-size 1024k; rcvbuf-size 2048k; } syncer { rate 4194304k; al-extents 6433; } disk { on-io-error detach; c-plan-ahead 2; c-fill-target 24M; c-min-rate 80M; c-max-rate 720M; } } resource r0 { device /dev/drbd0; disk /dev/sdb; meta-disk internal; on drbd1.eisscholle.net { address 10.0.0.101:7788; } on drbd1.eisscholle.net { address 10.0.0.102:7788; } }
Die Konfigurationsdatei auf alle beteiligten Hosts kopieren.
root@drbd1:~# drbdadm create-md r0; /etc/init.d/drbd start root@drbd2:~# drbdadm create-md r0; /etc/init.d/drbd start
root@drbd1:~# drbdadm -- --overwrite-data-of-peer primary r0 root@drbd1:~# mkfs.ext3 /dev/drbd0
cat /proc/drbd drbdadm cstate r0 drbdadm dstate r0 drbdadm role r0