tested on slackware current (oct 2021)
zcat /proc/config.gz | grep -i ocfs2 slackpkg install readline glib2
grab latest release (https://github.com/markfasheh/ocfs2-tools/tags)
wget https://github.com/markfasheh/ocfs2-tools/archive/refs/tags/ocfs2-tools-1.8.7.tar.gz tar xzf ocfs2-tools-1.8.7.tar.gz cd ocfs2-tools-ocfs2-tools-1.8.7/ ./autogen.sh --sysconfdir=/etc --localstatedir=/var make > ../ocfs2.log && echo BUILT make install >> ../ocfs2.log && echo DEPLOYED
–or– using SlackBuilds
export GUI=no sbopkg -i ocfs2-tools
BEWARE YOU NEED TO RESPECT THE TABS, THAT’S EVEN WORSE THAN YAML!
vi /etc/ocfs2/cluster.conf cluster: node_count = 3 name = OCFS2CLUSTER node: ip_port = 7777 ip_address = 192.168.122.11 number = 1 name = slack1 cluster = OCFS2CLUSTER node: ip_port = 7777 ip_address = 192.168.122.12 number = 2 name = slack2 cluster = OCFS2CLUSTER node: ip_port = 7777 ip_address = 192.168.122.13 number = 3 name = slack3 cluster = OCFS2CLUSTER scp /etc/ocfs2/cluster.conf slack2:/etc/ocfs2/cluster.conf scp /etc/ocfs2/cluster.conf slack3:/etc/ocfs2/cluster.conf
all nodes
/etc/rc.d/rc.o2cb load /etc/rc.d/rc.o2cb online OCFS2CLUSTER o2cb cluster-status
add some disk/partition to share to drbd e.g.
all nodes
vi /etc/drbd.conf resource ocfs2 { device /dev/drbd0; meta-disk internal; on slack1 { node-id 1; address 192.168.122.11:7700; disk /dev/vdb1; } on slack2 { node-id 2; address 192.168.122.12:7700; disk /dev/vdb1; } on slack3 { node-id 3; address 192.168.122.13:7700; disk /dev/vdb1; } connection-mesh { hosts slack1 slack2 slack3; } } drbdadm create-md ocfs2 drbdadm up ocfs2 ls -lF /dev/drbd0
slack1
drbdadm primary --force ocfs2 drbdadm status
slack2,3
drbdadm primary ocfs2
slack1 only
mkfs.ocfs2 /dev/drbd0
all nodes
vi /etc/fstab /dev/drbd0 /data ocfs2 rw,noatime,nodiratime,_netdev 0 0 mkdir /data/ touch /data/OCFS2-NOT-MOUNTED mount /data/
checking for GLIB - version >= 2.2.3... no *** Could not run GLIB test program, checking why... *** The test program failed to compile or link. See the file config.log for the *** exact error that occured. This usually means GLIB is incorrectly installed. configure: error: GLib 2.2.3 or better is required
==> that was in aug 2021 with wrong version 1.6.4, now oct 2021 configure passes
../include/ocfs2/ocfs2.h:57:10: fatal error: ocfs2/ocfs2_err.h: No such file or directory 57 | #include <ocfs2/ocfs2_err.h> | ^~~~~~~~~~~~~~~~~~~
==> that was with version 1.6.4. have a look at github, there’s 1.8.7
o2cb: Unknown code ____ 251 while loading cluster configuration file '/etc/ocfs2/cluster.conf'
==> respect the tabs in the config file
https://slackbuilds.org/repository/14.2/system/ocfs2-tools/
https://oss.oracle.com/projects/ocfs2/dist/documentation/v1.2/ocfs2_faq.html
https://github.com/djs55/ocfs2-tools/blob/master/documentation/ocfs2_faq.txt
https://github.com/markfasheh/ocfs2-tools/blob/master/documentation/users_guide.txt
http://manpages.ubuntu.com/manpages/bionic/man5/ocfs2.cluster.conf.5.html
https://www.lisenet.com/2016/o2cb-cluster-with-dual-primary-drbd-and-ocfs2-on-oracle-linux-7/
https://oracle-base.com/articles/linux/ocfs2-on-linux
https://stackoverflow.com/questions/29835434/ocfs2-on-oracle-linux
http://muhammad-asif-dba.blogspot.com/2021/03/how-to-setup-ocfs2-on-oracle-linux.html
Howto OCFS2 https://wiki.evolix.org/HowtoOCFS2
https://support.oracle.com/knowledge/Oracle%20Linux%20and%20Virtualization/843479_1.html
https://marc.info/?l=ocfs2-users&m=116153949625849 ==> solved!