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

Identifying VxFS Files to Convert to Quick I/O Using qio_getdbfiles

You can use the qio_getdbfiles command to identify VxFS files before converting them to Quick I/O files. Only VxFS files may be converted to Quick I/O.

The qio_getdbfiles command queries the database and gathers a list of datafiles to be converted to Quick I/O. The command requires direct access to the database.


Prerequisites

  • To use this command for Oracle, the ORACLE_SID environment variable must be set.
  • You must be logged in as the Database Administrator.


Usage Notes

  • The -T option forces the behavior for a specific database type. Use this option in environments with more than one type of database.
  • See the qio_getdbfiles(1M) manual page for more information.

  To identify the VxFS files to convert to Quick I/O

  1. Use the qio_getdbfiles command as follows:
      $ /opt/VRTSdbed/bin/qio_getdbfiles [-T ora|syb|db2]

    where -T forces behavior for a specific database type. Use this option in environments with more than one type of database.

    The qio_getdbfiles command stores the filenames and file sizes in bytes in a file called mkqio.dat.

  2. View the mkqio.dat file:
      $ cat mkqio.dat

    The mkqio.dat file contains the database filenames that can be converted to Quick I/O files. The format of the file is a list of paired file paths and file sizes. For example:


            /database/dbfiles.001 1024000
            /database/dbfiles.002 2048000

Converting VxFS Files to Quick I/O Using qio_convertdbfiles

After running qio_getdbfiles, you can use the qio_convertdbfiles command to convert database files to use Quick I/O. This command is for use with VxFS file systems only.

The qio_convertdbfiles command converts regular files or symbolic links that point to regular files on VxFS file systems to Quick I/O. The qio_convertdbfiles command converts only those files listed in the mkqio.dat file to Quick I/O. The mkqio.dat file is created by running qio_getdbfiles. It can also be created manually.


Prerequisites

  • To use this command for Oracle, the ORACLE_SID environment variable must be set.
  • You must be logged in as the Database Administrator to use this command.


Usage Notes

  • The -T option forces the behavior for a specific database type. The database options that are supported are ora, syb, and db2. Use this option in environments with more than one type of database.
  • The qio_convertdbfiles command expects all files to be owned by the database administrator.
  • The -a option changes regular files to Quick I/O files using absolute pathnames. Use this option when symbolic links need to point to absolute pathnames. By default, relative pathnames are used.
  • The -f option reports on current fragmentation levels for files listed in mkqio.dat. Fragmentation is reported at four levels: not fragmented, slightly fragmented, fragmented, and highly fragmented.
  • Converting existing database files to Quick I/O is not recommended if the files are fragmented. In this case, it is recommended that you create new files with the qiomkfile command (these files are guaranteed not to be fragmented) and then convert the data from the old files (using a command such as dd).
  • The -h option displays a help message.
  • The -i option creates extra links for all database files and log files in the /dev directory to support the SAP brbackup command.
  • The -u option changes Quick I/O files back to regular files.
  • Ensure that the database is shut down before running qio_convertdbfiles.
  • See the qio_convertdbfiles(1M) manual page for more information.

  To convert VxFS files to Quick I/O files

  1. After running the qio_getdbfiles command, shut down the database:
    Caution  Caution    Running qio_convertdbfiles with any option except -f while the database is up and running can cause severe problems for your database, including data loss and corruption. Make sure the database is shut down before running the qio_convertdbfiles command.
  2. Run the qio_convertdbfiles command to convert the list of files in mkqio.dat to Quick I/O files:
      $ /opt/VRTSdbed/bin/qio_convertdbfiles
    Note   Note    You must remove any non-VxFS files from mkqio.dat before running qio_convertdbfiles. The qio_convertdbfiles command will display an error message if any of the database files in mkqio.dat are not on a VxFS file system.
  3. Restart the database to access these database files using the Quick I/O interface.

  To undo a previous run of qio_convertdbfiles

To undo a previous run of qio_convertdbfiles and change Quick I/O files back to regular VxFS files:


/opt/VRTSdbed/bin/qio_convertdbfiles -u
.dbfile::cdev:vxfs: --> dbfile
Note   Note    If the database is up and running, an error message will be displayed stating that you need to shut it down before you can run qio_convertdbfiles.

Example

In this example a regular VxFS file named dbfile is converted to Quick I/O and then converted back to a regular VxFS file:

Get information about the file:


/opt/VRTSdbed/bin/qio_getdbfiles
cat mkqio.dat
dbfile 104800000

Shut down the database and convert the file to Quick I/O:


/opt/VRTSdbed/bin/qio_convertdbfiles

ls -alL d* .d*
-rw-r--r-- 1 oracle dba 104857600 May 2 13:42 .dbfile
crw-r--r-- 1 oracle dba 45,1 May 3 12:18 dbfile

ls -al d* .d*
-rw-r--r-- 1 oracle dba 104857600 May 2 14:42 .dbfile
lrwxrwxrwx 1 oracle dba 19 May 3 12:18 dbfile -> .dbfile::cdev:vxfs:

The qio_convertdbfiles command renames the file dbfile to .dbfile and creates a symbolic link to .dbfile with the Quick I/O extension. By default, the symbolic link uses a relative path name.

Start up the database.

To undo a previous run of qio_convertdbfiles and change Quick I/O files back to regular VxFS files:


/opt/VRTSdbed/bin/qio_convertdbfiles -u
.dbfile::cdev:vxfs: --> dbfile

Recreating Quick I/O Files Using qio_recreate

You can use the qio_recreate command to automatically recreate Quick I/O files when the database is recovered.


Prerequisites

  • You must be logged in as the Database Administrator to use this command.


Usage Notes

  • The qio_recreate command expects to find a file named mkqio.dat in the directory where the command is run. The mkqio.dat file contains a list of the Quick I/O files used by the database and their sizes. If the mkqio.dat file is not in the directory, you will be prompted to create it using qio_getdbfiles. For more information, see Identifying VxFS Files to Convert to Quick I/O Using qio_getdbfiles.
  • The qio_recreate command supports conventional Quick I/O files only (that is, Quick I/O files in the following form: file --> .file::cdev:vxfs:). In creating a Quick I/O file, the qio_convertdbfiles command renames the regular VxFS file, file, to .file with the Quick I/O extension (:cdev::vxfs:) and creates a symbolic link to it. By default, the symbolic link uses a relative path name.
  • There are no options for the qio_recreate command and no output is returned when the command runs successfully.
  • The qio_recreate command follows these rules in recreating Quick I/O files when a database is recovered:
    • If a Quick I/O file (.file::cdev:vxfs:) is missing, then qio_recreate recreates it.
    • If both a symbolic link (file) and its associated Quick I/O file (.file::cdev:vxfs:) are missing, qio_recreate recreates both the symbolic link and the Quick I/O file.
    • If a symbolic link (file) from a regular VxFS file to its associated Quick I/O file (.file::cdev:vxfs:) is missing, then qio_recreate recreates the symbolic link.
    • If a Quick I/O file (.file::cdev:vxfs:) is missing and the regular VxFS file that is symbolically linked to it is not the same one that originally created it, then qio_recreate issues a warning message and does not recreate the Quick I/O file.
    • If a Quick I/O file (.file::cdev: vxfs:) is smaller than the size listed in mkqio.dat, qio_recreate issues a warning message.

  • See the qio_recreate(1M) manual page for more information.

  To automatically recreate Quick I/O files when the database is recovered

Use the qio_recreate command as follows:


/opt/VRTSdbed/bin/qio_recreate
 ^ 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