vi /etc/drbd.conf : --- global { usage-count no; } common { syncer { rate 100M; } } resource iscsi1 { protocol C; net { after-sb-0pri discard-zero-changes; after-sb-1pri consensus; cram-hmac-alg sha1; shared-secret PUTyourSECREThere; } on pekxen5 { device /dev/drbd1; disk /dev/sdb; address 10.10.10.1:7789; meta-disk internal; } on pekxen6 { device /dev/drbd1; disk /dev/sdb; address 10.10.10.2:7789; meta-disk internal; } resource iscsi2 { protocol C; net { after-sb-0pri discard-zero-changes; after-sb-1pri consensus; cram-hmac-alg sha1; shared-secret PUTyourSECREThere; } on pekxen5 { device /dev/drbd1; disk /dev/sdc; address 10.10.10.1:7789; meta-disk internal; } on pekxen6 { device /dev/drbd1; disk /dev/sdc; address 10.10.10.2:7789; meta-disk internal; } } ------------------------------------------------------------------------------------- vi /etc/tgt/targets.conf : ---- # ############### BEGIN HALIZARD INSERTION ############### backing-store /dev/drbd1 lun 10 backing-store /dev/drbd2 lun 20 ############### END HALIZARD INSERTION ############### ------------------------------------------------------------------------------------ vi /etc/lvm/lvm.conf : -- # Ignore /dev/xvd* devices to prevent deadlocking when live-snapshotting # dom0-attached LVHD VDIs filter = [ "r|/dev/xvd.|", "r|/dev/VG_Xen.*/*|", "r|/dev/sdb|", "r|/dev/drbd 1|", "r|/dev/sdc|", "r|/dev/drbd2|" ] ------------------------------------------------------------------------------------ vi /etc/iscsi-ha/iscsi-ha.conf DRBD_RESOURCES=iscsi1:iscsi2 ISCSI_TARGET_SERVICE=/etc/init.d/tgtd DRBD_VIRTUAL_IP=10.10.10.3 DRBD_VIRTUAL_MASK=255.255.255.0 DRBD_INTERFACE=xenbr1 MONITOR_MAX_STARTS=5 MONITOR_DELAY=10 MONITOR_KILLALL=1 MONITOR_SCANRATE=5 ENABLE_LOGGING=1 MAIL_ON=1 MAIL_SUBJECT='HA-Lizard noSAN SYSTEM ALERT - FROM HOST: pekxen5' MAIL_FROM=root@localhost MAIL_TO=root@localhost MAIL_SCREEN_TIME=30 #END CONFIG FILE