Ocfs2 Bifurcation

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 6

============================================================== OCFS2 configuration

======================================================

for ocfs2

ocfs2-tools-1.2.7-1.el4
ocfs2-2.6.9-89.0.0.0.1.EL-1.2.9-1.el4
ocfs2console-1.2.7-1.el4

note these are for oel 4.8 for different os refer to this link

http://oss.oracle.com/projects/ocfs2/

chkconfig --list o2cb

now login as root n then run it if u get a error of cluster stack not starting up

To run the utility, start an X Window session and log in as root:

londonl # ocfs2console

Select Cluster > Configure Nodes. If a cluster configuration file does not already
exist, then

a new file called /etc/ocfs2/cluster.conf will be created with a default cluster


name of ocfs2

add nodes n then ok it .

save it

you can propagate the configuration to the other nodes by

selecting Cluster > Propagate Configuration from the submenu

check on node 2 on this location to verify that cluster.conf has been creatd

as root user run

/etc/init.d/o2cb offline ocfs2


/etc/init.d/o2cb unload
/etc/init.d/o2cb configure

Put load in boot to yes and dead threshold to 61

Once the ocfs2 has been configure then you can format the partition
then try mounting the ocfs2 drive

mount -t ocfs2 -o datavolume,nointr /dev/sdb1 /ocfs

and add the following line to the /etc/fstab to mount the files system on boot

/dev/sdb1 /ocfs ocfs2 _netdev,datavolume,nointr 0 0

/sbin/mounted.ocfs2 /dev/sdbl

============================================================== o2cb
========================================

0CFS2 has its own cluster stack called o2cb. This stack includes a number of
components including

a node manager, heartbeat service, and distributed lock manager.

The /etc/in it/o2cb script performs most 0CFS2 management operations, many of which

require the cluster to be online.

============================================================= configure 0CFS2


====================================

do it on all the nodes

/etc/init.d/o2cb unload

londonl # /etc/init/o2cb configure

again dont hit enter rather type in the values

To use the 0CFS2 file system, the o2cb modules must be loaded. If you have not
configured the

modules to load automatically upon system start-up,

============================================== load them manually using the


following ========================================
londonl # /etc/init.d/o2cb load

every thing should be ok

to unload it

/etc/init.d/o2cb unload

================================================== online ; offline


=================================

To bring cluster ocf s2 online, use

londonl # /etc/init.d/o2cb online ocfs2

To bring cluster ocf s2 offline, use

londonl # /etc/init.d/o2cb offline ocfs2

=================================== restart, stop status the cluster,


=================================================

londonl # /etc/init.d/o2cb start ocfs2

The o2cb start command loads the modules and then brings the cluster file system
online. To
stop the 0CFS2 service, use

stop a cluster

londonl # /etc/init.d/o2cb stop ocfs2

To check the
current status of a RAC cluster, you can use the following command:

to check the status

londonl # /etc/init,d/o2cb status


================================================= Formatting an 0CFS2 Partition
=================================

To format a volume using ocf s2module, select Tasks > Format on the main menu.

or to create it with a label

londonl # mkfs.ocfs2 -L "u02" /dev/sdal

====================================================== mounting the ocfs2 system


=========================================

You can also use the mount command, specifying the device and mount directory, as
in the following
example:

londonl # mount -t ocfs2 /dev/sdal /u02

If the volume contains the Oracle Cluster Registry (OCR), voting disk file,
datafiles, redo logs,
archive logs, or control files, then it must be mounted with the -o data volume
mount option to
ensure that the files are opened with the odirect flag, which specifies direct I/O:

mount -t ocfs2 -o datavolume,nointr /dev/sdb1 /ocfs

and add the following line to the /etc/fstab to mount the files system on boot

/dev/sdb1 /ocfs ocfs2 _netdev,datavolume,nointr 0 0

You can specify a volume label when you format the 0CFS2 file system using the mkf
s. ocf s
command, as in the following example:
londonl # mkfs.ocfs2 -b 4k -C 32K -L "u02" -N 4 / dev/sdal

The 0CFS2 file system can now be mounted manually by specifying the mount point and
the
volume label:

londonl # mount -t ocfs2 -L u02 /u02

To mount the 0CFS2 file system automatically using the volume label, add an entry
to
/etc/f stab as in the following example:

LABEL=u02 /u02 ocfs2 datavolume,_netdev 0 0

The 0CFS2 file system can then be mounted using the following command:

londonl # mount /u02

Alternatively, you can mount the 0CFS2 file system using the label

londonl # mount -L u02

===================================================== mounted.ocfs2
=====================================================

Use mounted. ocf s2 to check the nodes currently mounting a specific device.
Options include -d,
which performs a quick detect, and -f (the default), which performs a full detect.
For example, by
default the mounted. ocf s2 command returns a list of nodes:

/sbin/mounted.ocfs2 /dev/sdbl

=========================================== Tuning an 0CFS2 Partition


==================================================

You can use the tuning tools to increase the number of


node slots, change the volume label, and increase the size of the journal file. The
o2cb cluster service
must be running to perform these operations.

You can increase the number of node slots using the tunef s. ocf s2 tool.

The volume must be unmounted on all nodes to perform this operation. For example,

to increase the number of node slots to eight for the volume assigned to device
/dev/sda2, use the following command:

londonl # tunefs.ocfs2 -N 8 /dev/sda2

Changing number of node slots from 4 to 8

This command creates one journal for each additional node. As in the following
example, you
can also change the volume label using the tunef s. ocf s2 tool:

londonl # tunefs.ocfs2 -L newlabel /dev/sda2

Changing volume label from ora_crs_home to newlabel

You can also change the journal size using the tunef s. ocf s2 tool. You can extend
the journal for
each of the assigned node slots as follows:

londonl # tunefs.ocfs2 -3 size=64M /dev/sda2

You might also like