HPlogo HP-UX Reference > R

ramdisc(7)

HP-UX 11i Version 2: December 2007 Update
» 

Technical documentation

 » Table of Contents

 » Index

NAME

ramdisc — RAM disk device driver

DESCRIPTION

The ramdisc driver supports numerous RAM disk devices that are created by the system either during the boot process or during normal system operation. One RAM disk volume is created during the boot process. Up to 15 RAM disk volumes can be created during normal system operation. RAM disk volumes created during normal system operation can be swappable or nonswappable volumes.

Nonswappable RAM disk volumes reserve the kernel space memory of the system during their creation. The size of kernel space memory reserved is the same as the size of the RAM disk volume created. This reserved memory can only be used by read and write operations on the RAM disk volume. The reserved memory is freed when the nonswappable RAM disk volume is deallocated. Nonswappable RAM disk volumes can be created using ramutil (see ramutil(1M)).

Swappable RAM disk volumes reserve the user space memory of the system during their creation. The size of user space memory reserved is the same as the size of the RAM disk volume created. The reserved user space memory is swappable when there is memory contention on the system. Swappable RAM disk volumes can be created using ramutil (see ramutil(1M)).

Minor Number Format

Minor number format for a RAM disk volume is:

Bits 20-23:

Volume Number. This is a value from 0 to 14.

Bits 4-19:

Size of the RAM disk volume. Used in conjunction with the flags bits to specify the size of the RAM disk volume.

Bits 0-3:

Flags. They are defined as:

#define RAM_64KB_UNITS 0x1

#define RAM_NOCACHE_BIT 0x2

#define RAM_GB_UNITS 0x4

#define RAM_NEW 0x8

DEVICE SPECIAL FILES

The following device special files are associated with RAM disk volumes:

/dev/dsk/ramvolume_number

block device special files for RAM disk volumes

/dev/rdsk/ramvolume_number

raw device special files for RAM disk volumes

Each RAM disk volume can be accessed either as a block device or as a raw device. When a RAM disk volume is accessed as a block device, the normal buffering mechanism is used when reading from and writing to the device without regard to physical disk records. Accessing the RAM disk volume as a raw device enables direct transmission between the disk and the read or write buffer. A single read or write call usually results in a single I/O operation, meaning that raw I/O is more efficient when many bytes are transmitted.

ERRORS

ramdisc returns the following errors:

EAGAIN

Cannot allocate resource for RAM disk. Try again later.

EBUSY

Cannot deallocate RAM disk volume because it is in use.

EFAULT

Buffer address is a bad address.

EINVAL

The argument is invalid.

EIO

An I/O error occurred.

ENXIO

The device did not exist during opening.

WARNINGS

HP-UX 11i v2 (11.23) Ramdisc version 1 has not been certified for use with HP's Logical Volume Manager (LVM) in mirrored configurations. HP does not support such configurations since there is a possibility of data loss from a redundancy failure of a physical disk or disk interface component. Other LVM mirrored configuration failure modes may exist that may further impact data integrity. Note: RAM disk data is not persistent across system reboots.

HP disclaims all warranties, express or implied, including but not limited to the implied warranties of merchantability, fitness for a particular purpose, and noninfringement, if you use HP-UX 11i v2 (11.23) Ramdisc version 1 with LVM mirrored configurations, and you assume all responsibility for any problems resulting from such usage in these configurations.

Third party products exist that provide RAM-disk based LVM mirrored configurations with additional support software; these products are delivered on configurations tested and validated by the product vendor. The use of such products is permitted on 11i v2 (11.23); the third party product vendors are responsible for supporting these products.