Oracle8i Administrator's Guide
Release 2 (8.1.6) for Windows NT

A73008-01

Library

Product

Contents

Index

Prev Next

D
Storing Tablespaces on Raw Partitions

This appendix describes how to configure your system to store data files for tablespaces on raw partitions.

Specific topics discussed are:


Note:

Oracle Parallel Server requires additional configuration tools. See the Oracle Parallel Server Administrator's Guide on Windows NT for information on how to create logical partitions and assign symbolic links. Do not use this appendix to create partitions for Oracle Parallel Server. 


Raw Partition Overview

In addition to storing data files for tablespaces on a file system, data files can also be stored on raw partitions.

A raw partition is a portion of a physical disk that is accessed at the lowest possible level. Input/output (I/O) to a raw partition offers approximately a 5% to 10% performance improvement over I/O to a partition with a file system on it.

A raw partition is created after generation of an extended partition and a logical partition, after partitions are assigned to i, and before applying any formatting. The Windows NT Disk Administrator application enables you to create an extended partition on a physical drive.

An extended partition points to raw space on the disk that can be assigned multiple logical partitions for the database files. An extended partition also avoids the four-partition limit by letting you define large numbers of logical partitions to accommodate applications using the Oracle8i database. Logical partitions can then be given symbolic link names to free up drive letters.

The Disk Administrator window below shows four disks. Two of the disks have an extended partition.


Disk No.  Contents 

Disk 0 

A primary partition 

Disk 1 

An extended partition with six logical partitions and 246 MB of free space 

Disk 2 

An extended partition with three logical partitions and 1146 MB of free space 

Disk 3 

An unformatted partition 


Note:

You can tell whether a partition is formatted or unformatted by the direction of the diagonal lines. A formatted partition's lines display from top left to bottom (\\), and an uninitialized partition's lines display from top right to bottom (//). 


Disk Definition

Windows NT defines each disk drive found at startup with the following naming convention:

\Device\Harddiskm\Partitionn

where Harddiskm is the number of the physical drive, and Partitionn is a logical partition number, as shown in the Disk Administrator window (in the above figure). Harddiskm starts at 0, and Partitionn starts at 1.

Partition0 has a special meaning in that it has access to the whole disk. For example, the first logical partition (E:) on the second physical drive in the above figure has the following entry:

\Device\Harddisk1\Partition1

The first logical partition on a system (normally the C drive) has the following entry:

\Device\Harddisk0\Partition1

Raw Partition Definition

Raw partitions are of two types:

Physical Disk

A physical disk represents the entire disk and points to

 \Device\Harddiskx\Partition0. 

Windows NT automatically creates a symbolic link name of \\.\PhysicalDrivex, where x is the number corresponding to your hard disk drive number in the Disk Administrator. The x matches the x in \Device\Harddiskx\Partition0.

\\.\PhysicalDrivex is automatically defined by Windows NT for every hard disk in the computer. For example, a computer with three hard disks:

\\.\PhysicalDrive0 
\\.\PhysicalDrive1 
\\.\PhysicalDrive2 

Internally, these names expand to

\\.\PhysicalDrive0 = \Device\Harddisk0\Partition0 
\\.\PhysicalDrive1 =\Device\Harddisk1\Partition0 
\\.\PhysicalDrive2 =\Device\Harddisk2\Partition0 

Partition0 is special, because it represents the entire physical disk regardless of any partitioning scheme on that disk. On all disks recognized by Windows NT, the Disk Administrator writes a signature on the first block of all disks. To avoid overwriting that block, Oracle skips the first block of a physical raw partition that is used for an Oracle data file.

Logical Partition

A logical partition is a partition created by the Disk Administrator that points to a drive other than \Device\Harddiskx\Partition0.

Logical partitions are initially assigned names with drive letters (\\.\DRIVE_LETTER:) and typically re-assigned symbolic link names (\\.\SYMBOLIC LINK NAME). For example, \\.\D: may be assigned a symbolic link name of \\.\ACCOUNTING_1. Regardless of whether a drive letter or symbolic link name is used, logical partitions are defined to represent a specific partition in a disk rather than the entire disk. Internally, these names may expand to:

\\.\D:= \Device\Harddisk2\Partition1 
\\.\ACCOUNTING_1= \Device\Harddisk3\Partition2 

Drive letters can be assigned to specific partitions, using the Disk Administrator. Symbolic link names can, on the other hand, be assigned using a utility such as DOSDEV.EXE, which is available with the Windows NT Resource Kit, or the SETLINKS utility.


Note:

Oracle does not skip the first block of a logical raw partition used for an Oracle data file.  


Physical Disk and Logical Partition Considerations

Consider the following when deciding which raw partition to use:

Frequently Asked Questions

Compatibility Issues

The physical and logical partition conventions are not compatible with one another because of the extra block that is skipped for physical raw conventions. This also means you cannot simply use OCOPY to copy from a physical disk to a logical partition, because the contents of these partitions are incompatible.

To convert from a physical convention to a logical convention, you must:

  1. Perform a full database export to a (local) file system.

  2. Create logical partitions and define logical names for these partitions.

  3. Re-create the database by using the new logical partitions.

  4. Perform the full database import to the newly-created database.

If your database installation uses physical disk conventions with logical partitions, Oracle Corporation recommends converting to the logical partition conventions at your earliest convenience, using the preceding steps.

Creating an Extended Partition

Only one extended partition can be created per disk. You can use the free space in the extended partition to create multiple logical partitions or use all or part of it when creating volume sets or other kinds of volumes for fault-tolerance purposes.

To create an extended partition:

  1. Choose Start > Programs > Administrative Tools > Disk Administrator.

    The Disk Administrator window appears.


    Note that the lines display diagonally from top right to bottom left, indicating unpartitioned devices.

  2. Select an area of free space in an extended partition on a disk that is on the shared disk subsystem by clicking the mouse.

    Oracle Corporation recommends that you use the entire disk.

  3. Choose Partition > Create Extended.

    Disk Administrator displays the minimum and maximum sizes for the extended partition:


  4. Use the default maximum size, then click OK.


    Note:

    Changes that you have made are not saved until you choose Partition > Commit Changes Now or exit Disk Administrator. 


    The extended partition is created.

    Note that the lines now display diagonally from top left to bottom right, indicating the partition is an extended partition.

Creating Logical Partitions in an Extended Partition

After an extended drive is created, you must assign logical partitions to it. Logical partitions are assigned letters of the alphabet.

To create logical partitions in an extended partition:


Note:

Oracle Corporation recommends you do not create more than 120 logical partitions in an extended partition.  


  1. Select an area of free space in an extended partition by clicking the mouse on it.

  2. Choose Partition > Create.

    The Disk Administrator window displays the minimum and maximum sizes for the logical partition:


  3. Enter the size of the logical partition for the data file, then click OK.

    The size depends on how large you want your data files to be. Add 2 MB to this size for overhead.

  4. Repeat Steps 1-3 for each additional data file that you plan to store in a raw partition.

  5. Choose Partition > Commit Changes Now.

    A confirmation dialog appears, informing you that changes have been made to the disk.

  6. Click Yes.

    A dialog box appears, informing you that the disks have been updated successfully.

  7. Click OK.

  8. Write down the hard disk number(s) and the number of the partition (starting at 1) for that drive. Oracle Corporation recommends using a worksheet similar to the one below.

    Hard Disk Number  Partition Number Range 

    Hard Diskx 

    Partitions x-x 

    Hard Diskx 

    Partitions x-x 

  9. Choose Partition > Close.

    Disk Administrator exits.

Assigning Symbolic Links to Each Logical Partition

If you do not want to use the drive letters assigned to the logical partitions that you created in "Creating Logical Partitions in an Extended Partition", use the Oracle SETLINKS utility to create symbolic links to raw logical partitions. Otherwise, keep the drive letters and proceed to "Creating a Tablespace in a Raw Partition".

The SETLINKS utility requires an input ASCII file that maps a symbolic link name to a raw partition. The following figure shows an ASCII file that maps two symbolic links, ACCOUNTING_1 and ACCOUNTING_2, to two logical partitions on the first disk:


To assign symbolic links to each logical partition:

  1. Create an ASCII file to use for the SETLINKS utility. The partition and hard disk numbers should match the disk numbers and partitions numbers that you created in "Creating Logical Partitions in an Extended Partition".

    You can use a worksheet similar to the one below to assist with the process:

    Symbolic Link  Disk No. and Partition Nos. 

    ACCOUNTING_1 

    Harddisk1 Partition1 

    ACCOUNTING_2 

    Harddisk1 Partition2 

  2. Run the ASCII input file through the SETLINKS utility:

    C:\> CD ORACLE_BASE\ORACLE_HOME\BIN
    C:\ORACLE_BASE\ORACLE_HOME\BIN> SETLINKS /F:PATH/FILENAME
    

    SETLINKS maps the drives to the symbolic label names. Using the sample input file in the above figure, the SETLINKS output looks as follows:

    Oracle Corporation. Copyright (c) 1999. All rights reserved.
    Created Link:
    Created Link:6 = Device:\Device\Harddisk1\Partition1
    Created Link:ACCOUNTING_2 = Device:\Device\Harddisk1\Partition2
    Dos devices updated successfully.
    
  3. Ensure that the drives have been mapped with the correct names as shown below:

    C:\ORACLE_BASE\ORACLE_HOME\BIN> SETLINKS/D
    

    SETLINKS shows how the symbolic link names have been mapped:

    Oracle Corporation. Copyright (c) 1999. All rights reserved.
    ACCOUNTING_1  = \Device\Harddisk1\Partition1
    ACCOUNTING_2  = \Device\Harddisk1\Partition2
    

Removing or Ignoring Links

You can remove or ignore links by changing the contents of the input file and running it through SETLINKS again.

To remove an existing symbolic link:

To ignore links:

Creating a Tablespace in a Raw Partition

To create a tablespace using a data file located in a raw partition:

  1. Start SQL*Plus:

    C:\> SQLPLUS
    
  2. Connect to the Oracle repository database:

    Enter user-name: SYSTEM/PASSWORD
    

    where PASSWORD is MANAGER for the SYSTEM user account by default. If you have changed this password, substitute MANAGER with the correct password.

  3. Create the tablespace. Specify the data file by one of the following:

    • If SETLINKS was not used, the drive letter \.\DRIVE_LETTER:

    • If SETLINKS was used, the symbolic link name \\.\SYMBOLIC LINK NAME

      SQL> CREATE TABLESPACE TABLESPACE DATAFILE '\\.\DATAFILE' SIZE XM;
      

    where:

    • TABLESPACE is the tablespace name

    • `\\.\' is the drive letter or symbolic link name assigned to the raw partition

    • X is the tablespace size in megabytes (Twenty megabytes is a good starting place.)

For example, to create a tablespace named ACCOUNTING_1 that was assigned a symbolic link name of ACCOUNTING_1, enter the following:

SQL> CREATE TABLESPACE ACCOUNTING_1 DATAFILE '\\.\ACCOUNTING_1 SIZE 502M;


Note:

If you are creating a database with the BUILD_DB.SQL script, modify data files that are stored on raw partitions with a naming convention of \\.\DRIVE_LETTER: or \\.\SYMBOLIC LINK NAME. See "Putting the CREATE DATABASE Statement in a Script"


CRLOGDR Utility

The create logical drives (CRLOGDR) utility allows you to create and delete logical drives and their associated symbolic names on a disk that does not have a primary partition and has only one extended partition.

The CRLOGDR utility is located in the \OPS_PREINSTALL directory on the CD-ROM. To use the utility, copy the CRLOGDR.EXE to a temporary directory.

The utility supports eight parameters, as follows:

/d 

Zero indexed drive number (required parameter) 

/s 

Logical drive size 

/n 

Logical drive number 

/o 

Free space offset from beginning of extended partition 

/l 

Symbolic name 

/r 

Removes logical drive or symbolic name 

/p 

Print disk layout 

/b 

Suppress banner 

Examples

The following examples show how to use CRLOGDR.

Example 1

To create a logical drive of 300 MB on disk 3 with no symbolic name:

CRLOGDR /d3 /s 300

Example 2

To create a logical drive of 100 MB on disk 3 with the symbolic name 'CONTROL_FILE':

CRLOGDR /d3 /s 100 /l CONTROL_FILE

Example 3

To assign the symbolic name 'DATA_FILE' to the previously created second logical drive (2):

CRLOGDR /d3 /n 2 /l DATA_FILE

Example 4

To create a logical drive of 300 MB on disk 3 at offset 100 MB with no symbolic name:


Note:

The offset /o parameter must be the starting offset of the free space. 


CRLOGDR /d3 /s 300 /o 100

Example 5

To remove second logical drive (2):


Note:

This command also removes the symbolic name associated with the drive. 


CRLOGDR /d3 /r /n 2
Example 6

To remove the symbolic name 'CONTROL_FILE' (there is no need to supply disk number):

CRLOGDR /r /l CONTROL_FILE

Reviewing Disk Layout

You can review the disk layout by using the CRLOGDR utility's print parameter (/p). To print the layout of disk 4, for example:

CRLOGDR /d4 /p
Oracle Corporation. Copyright (c) 1998. All rights reserved. 
crlogdr - Version 1.0

  NUM        SIZE(MB)       SYMBOLIC NAME  TYPE      OFFSET(MB)    
    1             300          DSS_TABLES     6               0      
    2             300         OLTP_TABLES     6             300     
    3             300           PD_TPCB01     6             600     
    4             300           OLTP_INDX     6             900    
    5             300            OLTP_RBS     6            1200   
    6             300           PD_TPCB04     6            1500    
    7             200           OPS_RBS01     6            1800
*Free               5                  --    --            2000

Total Free Space: 5MB

The columns have the following significance:

Column  Description 

NUM 

Logical drive number or free space. 

SIZE 

Size of logical drive or free space.  

SYMBOLIC NAME 

Symbolic name associated with the drive, if any. Two hyphens (--) mean no symbolic name has been assigned to the drive.  

TYPE 

Type of partition, where 6 indicates a large MS-DOS partition and 7 indicates an NTFS partition.

Note: Raw disk partitions have no file system. 

OFFSET 

Offset of the partition from the beginning of the extended partition.  


Prev Next
Oracle
Copyright © 2000 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index