Tag Archives: storage

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