2.6. Creating and Mounting GFS File Systems

The procedure in this section describes how to create and mount GFS file systems using the GFS pools oracle_base, oraundo, oraindex, and oradata. In addition, the procedure describes how to bind raw devices to the GFS pools oraraw1 and oraraw2.

  1. Create GFS file systems as follows:

    rac1 # gfs_mkfs -p lock_gulm -t gfsrac:oracle_base -j 4 /dev/pool/oracle_base
    rac1 # gfs_mkfs -p lock_gulm -t gfsrac:oraundo -j 4 /dev/pool/oraundo 
    rac1 # gfs_mkfs -p lock_gulm -t gfsrac:oraindex -j 4 /dev/pool/oraindex  
    rac1 # gfs_mkfs -p lock_gulm -t gfsrac:oradata -j 4 /dev/pool/oradata  

    NoteNote
     

    The file systems need only be created from one node in the cluster.

  2. Make mount points for the file systems on each node that mounts the file systems. Example 2-14 shows making mount points on node rac1:

    rac1 # cd /mnt
    rac1 # mkdir oracle_base oraundo oraindex oradata 

    Example 2-14. Making Mount Points on node rac1

  3. Mount the GFS file systems on each node in the cluster that accesses GFS file systems. Example 2-15 shows mounting the GFS file systems on node rac1:

    rac1 # mount -t gfs /dev/pool/oracle_base /mnt/oracle_base
    rac1 # mount -t gfs /dev/pool/oraundo /mnt/oraundo
    rac1 # mount -t gfs /dev/pool/oraindex /mnt/oraindex
    rac1 # mount -t gfs /dev/pool/oradata /mnt/oradata

    Example 2-15. Mounting the GFS File Systems on Node rac1

  4. Set up the following raw devices on each node:

    • /dev/raw/raw1

    • /dev/raw/raw2

    NoteNote
     

    Oracle9i RAC requires two raw devices: one for the quorum file and one for the shared configuration file.

  5. Bind the raw devices on each node to the GFS pool raw devices; that is, bind /dev/raw/raw1 to /dev/pool/oraraw1 and bind /dev/raw/raw2 to /dev/pool/oraraw2. In addition, make the bindings persistent by including the bindings in the /etc/sysconfig/rawdevices configuration file. (Including the binding in that file causes the bindings to be recreated during reboot.) To bind the raw devices and make the bindings persistent, follow these sub-steps:

    1. Bind the raw devices to the GFS pool raw devices by editing the /etc/sysconfig/rawdevices configuration file according to Example 2-16. Editing the file makes the binding persistent.

      # raw device bindings
      # format:  <rawdev> <major> <minor>
      #          <rawdev> <blockdev>
      # example: /dev/raw/raw1 /dev/sda1
      #          /dev/raw/raw2 8 5
      /dev/raw/raw1 /dev/pool/oraraw1  <--- Added statement 
      /dev/raw/raw2 /dev/pool/oraraw2  <--- Added statement 

      Example 2-16. Editing the /etc/sysconfig/rawdevices File

    2. Make the binding take effect by running the following command at each node:

      # service rawdevices restart

      To check that the binding has taken effect, run the following command at each node:

      # raw -qa

      To make sure that raw devices are active upon reboot, run the chkconfig command as shown in Example 2-17 and verify that init levels 3, 4, and 5 indicate "on":

      # chkconfig --list rawdevices
      rawdevices      0:off   1:off   2:off   3:on    4:on    5:on    6:off

      Example 2-17. Checking for Active status of Raw Devices

  6. Proceed to Chapter 3 Installing and Configuring Oracle9i RAC.