1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
.\" $OpenBSD: vnconfig.8,v 1.15 2000/11/09 17:53:26 aaron Exp $
.\"
.\" 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
.Sh NAME
.Nm vnconfig
.Nd "configure vnode disks for file swapping or pseudo file systems"
.Sh SYNOPSIS
.Nm vnconfig Fl c
.Op Fl vk
.Ar rawdev
.Ar regular_file
.Nm vnconfig Fl u
.Op Fl v
.Ar rawdev
.Sh DESCRIPTION
The
.Nm
command configures vnode pseudo disk devices.
It will associate the special file
.Ar rawdev
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.
Both traditional devices,
.Pa vnd ,
and the cache-coherent devices,
.Pa svnd ,
are configured through
.Nm vnconfig .
.Pp
If you read the regular file while using
.Pa svnd ,
you need to mount the
.Pa svnd
with the mount option
.Ar sync
to ensure consistency in the buffer cache.
For normal operation this is not necessary.
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl c
Configures the device.
If successful, references to
.Ar rawdev
will access the contents of
.Ar regular_file .
.It Fl u
Unconfigures the device.
.It Fl v
Print messages to stdout describing actions taken.
.It Fl k
Associate an encryption key with the device. All data will be
encrypted before it is written to the disk. Encryption only
works with
.Pa svnd .
.El
.Pp
If no action option is given,
.Fl c
is assumed.
.Sh FILES
.Bl -tag -width /etc/rvnd?? -compact
.It Pa /dev/{,r}{,s}vnd*
.El
.Sh EXAMPLES
Configure the vnode disk
.Pa svnd0
(all of its partitions become usable):
.Pp
.Dl vnconfig svnd0 /tmp/diskimage
.Pp
Unconfigure the same device:
.Pp
.Dl vnconfig -u svnd0
.Sh BUGS
This command should really be named
.Nm vndconfig .
.Sh SEE ALSO
.Xr vnd 4 ,
.Xr mount 8 ,
.Xr swapon 8 ,
.Xr umount 8
|