1998-05-22 22:27:50 +04:00
|
|
|
.\" $NetBSD: vnconfig.8,v 1.13 1998/05/22 18:27:52 msaitoh Exp $
|
1997-06-24 01:11:06 +04:00
|
|
|
.\"
|
|
|
|
.\" Copyright (c) 1997 The NetBSD Foundation, Inc.
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" This code is derived from software contributed to The NetBSD Foundation
|
|
|
|
.\" by Jason R. Thorpe.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
|
|
.\" must display the following acknowledgement:
|
|
|
|
.\" This product includes software developed by the NetBSD
|
|
|
|
.\" Foundation, Inc. and its contributors.
|
|
|
|
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
|
|
|
|
.\" contributors may be used to endorse or promote products derived
|
|
|
|
.\" from this software without specific prior written permission.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
|
|
|
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
|
|
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
1997-07-31 02:53:50 +04:00
|
|
|
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
|
|
|
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
1997-06-24 01:11:06 +04:00
|
|
|
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
|
|
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
|
|
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
|
|
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
|
|
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
.\" POSSIBILITY OF SUCH DAMAGE.
|
1995-12-30 21:14:01 +03:00
|
|
|
.\"
|
1993-12-21 07:13:39 +03:00
|
|
|
.\" Copyright (c) 1993 University of Utah.
|
|
|
|
.\" Copyright (c) 1980, 1989, 1991, 1993
|
|
|
|
.\" The Regents of the University of California. All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" This code is derived from software contributed to Berkeley by
|
|
|
|
.\" the Systems Programming Group of the University of Utah Computer
|
|
|
|
.\" Science Department.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
|
|
.\" must display the following acknowledgement:
|
|
|
|
.\" This product includes software developed by the University of
|
|
|
|
.\" California, Berkeley and its contributors.
|
|
|
|
.\" 4. Neither the name of the University nor the names of its contributors
|
|
|
|
.\" may be used to endorse or promote products derived from this software
|
|
|
|
.\" without specific prior written permission.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
|
|
|
.\" @(#)vnconfig.8 8.1 (Berkeley) 6/5/93
|
|
|
|
.\"
|
|
|
|
.Dd July 8, 1993
|
|
|
|
.Dt VNCONFIG 8
|
|
|
|
.Os BSD 4
|
|
|
|
.Sh NAME
|
|
|
|
.Nm vnconfig
|
1995-01-22 09:18:12 +03:00
|
|
|
.Nd configure vnode disks
|
1993-12-21 07:13:39 +03:00
|
|
|
.Sh SYNOPSIS
|
1997-10-18 07:54:00 +04:00
|
|
|
.Nm
|
|
|
|
.Op Fl c
|
1997-06-24 01:11:06 +04:00
|
|
|
.Op Fl t Ar typename
|
1995-01-22 10:06:44 +03:00
|
|
|
.Op Fl v
|
1997-10-01 05:32:59 +04:00
|
|
|
.Ar vnode_disk
|
1995-01-22 10:06:44 +03:00
|
|
|
.Ar regular_file
|
1997-06-24 01:11:06 +04:00
|
|
|
.Op Ar geomspec
|
1997-10-18 07:54:00 +04:00
|
|
|
.Nm ""
|
|
|
|
.Fl u
|
1995-01-22 10:06:44 +03:00
|
|
|
.Op Fl v
|
1997-10-01 05:32:59 +04:00
|
|
|
.Ar vnode_disk
|
1993-12-21 07:13:39 +03:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
1997-10-18 07:54:00 +04:00
|
|
|
.Nm
|
1995-01-22 09:18:12 +03:00
|
|
|
command configures vnode pseudo disk devices.
|
1997-10-01 05:32:59 +04:00
|
|
|
It will associate the vnode disk
|
|
|
|
.Ar vnode_disk
|
1993-12-21 07:13:39 +03:00
|
|
|
with the regular file
|
|
|
|
.Ar regular_file
|
|
|
|
allowing the latter to be accessed as though it were a disk.
|
|
|
|
Hence a regular file within the filesystem can be used for swapping
|
|
|
|
or can contain a filesystem that is mounted in the name space.
|
1997-10-01 05:32:59 +04:00
|
|
|
The
|
|
|
|
.Ar vnode_disk
|
|
|
|
is a special file of raw partition or name of vnode disk like
|
|
|
|
.Pa vnd0 .
|
1993-12-21 07:13:39 +03:00
|
|
|
.Pp
|
|
|
|
Options indicate an action to be performed:
|
|
|
|
.Bl -tag -width indent
|
|
|
|
.It Fl c
|
|
|
|
Configures the device.
|
|
|
|
If successful, references to
|
1997-10-01 05:32:59 +04:00
|
|
|
.Ar vnode_disk
|
1993-12-21 07:13:39 +03:00
|
|
|
will access the contents of
|
|
|
|
.Ar regular_file .
|
1997-06-24 01:11:06 +04:00
|
|
|
If
|
|
|
|
.Op Ar geomspec
|
|
|
|
is specified, the vnode device will emulate the specified disk geometry.
|
|
|
|
The format of the
|
|
|
|
.Op Ar geomspec
|
|
|
|
argument is
|
|
|
|
.Dq secsize/nsectors/ntracks/ncylinders .
|
|
|
|
If geometry is not specified, the kernel will choose a default based on 1MB
|
|
|
|
cylinders.
|
|
|
|
.Dq secsize
|
|
|
|
is the number of bytes per sector. It must be an even multiple of 512.
|
|
|
|
.Dq nsectors
|
|
|
|
is the number of sectors per track.
|
|
|
|
.Dq ntracks
|
|
|
|
is the number of tracks per cylinder.
|
|
|
|
.Dq ncylinders
|
|
|
|
is the number of cylinders in the device.
|
|
|
|
.It Fl t Ar typename
|
|
|
|
If configuring the device, look up
|
|
|
|
.Ar typename
|
|
|
|
in
|
|
|
|
.Pa /etc/disktab
|
|
|
|
and use the geometry specified in the entry. This option is mutually
|
|
|
|
exclusive the
|
|
|
|
.Ar geomspec
|
|
|
|
argument.
|
1993-12-21 07:13:39 +03:00
|
|
|
.It Fl u
|
1995-01-22 09:18:12 +03:00
|
|
|
Unconfigures the device.
|
1993-12-21 07:13:39 +03:00
|
|
|
.It Fl v
|
|
|
|
Print messages to stdout describing actions taken.
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
If no action option is given,
|
|
|
|
.Fl c
|
|
|
|
is assumed.
|
|
|
|
.Sh FILES
|
1997-06-24 01:11:06 +04:00
|
|
|
.Bl -tag -width /etc/disktab -compact
|
1995-01-22 09:18:12 +03:00
|
|
|
.It Pa /dev/rvnd??
|
|
|
|
.It Pa /dev/vnd??
|
1997-06-24 01:11:06 +04:00
|
|
|
.It Pa /etc/disktab
|
1993-12-21 07:13:39 +03:00
|
|
|
.El
|
|
|
|
.Sh EXAMPLES
|
|
|
|
.Pp
|
1994-01-03 17:40:55 +03:00
|
|
|
.Dl vnconfig /dev/vnd0c /tmp/diskimage
|
1997-10-01 05:32:59 +04:00
|
|
|
or
|
|
|
|
.Dl vnconfig vnd0 /tmp/diskimage
|
1993-12-21 07:13:39 +03:00
|
|
|
.Pp
|
|
|
|
Configures the vnode disk
|
1997-10-01 05:32:59 +04:00
|
|
|
.Pa vnd0 .
|
1993-12-21 07:13:39 +03:00
|
|
|
.Pp
|
1997-06-24 01:11:06 +04:00
|
|
|
.Dl vnconfig /dev/vnd0c /tmp/floppy.img 512/18/2/80
|
|
|
|
.Pp
|
|
|
|
Configures the vnode disk
|
1997-10-01 05:32:59 +04:00
|
|
|
.Pa vnd0
|
1997-06-24 01:11:06 +04:00
|
|
|
emulating the geometry of 512 bytes per sector, 18 sectors per track,
|
|
|
|
2 tracks per cylinder, and 80 cylinders total.
|
|
|
|
.Pp
|
|
|
|
.Pp
|
|
|
|
.Dl vnconfig -t floppy /dev/vnd0c /tmp/floppy.img
|
|
|
|
.Pp
|
|
|
|
Configures the vnode disk
|
1997-10-01 05:32:59 +04:00
|
|
|
.Pa vnd0
|
1997-06-24 01:11:06 +04:00
|
|
|
using the geometry specified in the
|
|
|
|
.Pa floppy
|
|
|
|
entry in
|
|
|
|
.Pa /etc/disktab .
|
|
|
|
.Pp
|
1995-01-22 10:06:44 +03:00
|
|
|
.Dl vnconfig -u /dev/vnd0c
|
1993-12-21 07:13:39 +03:00
|
|
|
.Pp
|
1995-01-22 09:18:12 +03:00
|
|
|
Unconfigures the
|
1997-10-01 05:32:59 +04:00
|
|
|
.Pa vnd0
|
1995-01-22 09:18:12 +03:00
|
|
|
device.
|
1995-01-25 07:32:37 +03:00
|
|
|
.Sh BUGS
|
|
|
|
This command should really be named
|
|
|
|
.Nm vndconfig .
|
1993-12-21 07:13:39 +03:00
|
|
|
.Sh SEE ALSO
|
1997-10-01 05:32:59 +04:00
|
|
|
.Xr opendisk 3 ,
|
1998-05-22 22:27:50 +04:00
|
|
|
.Xr vnd 4 ,
|
1997-06-24 01:11:06 +04:00
|
|
|
.Xr swapctl 8 ,
|
1995-01-22 09:18:12 +03:00
|
|
|
.Xr mount 8 ,
|
1998-05-22 22:27:50 +04:00
|
|
|
.Xr umount 8
|