Не могу получить информацию с DRBD, на любой запрос либо ошибку, когда указываю конкретный drbd либо если версию АПИ, версию Драйвера, и протокола на все выдает 0. Может проблема в субагенте, но тогда я не очень понимаю как скомплировать агент чтобы дрбд туда включился.
Покажите результат команд:
ls -al /dev/drbd*
cat /proc/drbd
]# ls -al /dev/drbd*
brw-rw---- 1 root disk 147, 0 Oct 6 20:28 /dev/drbd0
brw-rw---- 1 root disk 147, 1 Nov 26 17:48 /dev/drbd1
brw-rw---- 1 root root 147, 10 Nov 14 10:44 /dev/drbd10
brw-rw---- 1 root root 147, 11 Nov 14 10:44 /dev/drbd11
brw-rw---- 1 root root 147, 12 Nov 14 10:44 /dev/drbd12
brw-rw---- 1 root root 147, 13 Nov 14 10:44 /dev/drbd13
brw-rw---- 1 root root 147, 14 Nov 14 10:44 /dev/drbd14
brw-rw---- 1 root root 147, 15 Nov 14 10:44 /dev/drbd15
brw-rw---- 1 root disk 147, 2 Oct 6 20:28 /dev/drbd2
brw-rw---- 1 root root 147, 3 Nov 14 10:44 /dev/drbd3
brw-rw---- 1 root root 147, 4 Nov 14 10:44 /dev/drbd4
brw-rw---- 1 root root 147, 5 Nov 14 10:44 /dev/drbd5
brw-rw---- 1 root root 147, 6 Nov 14 10:44 /dev/drbd6
brw-rw---- 1 root root 147, 7 Nov 14 10:44 /dev/drbd7
brw-rw---- 1 root root 147, 8 Nov 14 10:44 /dev/drbd8
brw-rw---- 1 root root 147, 9 Nov 14 10:44 /dev/drbd9
/dev/drbd:
total 0
drwxr-xr-x 4 root root 80 Oct 6 20:28 .
drwxr-xr-x 23 root root 4880 Nov 27 16:43 ..
drwxr-xr-x 2 root root 100 Oct 6 20:28 by-disk
drwxr-xr-x 2 root root 100 Oct 6 20:28 by-res
# cat /proc/drbd
version: 8.4.3 (api:1/proto:86-101)
GIT-hash: 89a294209144b68adb3ee85a73221f964d3ee515 build by mockbuild@Build64R6, 2013-07-06 12:36:38
0: cs:Connected ro:Primary/Primary ds:UpToDate/UpToDate C r-----
ns:677784 nr:568 dw:678352 dr:36008212 al:170 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:0
1: cs:Connected ro:Primary/Primary ds:UpToDate/UpToDate C r-----
ns:100833352 nr:2332 dw:100838048 dr:40928152 al:9509 bm:32 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:0
2: cs:Connected ro:Primary/Primary ds:UpToDate/UpToDate C r-----
ns:116451 nr:1500276199 dw:1500404046 dr:41733925 al:287 bm:249 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:0
#ls /dev/drbd/
by-disk by-res
# ls /dev/drbd/by-disk/
sdb1 sdb2 sdb3
# ls /dev/drbd/by-res/
r0 r1 r2
# cat /etc/drbd.d/*
global {
usage-count yes;
# minor-count dialog-refresh disable-ip-verification
}
common {
handlers {
pri-on-incon-degr "/usr/lib/drbd/notify-pri-on-incon-degr.sh; /usr/lib/drbd/notify-emergency-reboot.sh; echo b > /proc/sysrq-trigger ; reboot -f";
pri-lost-after-sb "/usr/lib/drbd/notify-pri-lost-after-sb.sh; /usr/lib/drbd/notify-emergency-reboot.sh; echo b > /proc/sysrq-trigger ; reboot -f";
local-io-error "/usr/lib/drbd/notify-io-error.sh; /usr/lib/drbd/notify-emergency-shutdown.sh; echo o > /proc/sysrq-trigger ; halt -f";
#fence-peer "/usr/sbin/rhcs_fence";
fence-peer "/usr/lib/drbd/crm-fence-peer.sh";
# split-brain "/usr/lib/drbd/notify-split-brain.sh root";
# out-of-sync "/usr/lib/drbd/notify-out-of-sync.sh root";
# before-resync-target "/usr/lib/drbd/snapshot-resync-target-lvm.sh -p 15 -- -c 16k";
# after-resync-target /usr/lib/drbd/unsnapshot-resync-target-lvm.sh;
}
startup {
become-primary-on both;
wfc-timeout 300;
degr-wfc-timeout 120;
outdated-wfc-timeout 110;
# wfc-timeout degr-wfc-timeout outdated-wfc-timeout wait-after-sb
}
options {
# cpu-mask on-no-data-accessible
}
disk {
#fencing dont-care;
#fencing resource-and-stonith;
# size max-bio-bvecs on-io-error fencing disk-barrier disk-flushes
# disk-drain md-flushes resync-rate resync-after al-extents
# c-plan-ahead c-delay-target c-fill-target c-max-rate
# c-min-rate disk-timeout
}
net {
protocol C;
allow-two-primaries;
after-sb-0pri discard-zero-changes;
after-sb-1pri discard-secondary;
after-sb-2pri disconnect;
# protocol timeout max-epoch-size max-buffers unplug-watermark
# connect-int ping-int sndbuf-size rcvbuf-size ko-count
# allow-two-primaries cram-hmac-alg shared-secret after-sb-0pri
# after-sb-1pri after-sb-2pri always-asbp rr-conflict
# ping-timeout data-integrity-alg tcp-cork on-congestion
# congestion-fill congestion-extents csums-alg verify-alg
# use-rle
}
}
global {
usage-count yes;
# minor-count dialog-refresh disable-ip-verification
}
common {
handlers {
# These are EXAMPLE handlers only.
# They may have severe implications,
# like hard resetting the node under certain circumstances.
# Be careful when chosing your poison.
# pri-on-incon-degr "/usr/lib/drbd/notify-pri-on-incon-degr.sh; /usr/lib/drbd/notify-emergency-reboot.sh; echo b > /proc/sysrq-trigger ; reboot -f";
# pri-lost-after-sb "/usr/lib/drbd/notify-pri-lost-after-sb.sh; /usr/lib/drbd/notify-emergency-reboot.sh; echo b > /proc/sysrq-trigger ; reboot -f";
# local-io-error "/usr/lib/drbd/notify-io-error.sh; /usr/lib/drbd/notify-emergency-shutdown.sh; echo o > /proc/sysrq-trigger ; halt -f";
# fence-peer "/usr/lib/drbd/crm-fence-peer.sh";
# split-brain "/usr/lib/drbd/notify-split-brain.sh root";
# out-of-sync "/usr/lib/drbd/notify-out-of-sync.sh root";
# before-resync-target "/usr/lib/drbd/snapshot-resync-target-lvm.sh -p 15 -- -c 16k";
# after-resync-target /usr/lib/drbd/unsnapshot-resync-target-lvm.sh;
}
startup {
# wfc-timeout degr-wfc-timeout outdated-wfc-timeout wait-after-sb
}
options {
# cpu-mask on-no-data-accessible
}
disk {
# size max-bio-bvecs on-io-error fencing disk-barrier disk-flushes
# disk-drain md-flushes resync-rate resync-after al-extents
# c-plan-ahead c-delay-target c-fill-target c-max-rate
# c-min-rate disk-timeout
}
net {
# protocol timeout max-epoch-size max-buffers unplug-watermark
# connect-int ping-int sndbuf-size rcvbuf-size ko-count
# allow-two-primaries cram-hmac-alg shared-secret after-sb-0pri
# after-sb-1pri after-sb-2pri always-asbp rr-conflict
# ping-timeout data-integrity-alg tcp-cork on-congestion
# congestion-fill congestion-extents csums-alg verify-alg
# use-rle
}
}
# This is the resource used for the shared GFS2 partition.
resource r0 {
# This is the block device path.
device /dev/drbd0;
# We'll use the normal internal metadisk (takes about 32MB/TB)
meta-disk internal;
# This is the `uname -n` of the first node
on g-hakvm-1.cn {
address 192.168.100.1:7788;
disk /dev/sdb1;
}
on g-hakvm-2.cn {
address 192.168.100.2:7788;
disk /dev/sdb1;
}
}
# This is the resource used for VMs that will normally run on g-hakvm-1
resource r1 {
# This is the block device path.
device /dev/drbd1;
# We'll use the normal internal metadisk (takes about 32MB/TB)
meta-disk internal;
# This is the `uname -n` of the first node
on g-hakvm-1.cn {
address 192.168.100.1:7789;
disk /dev/sdb2;
}
on g-hakvm-2.cn {
address 192.168.100.2:7789;
disk /dev/sdb2;
}
}
# This is the resource used for VMs that will normally run on g-hakvm-2.
resource r2 {
# This is the block device path.
device /dev/drbd2;
# We'll use the normal internal metadisk (takes about 32MB/TB)
meta-disk internal;
# This is the `uname -n` of the first node
on g-hakvm-1.cn {
address 192.168.100.1:7790;
disk /dev/sdb3;
}
on g-hakvm-2.cn {
address 192.168.100.2:7790;
disk /dev/sdb3;
}
}
Попробуйте агента версии 1.2.10 - я исправил обработку /proc/drbd