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

Converting From Raw Devices

If the database is currently using raw disks or volumes, use one of the following procedures to use VxFS with the Quick I/O feature or Oracle Disk Manager.


Note   Note    The procedure provided assumes the database runs on a single file system after the upgrade.

  To convert from raw devices to VxFS with Quick I/O

  1. Create a VxFS file system using a size that is 10 percent larger than the original database or total raw device size.

    Use the procedure described in Creating a VxFS File System to create a new VxFS file system. You can create more file systems based on your performance and availability requirements.

  2. Shut down the database.
  3. Preallocate Quick I/O files using qiomkfile. Use the procedure described in Creating Database Files as Quick I/O Files Using qiomkfile.
  4. Copy each raw device file to the new VxFS file system.

    For example, use the dd command to copy the file /dev/rdsk/c0t1d0 to /db01/dbfile:


       dd if=/dev/rdsk/c0t1d0 of=/db01/dbfile bs=128k 
  5. If the database uses symbolic links to access the database files, change the symbolic links to point to the Quick I/O files.

    For example, if the database has a datafile specification /data/file1 that was linked to /dev/rdsk/c0t1d0, change it to point to the new Quick I/O file:


    $ rm /data/file1
    $ ln -s /db01/dbfile /data/file1
  6. If the database was using absolute paths to access the database files, rename each file within Oracle before bringing the database online. For example:
       sqlplus "/ as sysdba"
    SQL> startup mount;
    SQL> alter database rename file <filename> to <newfilename>;
  7. Restart the database. For example:
    SQL> alter database open;
    SQL> exit

  To convert from raw devices to regular files for ODM

  1. Create a VxFS file system using a size that is 10 percent larger than the original database or total raw device size.

    Use the procedure described in Creating a VxFS File System to create a new VxFS file system. You can create more file systems based on your performance and availability requirements.

  2. Shut down the database.
  3. Preallocate the files for ODM using odmmkfile.
      odmmkfile -h -s file_size file_name

    where -h creates a file with additional space allocated for the Oracle header and -s preallocates a certain amount of space for the file.

  4. Copy each raw device file to the new VxFS file system.

    For example, use the dd command to copy the file /dev/rdsk/c0t1d0 to /db01/dbfile:


       dd if=/dev/rdsk/c0t1d0 of=/db01/dbfile bs=128k 
  5. If the database uses symbolic links to access the database files, change the symbolic links to point to the new files.

    For example, if the database has a datafile specification /data/file1 that was linked to /dev/rdsk/c0t1d0, change it to point to the new file:


    $ rm /data/file1
    $ ln -s /db01/dbfile /data/file1
  6. If the database was using absolute paths to access the database files, rename each file within Oracle before bringing the database online. For example:
       sqlplus "/ as sysdba"
       SQL> startup mount;
       SQL> alter database rename file file_name to new_file_name;
  7. Restart the database. For example:
    SQL> alter database open;
    SQL> exit
 ^ 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