Appendix D: Creating Raw Partitions in Linux


Overview

Linux

Adaptive Server allows you to create and mount database devices on raw bound devices for raw disk I/O. Raw disk I/O has performance advantages since it enables direct memory access from user address space to the physical sectors on the disk, omitting needless memory copy operations from the user address space to the kernel buffers.

Raw disk I/O also assumes that logical and physical I/O are simultaneous, and writes are guaranteed to flush to the disk when the system write() call returns.

When preparing a raw partition device, follow these guidelines:

To determine whether a device is a block device or a character device run:

ls -l <device path>

StepsChoosing a raw partition

  1. Determine which raw partitions are available.

  2. Determine the sizes of the raw partitions.

  3. From the list of available raw partitions, select a raw partition for each device.

  4. Verify with the operating system administrator that the partition you have chosen is available.

  5. Make sure the “sybase” user has read and write privileges to the raw partition.

    NoteFor more information on choosing a raw partition, see your operating system documentation.

I/O fencing provided by the SCSI-3 PGR feature operates on devices only, not on partitions. For example, /dev/sda1 and /dev/sda2 are partitions of the device /dev/sda. A fencing operating targeted to a raw device bound to /dev/sda1 will affect all partitions of /dev/sda. Therefore any file systems or other applications (including another Adaptive Server) utilizing partitions on that device will also be affected. For this reason the device must be used exclusively by the Adaptive Server cluster instance.