Attaching DMS direct disk access devices
When working with containers to store data, the database manager supports direct disk access (raw I/O).
About this task
This type of support allows you to attach a direct disk access (raw) device to any Db2® database system.
You must know the device or file names of the containers you are going to reference when creating your table spaces. You must know the amount of space associated with each device or file name that is to be allocated to the table space. You will need the correct permissions to read and write to the container.
- On the Windows operating
systems:To specify a physical hard drive, use the following syntax:
- \\.\PhysicalDriveN
- \\.\PhysicalDrive5
- \\.\N:
For Windows, there is a new method for specifying DMS raw table space containers. Volumes (that is, basic disk database partitions or dynamic volumes) are assigned a globally unique identifier (GUID) when they are created. The GUID can be used as a device identifier when specifying the containers in a table space definition. The GUIDs are unique across systems which means that in a multi-partition database, GUIDs are different for each database partition even if the disk partition definitions are the same.
A tool called db2listvolumes.exe is available (only on Windows operating systems) to make it easy to display the GUIDs for all the disk volumes defined on a Windows system. This tool creates two files in the current directory where the tool is run. One file, called
volumes.xml
, contains information about each disk volume encoded in XML for easy viewing on any XML-enabled browser. The second file, calledtablespace.ddl
, contains the required syntax for specifying table space containers. This file must be updated to specify the remaining information needed for a table space definition. The db2listvolumes command does not require any command line arguments. - On Linux® and UNIX platforms, a logical volume can appear
to users and applications as a single, contiguous, and extensible
disk volume. Although it appears this way, it can reside on noncontiguous
physical database partitions or even on more than one physical volume.
The logical volume must also be contained within a single volume group.
There is a limit of 256 logical volumes per volume group. There is
a limit of 32 physical volumes per volume group. You can create additional
logical volumes using the mklv command. This command
allows you to specify the name of the logical volume and to define
its characteristics, including the number and location of logical
partitions to allocate for it.
After you create a logical volume, you can change its name and characteristics with the chlv command, and you can increase the number of logical partitions allocated to it with the extendlv command. The default maximum size for a logical volume at creation is 512 logical partitions, unless specified to be larger. The chlv command is used to override this limitation.
Within AIX®, the set of operating system commands, library subroutines, and other tools that allow you to establish and control logical volume storage is called the Logical Volume Manager (LVM). The LVM controls disk resources by mapping data between a simpler and flexible logical view of storage space and the actual physical disks.
For more information about the mklv and other logical volume commands, and the LVM, refer to AIX 5L Version 5.2 System Management Concepts: Operating System and Devices.