o2cb/ocfs2 : cluster is offline after reboot
Hi,
Anyone here using ocfs2 cluster with Stretch? I can't get it to be
online during boot time for some reason, hence ocfs2 partition can't
be mounted. This is an upgrade from Jessie, where everything was
working just fine. My setup consists of two nodes.
$ uname -a
Linux QSRV01 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u3 (2017-08-06)
x86_64 GNU/Linux
$ dpkg -l | grep ocfs
ii ocfs2-tools 1.8.4-4
amd64 tools for managing OCFS2 cluster filesystems
Pretty much default /etc/default/o2cb:
###
O2CB_ENABLED=true
O2CB_BOOTCLUSTER=web
O2CB_HEARTBEAT_THRESHOLD=31
O2CB_IDLE_TIMEOUT_MS=30000
O2CB_KEEPALIVE_DELAY_MS=2000
O2CB_RECONNECT_DELAY_MS=2000
###
and /etc/ocfs2/cluster.conf (with tabs present):
###
cluster:
heartbeat_mode = local
node_count = 2
name = web
node:
number = 1
cluster = web
ip_port = 7777
ip_address = 192.168.0.4
name = QSRV01
node:
number = 2
cluster = web
ip_port = 7777
ip_address = 192.168.0.5
name = QSRV02
heartbeat:
cluster = web
region = XXXXXXXXXXXXXXXXXXXX
###
/etc/fstab
###
/dev/drbd0 /var/www ocfs2 noauto,noatime 0 0
###
After the reboot, no /var/www is mounted. I don't see any traces of
o2cb/ocfs2 in dmesg except one entry:
Sep 18 14:24:38 QSRV02 kernel: [ 145.104344] ocfs2: Registered
cluster interface o2cb
The status of both o2cb and ocfs2 services is inactive (dead) with the
ocfs2 cluster offline:
$ service o2cb status
o2cb.service - LSB: Load O2CB cluster services at system boot.
Loaded: loaded (/etc/init.d/o2cb; generated; vendor preset: enabled)
Active: inactive (dead)
Docs: man:systemd-sysv-generator(8)
$ service ocfs2 status
ocfs2.service - LSB: Mount OCFS2 volumes at boot.
Loaded: loaded (/etc/init.d/ocfs2; generated; vendor preset: enabled)
Active: inactive (dead)
Docs: man:systemd-sysv-generator(8)
$ o2cb cluster-status web
offline
If I execute 'o2cb register-cluster web', the status changes to
online, and I can 'mount /dev/drbd0' without any issues:
$ o2cb cluster-status
Cluster 'web' is online
As a workaround, I added the following into /etc/rc.local, which did
work, and /var/www is mounted fine after the reboot.
###
o2cb register-cluster web
sleep 30
mount /dev/drbd0
exit 0
###
Any hints would be greatly appreciated, but I have a feeling that
/etc/default/o2cb is somehow not processed during boot time, or
O2CB_ENABLED=true (and/or O2CB_BOOTCLUSTER=web) are ignored
altogether.
Thank you.
Reply to: