'\" te .\" Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved .\" 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 RAMDISKADM 8 "Mar 25, 2003" .SH NAME ramdiskadm \- administer ramdisk pseudo device .SH SYNOPSIS .LP .nf \fB/usr/sbin/ramdiskadm\fR \fB-a\fR \fIname\fR \fIsize\fR [g | m | k | b] .fi .LP .nf \fB/usr/sbin/ramdiskadm\fR \fB-d\fR \fIname\fR .fi .LP .nf \fB/usr/sbin/ramdiskadm\fR .fi .SH DESCRIPTION .sp .LP The \fBramdiskadm\fR command administers \fBramdisk\fR(4D), the ramdisk driver. Use \fBramdiskadm\fR to create a new named ramdisk device, delete an existing named ramdisk, or list information about existing ramdisks. .sp .LP Ramdisks created using \fBramdiskadm\fR are not persistent across reboots. .SH OPTIONS .sp .LP The following options are supported: .sp .ne 2 .na \fB\fB-a\fR \fIname\fR \fIsize\fR\fR .ad .RS 16n Create a ramdisk named \fIname\fR of size \fIsize\fR and its corresponding block and character device nodes. .sp \fIname\fR must be composed only of the characters a-z, A-Z, 0-9, _ (underbar), and - (hyphen), but it must not begin with a hyphen. It must be no more than 32 characters long. Ramdisk names must be unique. .sp The size can be a decimal number, or, when prefixed with \fB0x\fR, a hexadecimal number, and can specify the size in bytes (no suffix), 512-byte blocks (suffix \fBb\fR), kilobytes (suffix \fBk\fR), megabytes (suffix \fBm\fR) or gigabytes (suffix \fBg\fR). The size of the ramdisk actually created might be larger than that specified, depending on the hardware implementation. .sp If the named ramdisk is successfully created, its block device path is printed on standard out. .RE .sp .ne 2 .na \fB\fB-d\fR \fIname\fR\fR .ad .RS 16n Delete an existing ramdisk of the name \fIname\fR. This command succeeds only when the named ramdisk is not open. The associated memory is freed and the device nodes are removed. .sp You can delete only ramdisks created using \fBramdiskadm\fR. It is not possible to delete a ramdisk that was created during the boot process. .RE .sp .LP Without options, \fBramdiskadm\fR lists any existing ramdisks, their sizes (in decimal), and whether they can be removed by \fBramdiskadm\fR (see the description of the \fB-d\fR option, above). .SH EXAMPLES .LP \fBExample 1 \fRCreating a 2MB Ramdisk Named \fBmydisk\fR .sp .in +2 .nf # ramdiskadm -a mydisk 2m /dev/ramdisk/mydisk .fi .in -2 .sp .LP \fBExample 2 \fRListing All Ramdisks .sp .in +2 .nf # ramdiskadm Block Device Size Removable /dev/ramdisk/miniroot 134217728 No /dev/ramdisk/certfs 1048576 No /dev/ramdisk/mydisk 2097152 Yes .fi .in -2 .sp .SH EXIT STATUS .sp .LP \fBramdiskadm\fR returns the following exit values: .sp .ne 2 .na \fB\fB0\fR\fR .ad .RS 6n Successful completion. .RE .sp .ne 2 .na \fB\fB>0\fR\fR .ad .RS 6n An error occurred. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(7) for descriptions of the following attributes: .sp .sp .TS box; c | c l | l . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Interface Stability Evolving .TE .SH SEE ALSO .sp .LP .BR ramdisk (4D), .BR attributes (7) .SH NOTES .sp .LP The abilities of \fBramdiskadm\fR and the privilege level of the person who uses the utility are controlled by the permissions of \fB/dev/ramdiskctl\fR. Read access allows query operations, for example, listing device information. Write access is required to do any state-changing operations, for example, creating or deleting ramdisks. .sp .LP As shipped, \fB/dev/ramdiskctl\fR is owned by \fBroot\fR, in group \fBsys\fR, and mode 0644, so all users can do query operations but only root can perform state-changing operations. An administrator can give write access to non-privileged users, allowing them to add or delete ramdisks. However, granting such ability entails considerable risk; such privileges should be given only to a trusted group.