Portál AbcLinuxu, 6. května 2025 14:20
box423 ~ # cat /proc/drbd
version: 8.3.6 (api:88/proto:86-91)
GIT-hash: f3606c47cc6fcf6b3f086e425cb34af8b7a81bbf build by @box423, 2011-12-22 11:43:07
1: cs:Connected ro:Primary/Secondary ds:UpToDate/Diskless C r----
ns:3857 nr:296 dw:7684 dr:25109 al:8 bm:574 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:521208
box423 ~ # crm status
============
Last updated: Fri Dec 30 20:32:06 2011
Last change: Fri Dec 30 20:22:16 2011
Stack: openais
Current DC: box423 - partition with quorum
Version: 1.1.6-0c7312c689715e096b716419e2ebc12b57962052
2 Nodes configured, 2 expected votes
6 Resources configured.
============
Online: [ box423 box402 ]
Master/Slave Set: WebDataClone [WebData]
Masters: [ box423 ]
Slaves: [ box402 ]
Resource Group: mysql
WebFS (ocf::heartbeat:Filesystem): Started box423
ClusterIP (ocf::heartbeat:IPaddr2): Started box423
mysqld (lsb:mysql): Started box423
WebSite (lsb:apache2): Started box423
box423 ~ # crm configure show
node box402 \
attributes standby="off"
node box423 \
attributes standby="off"
primitive ClusterIP ocf:heartbeat:IPaddr2 \
params ip="10.0.1.222" cidr_netmask="32" \
op monitor interval="30s"
primitive WebData ocf:linbit:drbd \
params drbd_resource="shared_data" \
op monitor interval="60s"
primitive WebFS ocf:heartbeat:Filesystem \
params device="/dev/drbd/by-res/shared_data" directory="/home" fstype="ext3"
primitive WebSite lsb:apache2 \
op monitor interval="1min"
primitive mysqld lsb:mysql
group mysql WebFS ClusterIP mysqld WebSite
ms WebDataClone WebData \
meta master-max="1" master-node-max="1" clone-max="2" clone-node-max="1" notify="true" target-role="Started"
location prefer-box423 WebSite 50: box423
colocation WebSite-with-WebFS inf: WebSite WebFS
colocation fs_on_drbd inf: WebFS WebDataClone:Master
colocation website-with-ip inf: WebSite ClusterIP
order WebFS-after-WebData inf: WebDataClone:promote WebFS:start
order WebSite-after-WebFS inf: WebFS WebSite
order apache-after-ip inf: ClusterIP WebSite
property $id="cib-bootstrap-options" \
dc-version="1.1.6-0c7312c689715e096b716419e2ebc12b57962052" \
cluster-infrastructure="openais" \
expected-quorum-votes="2" \
stonith-enabled="false" \
no-quorum-policy="ignore"
rsc_defaults $id="rsc-options" \
resource-stickiness="100"
box423 ~ # cat /etc/drbd.d/shared_data.res
resource shared_data {
meta-disk internal;
device /dev/drbd1;
syncer {
verify-alg sha1;
}
net {
allow-two-primaries;
}
on box423 {
device /dev/drbd1;
disk /dev/sda4;
address 10.0.1.104:7789;
}
on box402 {
device /dev/drbd1;
disk /dev/sda4;
address 10.0.1.103:7789;
}
}
Řešení dotazu:
ms WebDataClone WebData \
meta master-max="1" master-node-max="1" clone-max="2" clone-node-max="1" notify="true" target-role="Started"
tak smaž:
net {
}
zkus toto zmenit
colocation WebSite-with-WebFS inf: WebSite WebFS:Master
colocation fs_on_drbd inf: WebFS WebDataClone:Master
colocation website-with-ip inf: WebSite ClusterIP:Master
/etc/ocfs2/cluster.conf
!
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.