'\" te
.\"  Copyright 1989 AT&T   Copyright (c) 1997 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 GETVOL 1M "Jul 5, 1990"
.SH NAME
getvol \- verifies device accessibility
.SH SYNOPSIS
.LP
.nf
\fB/usr/bin/getvol\fR \fB-n\fR [\fB-l\fR \fIlabel\fR] \fIdevice\fR
.fi

.LP
.nf
\fB/usr/bin/getvol\fR [\fB-f\fR | \fB-F\fR] [\fB-ow\fR] [\fB-l\fR \fIlabel\fR | \fB-x\fR \fIlabel\fR] \fIdevice\fR
.fi

.SH DESCRIPTION
.sp
.LP
\fBgetvol\fR verifies that the specified device is accessible and that a volume
of the appropriate medium has been inserted. The command is interactive and
displays instructional prompts, describes errors, and shows required label
information.
.SH OPTIONS
.sp
.LP
The following options are supported:
.sp
.ne 2
.na
\fB\fB-n\fR\fR
.ad
.RS 12n
Runs the command in non-interactive mode. The volume is assumed to be inserted
upon command invocation.
.RE

.sp
.ne 2
.na
\fB\fB-l\fR\fI label\fR\fR
.ad
.RS 12n
Specifies that the label  \fIlabel\fR must exist on the inserted volume (can be
overridden by the \fB-o\fR option).
.RE

.sp
.ne 2
.na
\fB\fB-f\fR\fR
.ad
.RS 12n
Formats the volume after insertion, using the format command defined for this
device in the device table.
.RE

.sp
.ne 2
.na
\fB\fB-F\fR\fR
.ad
.RS 12n
Formats the volume after insertion and places a file system on the device. Also
uses the format command defined for this device in the device table.
.RE

.sp
.ne 2
.na
\fB\fB-o\fR\fR
.ad
.RS 12n
Allows the administrator to override a label check.
.RE

.sp
.ne 2
.na
\fB\fB-w\fR\fR
.ad
.RS 12n
Allows administrator to write a new label on the device. User is prompted to
supply the label text. This option is ineffective if the  \fB-n\fR option is
enabled.
.RE

.sp
.ne 2
.na
\fB\fB-x\fR\fI label\fR\fR
.ad
.RS 12n
Specifies that the label  \fIlabel\fR must exist on the device. This option
should be used in place of the  \fB-l\fR option when the label can only be
verified by visual means. Use of the option causes a message to be displayed
asking the administrator to visually verify that the label is indeed
\fIlabel\fR.
.RE

.SH OPERANDS
.sp
.LP
The following operands are supported:
.sp
.ne 2
.na
\fB\fIdevice\fR\fR
.ad
.RS 10n
Specifies the device to be verified for accessibility.
.RE

.SH EXIT STATUS
.sp
.LP
The following exit values are returned:
.sp
.ne 2
.na
\fB\fB0\fR\fR
.ad
.RS 5n
Successful completion.
.RE

.sp
.ne 2
.na
\fB\fB1\fR\fR
.ad
.RS 5n
Command syntax was incorrect, invalid option was used, or an internal error
occurred.
.RE

.sp
.ne 2
.na
\fB\fB3\fR\fR
.ad
.RS 5n
Device table could not be opened for reading.
.RE

.SH FILES
.sp
.ne 2
.na
\fB\fB/etc/device.tab\fR\fR
.ad
.RS 19n

.RE

.SH SEE ALSO
.sp
.LP
\fBattributes\fR(5)
.SH NOTES
.sp
.LP
This command uses the device table to determine the characteristics of the
device when performing the volume label checking.