High AvailabilityThis section is for Eucalyptus HA. If you
are not using HA, skip this section.
|
TipConsider backing the DRBD resource with a logical
volume using LVM, this will make growing the backing store
easier in the future if you are running low on disk
space.
|
modprobe drbd
common {
protocol C;
}
resource r0 {
on walrus00.eucalyptus.com {
device /dev/drbd1;
disk /dev/sdb1;
address 192.168.58.1:7789;
meta-disk internal;
}
on walrus01.eucalyptus.com {
device /dev/drbd1;
disk /dev/sdb1;
address 192.168.58.2:7789;
meta-disk internal;
}
syncer {
rate 40M;
}
net {
after-sb-0pri discard-zero-changes;
after-sb-1pri discard-secondary;
}
}
ImportantOn RHEL 6 and Ubuntu, remove the
common section (common {
protocol C; }). The configuration in these
distributions already include a common section.
|
include "/etc/eucalyptus/drbd.conf";
ImportantFor Ubuntu, you must also remove the
common section (common {
protocol C; }) and the line include
"drbd.d/*.res";.
|
/dev/drbd1 /var/lib/eucalyptus/bukkits ext3 noauto,owner 0 0
CLOUD_OPTS="-Dwalrus.storage.manager=DRBDStorageManager"
service eucalyptus-cloud restart
service eucalyptus-cloud stop
drbdmeta --force /dev/drbd1 v08 /dev/sdb1 internal create-md drbdadm up r0
ImportantRepeat this step on the secondary
Walrus.
|
TipWith a large DRBD device, the initial
synchronization can take a considerable amount of time.
Consult Skipping Initial Device Synchronization for
instructions on how to skip the synchronization.
|
drbdsetup /dev/drbd1 syncer -r 110M drbdadm -- --overwrite-data-of-peer primary r0
drbdadm dstate r0
TipTo view the synchronization
process in near-realtime, run watch -n 2 cat
/proc/drbd.
|
mkfs.ext3 /dev/drbd1
service eucalyptus-cloud start
euca-modify-property -p walrus.blockdevice=/dev/drbd1 euca-modify-property -p walrus.resource=r0