'\" te .\" Copyright (c) 2003, Sun Microsystems, Inc. .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] .TH ramdisk 7D "04 Mar 2003" "SunOS 5.11" "Devices" .SH NAME ramdisk \- RAM disk device driver .SH SYNOPSIS .LP .nf \fBramdisk@0:\fR\fIdiskname\fR .fi .SH DESCRIPTION .sp .LP The \fBramdisk\fR driver supports numerous ramdisk devices that are created by the system during the boot process (see \fBboot\fR(1M)) or during normal system operation (see \fBramdiskadm\fR(1M) for more information). .SH DEVICE SPECIAL FILES .sp .LP Each ramdisk can be accessed either as a block device or as a raw device. When 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 ramdisk 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. You can find block files names in \fB/dev/ramdisk\fR. Raw file names are found in \fB/dev/rramdisk\fR. .sp .LP There are no alignment or length restrictions on I/O requests to either block or character devices. .SH ERRORS .sp .ne 2 .mk .na \fB\fBEFAULT\fR\fR .ad .RS 10n .rt The argument features a bad address. .RE .sp .ne 2 .mk .na \fB\fBEINVAL\fR\fR .ad .RS 10n .rt Invalid argument. EIO. An I/O error occurred. .RE .sp .ne 2 .mk .na \fB\fBEPERM\fR\fR .ad .RS 10n .rt Cannot create or delete a ramdisk without write permission on \fB/dev/ramdiskctl\fR. .RE .sp .ne 2 .mk .na \fB\fBENOTTY\fR\fR .ad .RS 10n .rt The device does not support the requested ioctl function. .RE .sp .ne 2 .mk .na \fB\fBENXIO\fR\fR .ad .RS 10n .rt The device did not exist during opening. .RE .sp .ne 2 .mk .na \fB\fBEBUSY\fR\fR .ad .RS 10n .rt Cannot exclusively open \fB/dev/ramdiskctl\fR. One or more ramdisks are still open. .RE .sp .ne 2 .mk .na \fB\fBEEXIST\fR\fR .ad .RS 10n .rt A ramdisk with the indicated name already exists. .RE .sp .ne 2 .mk .na \fB\fBEAGAIN\fR\fR .ad .RS 10n .rt Cannot allocate resource for ramdisk. Try again later. .RE .SH FILES .sp .ne 2 .mk .na \fB\fB/dev/ramdisk/diskname\fR\fR .ad .sp .6 .RS 4n Block device for ramdisk named \fIdiskname\fR. .RE .sp .ne 2 .mk .na \fB\fB/dev/rramdisk/diskname\fR\fR .ad .sp .6 .RS 4n Raw device for ramdisk name \fIdiskname\fR .RE .sp .ne 2 .mk .na \fB\fB/kernel/drv/ramdisk\fR\fR .ad .sp .6 .RS 4n 32-bit driver .RE .sp .ne 2 .mk .na \fB\fB/kernel/drv/ramdisk.conf\fR\fR .ad .sp .6 .RS 4n Driver configuration file. (Do not alter). .RE .sp .ne 2 .mk .na \fB\fB/kernel/drv/sparcv9/ramdisk\fR\fR .ad .sp .6 .RS 4n 64-bit driver .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attribute: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Interface StabilityEvolving .TE .SH SEE ALSO .sp .LP \fBramdiskadm\fR(1M), \fBfsck\fR(1M), \fBfstyp\fR(1M), \fBmount\fR(1M), \fBnewfs\fR(1M), \fBdriver.conf\fR(4), \fBfilesystem\fR(5), \fBdkio\fR(7I) .SH NOTES .sp .LP The percentage of available physical memory that can be allocated to ramdisks is constrained by the variable \fBrd_percent_physmem\fR. You can tune the \fBrd_percent_physmem\fR variable in \fB/etc/system\fR. By default, the percentage of available physical memory that can be allocated to ramdisks is fixed at 25%. .sp .LP A ramdisk may not be the best possible use of system memory. Accordingly, use ramdisks only when absolutely necessary.