- [Show page]
- [Old revisions]
- [[unknown link type]]
- []
Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
linux:skoleni:ha [2015/02/26 01:48] admin |
linux:skoleni:ha [2016/12/05 15:30] (current) admin |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== HA - basics ====== | ||
| Note: Fibre channel - cheap stuff!!! | Note: Fibre channel - cheap stuff!!! | ||
| Line 27: | Line 28: | ||
| /sbin/modprobe drbd | /sbin/modprobe drbd | ||
| - | Partition DRBD on both machines (the ugly way): | + | |
| + | ====Partition DRBD on both machines (the ugly way):==== | ||
| + | If your linux box doesn't detect new disk automaticly, you can try rescanning the scsi bus | ||
| + | echo "- - -" >/sys/class/scsi_host/host0/scan | ||
| [root@node1 ~]# fdisk -cu /dev/sdb | [root@node1 ~]# fdisk -cu /dev/sdb | ||
| Line 35: | Line 40: | ||
| [root@node2 ~]# lvcreate -L 4GB -n mail_disk vg_boruvka | [root@node2 ~]# lvcreate -L 4GB -n mail_disk vg_boruvka | ||
| - | <file bash> | + | ==== Setup the network ==== |
| + | <file bash ifcfg-eth1> | ||
| + | DEVICE="eth1" | ||
| + | BOOTPROTO="none" | ||
| + | HWADDR="00:0C:29:DA:26:E9" | ||
| + | IPADDR="10.1.1.1" | ||
| + | NETMASK="255.255.255.252" | ||
| + | IPV6INIT="yes" | ||
| + | NM_CONTROLLED="no" | ||
| + | ONBOOT="yes" | ||
| + | TYPE="Ethernet" | ||
| + | </file> | ||
| + | |||
| + | ==== DRBD config ==== | ||
| + | <code bash> | ||
| resource mail_disk { | resource mail_disk { | ||
| + | protocol C; | ||
| startup { | startup { | ||
| wfc-timeout 30; | wfc-timeout 30; | ||
| Line 68: | Line 88: | ||
| } | } | ||
| } | } | ||
| - | </file> | + | </code> |
| Initialize devices (very similar to pvcreate or mkfs.ext4): | Initialize devices (very similar to pvcreate or mkfs.ext4): | ||
| Line 87: | Line 107: | ||
| Careful reader could have notices we are having Diskless/Inconsistent. Initialize (create-dm) the disk again or zero it (dd if=/dev/zero) and initialize again and thing should be fine. | Careful reader could have notices we are having Diskless/Inconsistent. Initialize (create-dm) the disk again or zero it (dd if=/dev/zero) and initialize again and thing should be fine. | ||
| - | [root@node1 ~]# drbdadm -- --overwrite-data-of-peer primary repdata | + | [root@node1 ~]# drbdadm -- --overwrite-data-of-peer primary mail_disk |
| + | |||
| + | |||
| + | ====== UCARP (VRRP) ====== | ||
| + | Open the page and install epel | ||
| + | http://mirror.hosting90.cz/epel/6/x86_64/repoview/epel-release.html | ||
| + | Or try using this direct link, but might be unavailable later | ||
| + | yum install http://mirror.hosting90.cz/epel/6/x86_64/epel-release-6-8.noarch.rpm | ||
| + | |||
| + | Install ucarp | ||
| + | yum install ucarp | ||
| + | |||
| + | config | ||
| + | <file bash /etc/ucarp.d/vip-001.conf> | ||
| + | VIP_ADDRESS="192.168.5.123" | ||
| + | </file> | ||
| + | |||
| + | <file bash /etc/ucarp.d/vip-common.conf> | ||
| + | PASSWORD="love" | ||
| + | BIND_INTERFACE="eth0" | ||
| + | SOURCE_ADDRESS="192.168.5.39" | ||
| + | |||
| + | |||
| + | # If you have extra options to add, see "ucarp --help" output | ||
| + | OPTIONS="--shutdown --preempt" | ||
| + | </file> | ||
linux/skoleni/ha.1424911685.txt.gz · Last modified: 2015/02/26 01:48 by admin


