Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

SUSE Linux Enterprise Server (SLES 10) Installation and Administration
Previous Page Home Next Page

14.2 Creating an OCFS2 Volume

Follow the procedures in this section to configure your system to use OCFS2 and to create OCFS2 volumes.

14.2.1 Prerequisites

Before you begin, do the following:

  • Initialize, carve, or configure RAIDs on the SAN disks, as needed, to prepare the devices you plan to use for your OCFS2 volumes. Leave the devices as free space.

    We recommend that you store application files and data files on different OCFS2 volumes, but it is only mandatory to do so if your application volumes and data volumes have different requirements for mounting. For example, the Oracle RAC database volume requires the datavolume and nointr mounting options, but the Oracle Home volume should never use these options.

  • Make sure that the ocfs2console, and ocfs2-tools packages are installed. Use YaST or command line methods to install them if they are not. For YaST instructions, see OCFS2 Packages.

14.2.2 Configuring OCFS2 Services

Before you can create OCFS2 volumes, you must configure OCFS2 services. In the following procedure, you generate the /etc/ocfs2/cluster.conf file, save the cluster.conf file on all nodes, and create and start the O2CB cluster service (o2cb).

Follow the procedure in this section for one node in the cluster.

  1. Open a terminal window and log in as the root user or equivalent.

  2. If the o2cb cluster service is not already enabled, enter

    chkconfig --add o2cb
    

    When you add a new service, chkconfig ensures that the service has either a start or a kill entry in every run level.

  3. If the ocfs2 service is not already enabled, enter

    chkconfig --add ocfs2
    
  4. Configure the o2cb cluster service driver to load on boot.

    1. Enter

      /etc/init.d/o2cb configure
      
    2. At the Load O2CB driver on boot (y/n) [n] prompt, enter

      y
      

      (yes) to enable load on boot.

    3. At the Cluster to start on boot (Enter “none” to clear) [ocfs2] prompt, enter

      none
      

      This choice presumes that you are setting up OCFS2 for the first time or resetting the service. You specify a cluster name in the next step when you set up the /etc/ocfs2/cluster.conf file.

  5. Use the ocfs2console utility to set up and save the /etc/ocfs2/cluster.conf file to all member nodes of the cluster.

    This file should be the same on all the nodes in the cluster. Use the following steps to set up the first node. Later, you can use the ocfs2console to add new nodes to the cluster dynamically and to propagate the modified cluster.conf file to all nodes.

    However, if you change other settings, such as the cluster name and IP address, you must restart the cluster for the changes to take effect, as described in Step 6.

    1. Open the ocfs2console GUI by entering

      ocfs2console
      
    2. In the ocfs2console, select Cluster > Cluster Nodes.

      If cluster.conf is not present, the console will create one with a default cluster name of ocfs2. Modify the cluster name as desired.

    3. In the Node Configuration dialog box, click Add to open the Add Node dialog box.

    4. In the Add Node dialog box, specify the unique name of your primary node, a unique IP address (such as 192.168.1.1), and the port number (optional, default is 7777), then click OK.

      The ocfs2console console assigns node slot numbers sequentially from 0 to 254.

    5. In the Node Configuration dialog box, click Apply, then click Close to dismiss the Add Node dialog box.

    6. Click Cluster Propagate Configuration to save the cluster.conf file to all nodes.

  6. If you need to restart the OCFS2 cluster for the changes to take effect, enter the following lines, waiting in between for the process to return a status of OK.

    /etc/init.d/o2cb stop
    
    /etc/init.d/o2cb start
    

14.2.3 Creating an OCFS2 Volume

Creating an OCFS2 file system and adding new nodes to the cluster should be performed on only one of the nodes in the cluster.

  1. Open a terminal window and log in as the root user or equivalent.

  2. If the O2CB cluster service is offline, start it by entering the following command, then wait for the process to return a status of OK.

    /etc/init.d/o2cb online ocfs2
    

    Replace ocfs2 with the actual cluster name of your OCFS2 cluster.

    The OCFS2 cluster must be online, because the format operation must first ensure that the volume is not mounted on any node in the cluster.

  3. Create and format the volume using one of the following methods:

    • In EVMSGUI, go to the Volumes page, select Make a file system > OCFS2, then specify the configuration settings.

    • Use the mkfs.ocfs2 utility. For information about the syntax for this command, refer to the mkfs.ocfs2 man page.

    • In the ocfs2console, click Tasks > Format, select a device in the Available Devices list that you want to use for your OCFS2 volume, specify the configuration settings for the volume, then click OK to format the volume.

    See the following table for recommended settings.

    OCFS2 Parameter

    Description and Recommendation

    Volume label

    A descriptive name for the volume to make it uniquely identifiable when it is mounted on different nodes.

    Use the tunefs.ocfs2 utility to modify the label as needed.

    Cluster size

    Cluster size is the smallest unit of space allocated to a file to hold the data.

    Options are 4, 8, 16, 32, 64, 128, 256, 512, and 1024 KB. Cluster size cannot be modified after the volume is formatted.

    Oracle recommends a cluster size of 128 KB or larger for database volumes. Oracle also recommends a cluster size of 32 or 64 KB for Oracle Home.

    Number of node slots

    The maximum number of nodes that can concurrently mount a volume. On mounting, OCFS2 creates separate system files, such as the journals, for each of the nodes. Nodes that access the volume can be a combination of little-endian architectures (such as x86, x86-64, and ia64) and big-endian architectures (such as ppc64 and s390x).

    Node-specific files are referred to as local files. A node slot number is appended to the local file. For example: journal:0000 belongs to whatever node is assigned to slot number 0.

    Set each volume’s maximum number of node slots when you create it, according to how many nodes that you expect to concurrently mount the volume. Use the tunefs.ocfs2 utility to increase the number of node slots as needed; the value cannot be decreased.

    Block size

    The smallest unit of space addressable by the file system. Specify the block size when you create the volume.

    Options are 512 bytes (not recommended), 1 KB, 2 KB, or 4 KB (recommended for most volumes). Block size cannot be modified after the volume is formatted.

SUSE Linux Enterprise Server (SLES 10) Installation and Administration
Previous Page Home Next Page

 
 
  Published Courtesy of Novell, Inc. Design by Interspire