Shared storage: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 7: | Line 7: | ||
wfc-timeout 10; | wfc-timeout 10; | ||
degr-wfc-timeout: 10; | degr-wfc-timeout: 10; | ||
} | |||
net { | |||
ping-timeout: 100; | |||
} | } | ||
# Create /etc/drbd.d/r0.res: | # Create /etc/drbd.d/r0.res: | ||
Latest revision as of 12:05, 15 April 2013
- Configure the network between the two servers
- Allow through ports 7788-7799 only
- Create the logical volume cloud
- Install drbd8-utils
- Change the startup group in /etc/drbd.d/global_common.conf to read:
startup {
wfc-timeout 10;
degr-wfc-timeout: 10;
}
net {
ping-timeout: 100;
}
- Create /etc/drbd.d/r0.res:
resource r0 {
on cloud1 {
device /dev/drbd1;
disk /dev/lvm1/cloud;
address 192.168.1.1:7789;
meta-disk internal;
}
on cloud2 {
device /dev/drbd1;
disk /dev/lvm1/cloud;
address 192.168.1.2:7789;
meta-disk internal;
}
net {
allow-two-primaries;
}
startup {
become-primary-on both;
}
syncer {
rate 20M;
}
}
- Run drbdadm create-md r0
- Add drbd to /etc/modules and modprobe it
- Run drbdadm up r0
- On one of the nodes only, run drbdadm -- --overwrite-data-of-peer primary r0
- After sync, run drbdadm primary r0 on both nodes
- apt-get install corosync openais corosync-dev libdlm-dev
- Install customised lvm2 package. This is basically the lvm2 source following the instructions here with the rules file having --enable-cluster=internal and --enable-clvm=corosync,openais. Remember to run apt-get build-dep lvm2 and apt-get install devscripts first.
- Copy clvm daemon to /usr/sbin/. This is in debian/build/install_deb/usr/sbin/clvmd
- mkdir /etc/ais
- Download the /etc/init.d/openais script from the site but also do the following:
- chmod u+x
- Change reference to openais-cfgtool to corysync-cfgtool
- Add killall corosync to stop) and restart)
- Download the /etc/init.d/clvm init script but also do the following:
- Add BEGIN INIT INFO section as per cloud1
- Run insserv openais
- Run insserv clvm
- Allow through firewall: iptables -A INPUT -p udp -i eth1 -m multiport --ports 5405 -j ACCEPT
- Change filter directive in /etc/lvm/lvm to read filter = [ "a/sd.*/", "a/drbd.*/", "r/.*/" ]. Information on this is available in this bug.
- pvcreate /dev/drbd1
- vgcreate --clustered y lvm_r0 /dev/drbd1
- Enable CLVM by setting locking_type=3 in lvm.conf. Possibly run lvmconf --enable-cluster on live systems.