Skip to content

Instantly share code, notes, and snippets.

@guilherme
Created March 29, 2012 17:32
Show Gist options
  • Save guilherme/2240445 to your computer and use it in GitHub Desktop.
Save guilherme/2240445 to your computer and use it in GitHub Desktop.
setup drbd master
#!/bin/bash
ifconfig eth0 192.168.0.35/24 up
hostname pc1
/etc/rc.d/rc.drbd stop
modprobe drbd
dd if=/dev/zero bs=1M of=/dev/sdb1 count=1
curl https://gist.github.com/raw/2240291/addabf203f711db2c23fcd717a821321cad64e11/drbd.conf > /etc/drbd.conf
drbdadm create-md r0
drbdadm up r0
drdbadm -- -o primary r0
mkfs.ext4 /dev/drbd0
/etc/rc.d/rc.drbd start
watch -n1 cat /proc/drbd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment