Tag Archives: configure

Formatting of OCFS2 Shared Storage

The Oracle OCFS2 file system can be used to format shared storage for multiple node access. To accomplish this task, OCFS2 rpm must be installed and configured. Below is the procedure for preparing the shared disks for use, once OCFS2 has been installed and configured.

1. Logon to one of your Oracle servers as the root user.

2. Locate the shared storage presented in the directory /dev/mapper on both nodes.

-mylinux1
[root@mylinux1 ~]# ll /dev/mapper
total 0
crw——- 1 root root 10, 63 Jan 22 17:44 control
brw-rw—- 1 root disk 253, 3 Jan 22 17:45 DATA-50GB-02
brw-rw—- 1 root disk 253, 8 Jan 22 17:45 DATA-50GB-03
brw-rw—- 1 root disk 253, 1 Jan 22 17:45 VOTE-1GB-05
brw-rw—- 1 root disk 253, 2 Jan 22 17:45 VOTE-1GB-06
brw-rw—- 1 root disk 253, 4 Jan 22 17:45 HOME-50GB-02
[root@mylinux1 ~]#

-mylinux2
[root@mylinux2 ~]# ll /dev/mapper
total 0
crw——- 1 root root 10, 63 Jan 22 17:44 control
brw-rw—- 1 root disk 253, 3 Jan 22 17:45 DATA-50GB-02
brw-rw—- 1 root disk 253, 8 Jan 22 17:45 DATA-50GB-03
brw-rw—- 1 root disk 253, 1 Jan 22 17:45 VOTE-1GB-05
brw-rw—- 1 root disk 253, 2 Jan 22 17:45 VOTE-1GB-06
brw-rw—- 1 root disk 253, 4 Jan 22 17:45 HOME-50GB-03
[root@mylinux2 ~]#

3. The shared storage will be mounted on each node of the RAC. In this example our shared storage includes the following:


/dev/mapper/DATA-50GB-02
/dev/mapper/DATA-50GB-03
/dev/mapper/VOTE-1GB-05
/dev/mapper/VOTE-1GB-06

4. As the root user, format each shared storage device with the following command: NOTE: formatting of the share disks is only performed on a single node, repeating on additional nodes will destroy all information.

Example:

/sbin/mkfs.ocfs2 /dev/mapper/DATA-50GB-02

[root@mylinux1 ~]# /sbin/mkfs.ocfs2 /dev/mapper/DATA-50GB-02
mkfs.ocfs2 1.4.4
Cluster stack: classic o2cb
Overwriting existing ocfs2 partition.
Proceed (y/N): y
Label:
Features: sparse backup-super unwritten inline-data strict-journal-super
Block size: 2048 (11 bits)
Cluster size: 4096 (12 bits)
Volume size: 1069252608 (261048 clusters) (522096 blocks)
Cluster groups: 17 (tail covers 7096 clusters, rest cover 15872 clusters)
Extent allocator size: 4194304 (1 groups)
Journal size: 33554432
Node slots: 2
Creating bitmaps: done
Initializing superblock: done
Writing system files: done
Writing superblock: done
Writing backup superblock: 0 block(s)
Formatting Journals: done
Growing extent allocator: done
Formatting slot map: done
Writing lost+found: done
mkfs.ocfs2 successful

[root@mylinux1 ~]#

This procedure is repeated for each shared storage device.

Larry J. Catt, OCP 9i, 10g
oracle@allcompute.com
www.allcompute.com

Download and Installation of OCFS2 RPMs for Linux

Oracle Cluster File System 2 (OCFS2) is a file system which allows for multiple hosts to access the same files on a shared storage at the same time. This type of access is required for deployment of an Oracle RAC system. In this article we will cover the procedure to download and install the RPMs for OCFS2 to support shared storage on an Oracle RAC system.

1. Determine the current Kernel installed on all RAC nodes. NOTE: The kernels must be the same on every RAC node.

NODE 1:
[root@mylinux1 etc]# uname -r
2.6.18-194.32.1.el5
[root@mylinux1 etc]#

NODE2:
[root@mylinux2 ~]# uname -r
2.6.18-194.32.1.el5
[root@mylinux2 ~]#

2. Go to the URL: http://oss.oracle.com/projects/ocfs2/ , select the download tab and navigate to the correct rpm download for your kernel.

2.6.18-194.32.1.el5
2011.01.20
Packages for RHEL5 2.6.18-194.32.1.el5

3. Go to the URL: http://oss.oracle.com/projects/ocfs2-tools/, select the download tab and navigate to the correct rpm downloads for your OS. Example for this OS we download the following files:

ocfs2-tools-1.4.4-1.el5.x86_64.rpm
2010.04.19 7a2f59a05f2cf1bea24dc04f34b09371
OCFS2 tools
ocfs2-tools-debuginfo-1.4.4-1.el5.x86_64.rpm
2010.04.19 91d6e65e902dedcd28e8e4f2d9fb4271
OCFS2 tools debuginfo
ocfs2-tools-devel-1.4.4-1.el5.x86_64.rpm
2010.04.19 2e47beaab89ebba8b1d276fb894184d5
OCFS2 tools libraries/header
ocfs2console-1.4.4-1.el5.x86_64.rpm
2010.04.19 78ccf0cf8564a6d5b48d534c7f3a07bc

4. Once the download completes transfer all the files to all nodes in the cluster. It is best at this point to create a temporary directory under /tmp, to store your files with the following command.

[root@mylinux1 tmp]# mkdir oracle_tmp
[root@mylinux1 tmp]# chmod 777 oracle_tmp
[root@mylinux1 tmp]#

5. Once the files are in location, logon as root and install using the rpm command on all nodes of the RAC.

rpm -Uvh ocfs2-tools-1.4.4-1.el5.x86_64.rpm
rpm -Uvh ocfs2-2.6.18-194.32.1.el5-1.4.7-1.el5.x86_64.rpm
rpm –Uvh ocfs2console-1.4.4-1.el5.x86_64.rpm

[root@mylinux1 oracle_tmp]# rpm -Uvh ocfs2-tools-1.4.4-1.el5.x86_64.rpm
warning: ocfs2-tools-1.4.4-1.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing… ########################################### [100%]
1:ocfs2-tools ########################################### [100%]
[root@mylinux1 oracle_tmp]# rpm -Uvh ocfs2-2.6.18-194.32.1.el5-1.4.7-1.el5.x86_64.rpm
warning: ocfs2-2.6.18-194.32.1.el5-1.4.7-1.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing… ########################################### [100%]
1:ocfs2-2.6.18-194.32.1.el########################################### [100%]
[root@mylinux1 oracle_tmp]# rpm -Uvh ocfs2console-1.4.4-1.el5.x86_64.rpm
warning: ocfs2console-1.4.4-1.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing… ########################################### [100%]
1:ocfs2console ########################################### [100%]
[root@mylinux1 oracle_tmp]#

This completes the download and installation of OCFS2 on Linux to support an Oracle RAC system.

Larry J. Catt, OCP 9i, 10g
oracle@allcompute.com
www.allcompute.com