Why would you use OCFS ====================== OCFS is designed to provide an alternative to using raw devices for Oracle 9iRAC. Managing raw devices is usually a difficult task. Also many DBA's and system administrators are familiar with filesystems. Another issues with raw devices on linux, is the fact that you are limited to only 255. There cannot be more than 255 /dev/raw entries. Type of files supported for OCFS ================================ At this time OCFS only supports Oracle Datafiles. This includes Redo Log files, Archive log files, Controlfiles and database Datafiles. The shared quorum disk file for the cluster manager and the shared init file (srv) are also supported. In the later part of 2003 we will also support Shared Oracle Home installs. OCFS blocksize ============== Format with 128kb blocksize is optimal size. Sizes between 2kb and 1mb are supported, the smaller blocksizes will have a performance penalty, but will be useful for the future when we will support regular files. 128kb blocksize means that every file created with content uses up a minimum of 128kb space on disk. Even if there is only 1 byte of data in the file. Splitting up files on partitions ================================ It is recommended to have the archive log files on a seperate disk partition and if possible each node should have it's own archive log partition. You can/should mount all these on every node in the cluster but only one node will be writing out archive log files to it's assigned partition. This reduces contention on space allocation if the database is heavily used and lots of archive logs are created on each node. All datafiles can reside on the same partition. An Oracle blocksize of 8kb is usually recommended and on OCFS this does not change. Performance of 8kb oracle blocks will be somewhat better. It is recommended to have an extent size that is the same on every tablespace in order to prevent disk fragmentation. OCFS will require contigious space on disk for every oracle or for the initial datafile creation. Eg. if you create a 1gb datafile in 1 command, it will require 1gb contiguous space on disk. If you then extend this datafile with 100mb, it will need another 100mb chunk on disk. This 100 mb chunk does not have to fall right behind the 1gb part. Partition size ============== OCFS will support partition sizes up to 1TB (tested) configurations. Since there is no volume management built into OCFS it is recommended to have hardware raid support and create a logical disk volume that is large enough. If this is not possible, depending on the linux distribution you run, lvm or md can be used. Note that having many mountpoints on a system will create a performance bottleneck, this means more than 50 or so partitions. (this is not related to ocfs specifically) Support for mount by label. If you create your ocfs volumes with a unique ocfs LABEL, mount will support this. RHAS2.1's mount errata release has updates for ocfs and it is possible to simply do mount -t ocfs -L mylabel /ocfs. This will be of great help if the device naming is variable. Performance =========== make sure updatedb is not running on the OCFS partitions. eg add ocfs to PRUNEFS= in /etc/updatedb.conf Troubleshooting =============== OCFS will print debug and error information into the system log, /var/log/messages or dmesg will show ocfs related errors. If a problem is suspect to be related to ocfs, a few things can be checked quickly. type 'dmesg' and see if there are messages starting with ocfs. run 'ps aux' and find out which process is hanging, (D state). if this does not change, strace -p will show if there is any process activity. Please also provide this information to Oracle Support. Sample configuration and layout =============================== Install the ocfs-kernel module, depending on your kernel uname -a will provide you with the current running kernel Install the UI tool and the format tools. ocfs-tools-XX.rpm and ocfs-support-XX.rpm Sample filesystem layout (same mountpoint on every node in the RAC cluster) /ocfs-data /ocfs-index /ocfs-ctrl-redo /ocfs-ctrl-redo2 /archive1 /archive2 /archive3 /archive4 ---------------- if you want to automatically load ocfs correctly with filesystems in /etc/fstab, please put the following line in /etc/modules.conf install ocfs load_ocfs and in /etc/fstab for every ocfs line add _netdev in the 4th field (usually says defaults) eg /dev/sda1 /ocfs ocfs _netdev 0 0 updatedb runs on ocfs by default disable this by putting ocfs in the PRUNEFS line in /etc/updatedb.conf