Previous  |  Next  >  
Product: Storage Foundation for Databases Guides   
Manual: Storage Foundation 4.1 for Oracle Administrator's Guide   

Creating Database Files as Quick I/O Files Using qiomkfile

The best way to preallocate space for database files and to make them accessible using the Quick I/O interface is to use the qiomkfile command. You can use the qiomkfile command to create Quick I/O files for either temporary or permanent tablespaces.


Prerequisites

  • You can create Quick I/O files only on VxFS file systems.
  • If you are creating database files on an existing file system, run fsadm (or similar utility) to report and eliminate fragmentation.
  • You must have read/write permissions on the directory in which you intend to create Oracle Quick I/O files.


qiomkfile Options

-a

Creates a symbolic link with an absolute path name for a specified file. Use the -a option when absolute path names are required. However, the default is to create a symbolic link with a relative path name.

-e

Extends a file by a specified amount to allow Oracle tablespace resizing. See Extending a Quick I/O File for more information.

-h

Specifies the Oracle datafile header size. This option specifies a header that will be allocated in addition to the size specified because Oracle requires one additional database block for all its datafiles. If this option is used, the resulting file can be used as an Oracle datafile. When creating an Oracle datafile, the header size should be equal to the Oracle block size (as determined by the DB_BLOCK_SIZE parameter). If the header size is missing when the -h option is used, a 32K header will be allocated.

-r

Increases the file to a specified size to allow Oracle tablespace resizing. See Extending a Quick I/O File for more information.

-s

Specifies the space to preallocate for a file in bytes, kilobytes, megabytes, gigabytes, or sectors (1024 bytes) by adding a k, K, m, M, g, G, s, or S suffix. The default is bytes---you do not need to attach a suffix to specify the value in bytes. The size of the file that is preallocated is the total size of the file (including the header) rounded to the nearest multiple of the file system block size.


Caution  Caution    Exercise caution when using absolute path names. Extra steps may be required during database backup and restore procedures to preserve symbolic links. If you restore files to directories different from the original paths, you must change the symbolic links that use absolute path names to point to the new path names before the database is restarted.

Usage Notes

  • The qiomkfile command creates two files: a regular file with preallocated, contiguous space, and a file that is a symbolic link pointing to the Quick I/O name extension.
  • See the qiomkfile(1M) manual page for more information.

  To create a database file as a Quick I/O file using qiomkfile

  1. Create a database file using the qiomkfile command:
                $ /opt/VRTS/bin/qiomkfile -h headersize -s file_size \
        /mount_point/filename
  2. Create tablespaces on this file using SQL*Plus statements, for example:
                $ sqlplus /nolog
       SQL> connect / as sysdba
                SQL> create tablespace ts1 datafile '/mount_point/filename' \
    size 100M reuse;
                SQL> exit;

Example

  • To create a 100MB database file named dbfile on the VxFS file system /db01 using a relative path name:

  •    $ /opt/VRTS/bin/qiomkfile -h 32k -s 100m /db01/dbfile
       $ ls -al
       -rw-r--r--        1 oracle      dba     104890368        Oct 2 13:42        .dbfile
    lrwxrwxrwx 1 oracle dba 19 Oct 2 13:42 dbfile -> \
    .dbfile::cdev:vxfs:

In this example, qiomkfile creates a regular file named /db01/.dbfile, which has the real space allocated. Then, qiomkfile creates a symbolic link named /db01/dbfile. This symbolic link is a relative (soft) link to the Quick I/O interface for /db01/.dbfile, that is, to the .dbfile::cdev:vxfs: file. The symbolic link allows .dbfile to be accessed by any database or application using its Quick I/O interface.

 ^ Return to Top Previous  |  Next  >  
Product: Storage Foundation for Databases Guides  
Manual: Storage Foundation 4.1 for Oracle Administrator's Guide  
VERITAS Software Corporation
www.veritas.com