Previous  |  Next  >  
Product: Storage Foundation for Oracle RAC Guides   
Manual: Storage Foundation 4.1 for Oracle RAC Installation and Configuration   

Oracle File Mapping (ORAMAP)

VERITAS has defined and implemented two libraries: libvxoramap_64.so (HPUX PA) and libvxoramap_64.sl (HPUX IA). These two libraries provide a mapping interface to Oracle9i release 2 or a later release. libvxoramap_64.so serves as a bridge between the Oracle set of storage APIs (ORAMAP) and VERITAS Federated Mapping Service (VxMS), a library that assists in the development of distributed SAN applications that must share information about the physical location of files and volumes on a disk.

The VERITAS Storage Mapping option enables you to view the complete I/O topology mapping of datafiles from logical volumes to actual physical devices. Use this information to determine the exact location of an Oracle data block on a physical device and to help identify hot spots.


Note   Note    Mapping requires Oracle 9.2.0.3 or a later version.

Mapping Components

This section covers the mapping components in the System Global Area (SGA) and the representation of these components by Oracle. You must understand these components to interpret the mapping information in Oracle dynamic performance views.

The mapping information in the dynamic performance views consists of:

  • File components
  • A mapping file component is a mapping structure describing a file. This component provides a set of attributes for a file, including the size, number of extents, and type. V$MAP_FILE exports file components to the user.
  • File extent components
  • A mapping file extent component describes a contiguous group of blocks residing on one element. The description specifies the device offset, extent size, file offset, extent type (Data or Parity), and name of the element where the extent resides.
  • Element components
  • A mapping element component is a mapping structure that describes a storage component within the I/O stack. Elements can be mirrors, stripes, partitions, RAID5, concatenated elements, and disks.
    This component contains information about the mapping structure, such as the size, type, number of subelements, and a brief description of the element. V$MAP_ELEMENT exports element components are exported to the user.
  • Subelement components
  • A mapping subelement component describes the link between an element and the next element in the I/O stack. The subelement component contains the subelement number and size, as well as the element name for the subelement and element offset. Subelement components are exported to the user through V$MAP_SUBELEMENT.

These four types of mapping components describe the mapping information for an Oracle instance.

Storage Mapping Views

The mapping information that is captured appears in Oracle dynamic performance views. Review the brief descriptions of these views below; refer to Oracle documentation for details.

View Description

V$MAP_LIBRARY

Contains a list of all mapping libraries dynamically loaded by the external process.

V$MAP_FILE

Contains a list of all file mapping structures in the shared memory of the instance.

V$MAP_FILE_EXTENT

Contains a list of all the file extent mapping structures in the shared memory of the instance.

V$MAP_ELEMENT

Contains a list of all the element mapping structures in the SGA of the instance.

V$MAP_EXT_ELEMENT

Contains supplementary information for all element mapping structures.

V$MAP_SUBELEMENT

Contains a list of all subelement mapping structures in the shared memory of the instance.

V$MAP_COMP_LIST

Describes the component list associated with the element name.

V$MAP_FILE_IO_STACK

Contains the hierarchical arrangement of storage containers for the file. This information appears as a series of rows. Each row represents a level in the hierarchy.

Verifying Oracle File Mapping Setup

  1. Verify $ORACLE_HOME is ready for Oracle file mapping (ORAMAP):
    cd $ORACLE_HOME/rdbms/filemap/bin
    ls –l
    -r-xr-x--- 1 root system 900616 Apr 08 19:16 fmputl
    -r-sr-xr-x 1 root system 14614 Apr 08 19:16 fmputlhp
  2. Confirm the following items and make the appropriate corrections:

    • root owns fmputlhp and the setud bit is set.
    • The permissions for fmputlhp are -r-sr-xr-x.
    • The permissions for fmputl are -r-xr-x---.

Enabling Oracle File Mapping

  1. Ensure that the filemap.ora file exists and contains a valid entry for the VERITAS mapping library for Oracle storage mapping:
      # cd $ORACLE_HOME/rdbms/filemap/etc
      # cat filemap.ora

    For 64-bit Oracle, the filemap.ora file should contain the following setting:


      lib=VERITAS:/opt/VRTSormap/lib/libvxoramap_64.so for PA
      lib=VERITAS:/opt/VRTSormap/lib/libvxoramap_64.sl for IA
  2. After verifying that the system uses the VERITAS library for Oracle storage mapping, set the file_mapping initialization parameter to true:
      SQL> alter system set file_mapping=true;

    The default setting for the file_mapping initialization parameter is false. You do not need to shut down the instance to set this parameter. Setting file_mapping=true starts the fmon background process.


    Note   Note    To enable storage mapping whenever starting an instance, set the file_mapping initialization parameter to true in the init.ora file.

Accessing Dynamic Performance Views

  1. Confirm the VERITAS mapping library for Oracle file mapping is enabled:
      SQL> select lib_idx idx, lib_name name, vendor_name vname, \
         path_name path from v$map_library;

          IDX     NAME                VNAME      PATH
          --------     ------------------------------  ----------                    ------------------------------
          1      Veritas ORAMAP API                Veritas     /opt/VRTSormap/lib/libvxoramap.so
  2. After enabling storage mapping, map Oracle datafiles using the DBMS_STORAGE_MAP package.

    For more information about features and capabilities of the DBMS_STORAGE_MAP package, see the Oracle documentation.

  3. Use SQL commands to display the mapping information captured in the dynamic performance views. To display the contents of v$map_file, type:
      SQL> select file_name name, file_map_idx idx, \
         file_status status, file_type type, file_structure str, \
         file_size fsize, file_nexts nexts from v$map_file;

    To display the contents of v$map_file_extent, type:


      SQL> select * from v$map_file_extent;

    To display the contents of v$map_element, type:


      SQL> select elem_idx idx, elem_name, elem_type type, elem_size, \
         elem_nsubelem nsub, elem_descr, stripe_size from \
         v$map_element;

    To display the contents of v$map_subelement, type:


      SQL> select * from v$map_subelement;

    To display all the elements within the I/O stack for a specific file, type:


      SQL> with fv as
       2     (select file_map_idx, file_name from v$map_file
       3     where file_name = '/ora92/dbs/qio10m.dbf')
       4  select
       5     fv.file_name, lpad(' ', 4 * (level - 1)) || \             
            el.elem_name elem_name, el.elem_size, el.elem_type, \
            el.elem_descr
       6  from
       7     v$map_subelement sb, v$map_element el, fv,
       8     (select unique elem_idx from v$map_file_io_stack io, fv
       9     where io.file_map_idx = fv.file_map_idx) fs
       10     where el.elem_idx = sb.child_idx
       11     and fs.elem_idx = el.elem_idx
       12     start with sb.parent_idx in
       13     (select distinct elem_idx
       14     from v$map_file_extent fe, fv
       15     where fv.file_map_idx = fe.file_map_idx)
       16     connect by prior sb.child_idx = sb.parent_idx;

Using Oracle Enterprise Manager

Oracle Enterprise Manager is a Web console for managing Oracle databases. Use this GUI to perform administrative tasks such as creating tablespaces, tables, and indexes; managing user security; and backing up and recovering your database. Oracle Enterprise Manager enables you to view information on the performance and status of a database instance. Refer to Oracle documentation for details on Oracle Enterprise Manager.

From Oracle Enterprise Manager, view storage mapping information and a graphical display of the storage layout:

  1. Start Oracle Enterprise Manager and select a database from the object tree of the Oracle Enterprise Manager Console.
  2. Expand the Databases icon and select the desired database.

    The Database Connect Information window appears.

  3. Enter a user name and password to log in to the database and click OK.
  4. In the object tree, expand the Storage icon.
  5. Under the Storage icon, expand the Datafiles icon.
  6. Select the datafile for which you want to view storage layout information.
  7. In the right pane, click the Storage Layout tab.
  8. Expand the objects to display their storage layout.

    Within the Oracle Enterprise Manager Console, you can point to an object on the screen to view a description in a pop-up field. If an object name or path appears truncated, point to it and the pop-up field will display the full object name and path. To view detailed information about the object, right-click the object and click View Details.

  9. By default, storage layout information appears in tabular format; the Tabular Display icon is selected. To view a graphical display of the storage layout, click the Graphical Display icon.
  10. Expand the objects to display their storage layout information graphically.
  11. To exit, choose Exit from the File menu.
 ^ Return to Top Previous  |  Next  >  
Product: Storage Foundation for Oracle RAC Guides  
Manual: Storage Foundation 4.1 for Oracle RAC Installation and Configuration  
VERITAS Software Corporation
www.veritas.com