Wednesday, March 14, 2007

[OCFS2] setup example

I have 2 servers

cdb01
cdb02


And I want to install OCFS2
1. Download OCFS2 (http://oss.oracle.com) , install and enable o2cb
#rpm -ivh ocfs2*2 nodes
# /etc/init.d/o2cb enable (both nodes)

2. Create configfile

#ocfs2console (run on cdb01)


-- copyfile /etc/ocfs2/cluster.conf to node II

#cat /etc/ocfs2/cluster.conf
node:
ip_port = 17777
ip_address = 10.10.50.11
number = 0
name = cdb01
cluster = ocfs2
node:
ip_port = 17777
ip_address = 10.10.50.12
number = 1
name = cdb02
cluster = ocfs2
cluster:
node_count = 2
name = ocfs2

--- load and mount disks
#/etc/init.d/o2cb load
#/etc/init.d/o2cb start
edit /etc/fstab
/dev/sda10 /shares ocfs2 rw,_netdev,heartbeat=local 0 0


---- on ocfs2
#/etc/init.d/o2cb load ocfs2
#/etc/init.d/ocfs2 start



----- edit kernel
#cat /boot/grub/grub.conf

title Red Hat Enterprise Linux AS (2.6.9-42.ELsmp)
root (hd0,0) kernel /vmlinuz-2.6.9-42.ELsmp ro root=LABEL=/ rhgb quiet elevator=deadline
initrd /initrd-2.6.9-42.ELsmp.img


# resolve kernel panic (reboot when panic)
# cat /etc/sysctl.conf
kernel.panic = 60

---- check heartbeat

# cat /etc/sysconfig/o2cb
# O2CB_ENABELED: 'true' means to load the driver on boot.
O2CB_ENABLED=true
# O2CB_BOOTCLUSTER: If not empty, the name of a cluster to start.
O2CB_BOOTCLUSTER=ocfs2
# O2CB_HEARTBEAT_THRESHOLD: Iterations before a node is considered dead.
O2CB_HEARTBEAT_THRESHOLD=61

3 comments:

Anonymous said...

I am trying the same, however I do not get the ocfs2 partition visible from the second node.
mount -t ocfs2 -L /u03 -o datavolume /u03
mount: no such partition found

What may I be missing?
Thanks.

HunterX said...
This comment has been removed by the author.
HunterX said...

try:

$ mount -t ocfs2 -L /u03 -o rw datavolume /u03

If you still see the Problem:

try to
NO LABEL
$ mount -t ocfs2 -o rw datavolume /u03