Уже сутки гуглю, не могу найти как правильно настроить drbd, выдает ошибку когда пытаюсь сделать один из нодов первичным (хотя по идеи оба нода должны быть primary):
[root@node1 ~]# drbdadm primary repdata
0: State change failed: (-2) Need access to UpToDate data
Command 'drbdsetup primary 0' terminated with exit code 17
[root@node1 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 6.8G 1.1G 5.4G 16% /
tmpfs 939M 0 939M 0% /dev/shm
/dev/sda1 194M 47M 137M 26% /boot
/dev/sda4 51G 180M 48G 1% /home
[root@node1 ~]# cat /etc/drbd.conf
global { usage-count no; }
resource repdata {
protocol C;
startup { wfc-timeout 0; degr-wfc-timeout 120; }
disk { on-io-error detach; }
net { cram-hmac-alg "sha1"; shared-secret "p455"; }
syncer { rate 10M; }
on node1 {
device /dev/drbd0;
disk /dev/sda4;
address 192.168.0.10:7788;
meta-disk internal;
}
on node2 {
device /dev/drbd0;
disk /dev/sda4;
address 192.168.0.20:7788;
meta-disk internal;
}
}
[root@node1 ~]# service drbd status
drbd driver loaded OK; device status:
version: 8.4.3 (api:1/proto:86-101)
GIT-hash: 89a294209144b68adb3ee85a73221f964d3ee515 build by mockbuild@Build64R6, 2013-07-06 12:36:38
m:res cs ro ds p mounted fstype
0:repdata Connected Secondary/Secondary Diskless/Diskless C
[root@node1 ~]# drbdadm primary repdata
0: State change failed: (-2) Need access to UpToDate data
Command 'drbdsetup primary 0' terminated with exit code 17
[root@node1 ~]# drbdadm -- --overwrite-data-of-peer primary all
0: State change failed: (-2) Need access to UpToDate data
Command 'drbdsetup primary 0 --overwrite-data-of-peer' terminated with exit code 17