Mdoc(7)ify.
This commit is contained in:
parent
1d66272a85
commit
739cdd4baa
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=70888
@ -43,7 +43,7 @@
|
|||||||
.\"
|
.\"
|
||||||
.Dd December 31, 2000
|
.Dd December 31, 2000
|
||||||
.Dt MDCONFIG 8
|
.Dt MDCONFIG 8
|
||||||
.Os FreeBSD 5
|
.Os FreeBSD
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
.Nm mdconfig
|
.Nm mdconfig
|
||||||
.Nd configure and enable memory disks
|
.Nd configure and enable memory disks
|
||||||
@ -51,7 +51,10 @@
|
|||||||
.Nm
|
.Nm
|
||||||
.Fl a
|
.Fl a
|
||||||
.Fl t Ar type
|
.Fl t Ar type
|
||||||
.Op Fl o Ar [no]option
|
.Oo
|
||||||
|
.Fl o
|
||||||
|
.Oo Cm no Oc Ns Ar option
|
||||||
|
.Oc
|
||||||
.Op Fl b Ar baseaddress
|
.Op Fl b Ar baseaddress
|
||||||
.Op Fl s Ar size
|
.Op Fl s Ar size
|
||||||
.Op Fl f Ar file
|
.Op Fl f Ar file
|
||||||
@ -63,66 +66,89 @@
|
|||||||
The
|
The
|
||||||
.Nm
|
.Nm
|
||||||
command configures and enables
|
command configures and enables
|
||||||
.Xr md(4)
|
.Xr md 4
|
||||||
devices.
|
devices.
|
||||||
.Pp
|
.Pp
|
||||||
Options indicate an action to be performed:
|
Options indicate an action to be performed:
|
||||||
.Bl -tag -width indent
|
.Bl -tag -width indent
|
||||||
.It Fl a
|
.It Fl a
|
||||||
Attach a memory disk. This will configure and attach a memory disk with the
|
Attach a memory disk.
|
||||||
|
This will configure and attach a memory disk with the
|
||||||
parameters specified and attach it to the system.
|
parameters specified and attach it to the system.
|
||||||
.It Fl d
|
.It Fl d
|
||||||
Dettach a memory disk from the system and release all resources.
|
Detach a memory disk from the system and release all resources.
|
||||||
.It Fl t
|
.It Fl t Ar type
|
||||||
Select the type of the memory disk.
|
Select the type of the memory disk.
|
||||||
.Bl -tag -width indent
|
.Bl -tag -width "preload"
|
||||||
.It Ar malloc
|
.It Cm malloc
|
||||||
Storage for this type of memory disk is allocated with
|
Storage for this type of memory disk is allocated with
|
||||||
.Xr malloc 9 .
|
.Xr malloc 9 .
|
||||||
This limits the size to the malloc bucket limit in the kernel.
|
This limits the size to the malloc bucket limit in the kernel.
|
||||||
.It Ar preload
|
.It Cm preload
|
||||||
This type represents memory disks which are backed by memory outside the kernels normal address space.
|
This type represents memory disks which are backed by memory outside
|
||||||
These can be instantiated automatically by objects loaded by the bootloader or configured on the fly.
|
the kernels normal address space.
|
||||||
.It Ar vnode
|
These can be instantiated automatically by objects loaded by the
|
||||||
|
bootloader or configured on the fly.
|
||||||
|
.It Cm vnode
|
||||||
A file specified with
|
A file specified with
|
||||||
.Fl f Ar file
|
.Fl f Ar file
|
||||||
becomes the backingstore for this memory disk.
|
becomes the backingstore for this memory disk.
|
||||||
.It Ar swap
|
.It Cm swap
|
||||||
swapspace is used to back this memory disk.
|
swapspace is used to back this memory disk.
|
||||||
.El
|
.El
|
||||||
.It Fl b Ar baseaddress
|
.It Fl b Ar baseaddress
|
||||||
Starting address in kernel virtual space of the memory to be used for a ``preload'' type disk.
|
Starting address in kernel virtual space of the memory to be used for a
|
||||||
|
.Cm preload
|
||||||
|
type disk.
|
||||||
.It Fl f Ar file
|
.It Fl f Ar file
|
||||||
Filename to use for the vnode type memory disk.
|
Filename to use for the vnode type memory disk.
|
||||||
.It Fl s Ar size
|
.It Fl s Ar size
|
||||||
Size of the memory disk.
|
Size of the memory disk.
|
||||||
.Ar Size
|
.Ar Size
|
||||||
is the number of 512 bytes sectors unless suffixed with a 'k', 'm', or 'g' which
|
is the number of 512 bytes sectors unless suffixed with a
|
||||||
|
.Cm k , m ,
|
||||||
|
or
|
||||||
|
.Cm g
|
||||||
|
which
|
||||||
denotes kilobyte, megabyte and gigabyte respectively.
|
denotes kilobyte, megabyte and gigabyte respectively.
|
||||||
.It Fl o Ar [no]option
|
.It Xo
|
||||||
|
.Fl o Oo Cm no Oc Ns Ar option
|
||||||
|
.Xc
|
||||||
Set or reset options.
|
Set or reset options.
|
||||||
.Bl -tag -width indent
|
.Bl -tag -width indent
|
||||||
.It Ar [no]reserve
|
.It Xo
|
||||||
|
.Oo Cm no Oc Ns Cm reserve
|
||||||
|
.Xc
|
||||||
Allocate and reserve all needed storage from the start, rather than as needed.
|
Allocate and reserve all needed storage from the start, rather than as needed.
|
||||||
.It Ar [no]cluster
|
.It Xo
|
||||||
|
.Oo Cm no Oc Ns Cm cluster
|
||||||
|
.Xc
|
||||||
Enable clustering on this disk.
|
Enable clustering on this disk.
|
||||||
.It Ar [no]autounit
|
.It Xo
|
||||||
|
.Oo Cm no Oc Ns Cm autounit
|
||||||
|
.Xc
|
||||||
Automatically allocate the next free unit number for this disk.
|
Automatically allocate the next free unit number for this disk.
|
||||||
The basename of the disk is printed on stdout.
|
The basename of the disk is printed on stdout.
|
||||||
.It Ar [no]compress
|
.It Xo
|
||||||
|
.Oo Cm no Oc Ns Cm compress
|
||||||
|
.Xc
|
||||||
Enable/Disable compression features to reduce memory usage.
|
Enable/Disable compression features to reduce memory usage.
|
||||||
.It Ar [no]readonly
|
.It Xo
|
||||||
|
.Oo Cm no Oc Ns Cm readonly
|
||||||
|
.Xc
|
||||||
Enable/Disable readonly mode.
|
Enable/Disable readonly mode.
|
||||||
.El
|
.El
|
||||||
.It Fl u Ar unit
|
.It Fl u Ar unit
|
||||||
Force the
|
Force the
|
||||||
.Xr md(4)
|
.Xr md 4
|
||||||
device to use a specific unit number.
|
device to use a specific unit number.
|
||||||
.El
|
.El
|
||||||
.Sh EXAMPLES
|
.Sh EXAMPLES
|
||||||
.Pp
|
To create a 4 megabyte
|
||||||
To create a 4 megabyte malloc(9) backed memory disk.
|
.Xr malloc 9
|
||||||
The name of the allocated unit will be output on stdout like ``md3'':
|
backed memory disk.
|
||||||
|
The name of the allocated unit will be output on stdout like
|
||||||
|
.Dq Li md3 :
|
||||||
.Pp
|
.Pp
|
||||||
.Dl mdconfig -a -t malloc -s 4m
|
.Dl mdconfig -a -t malloc -s 4m
|
||||||
.Pp
|
.Pp
|
||||||
@ -134,27 +160,31 @@ as backing:
|
|||||||
.Pp
|
.Pp
|
||||||
.Dl mdconfig -a -t vnode -f /tmp/boot.flp -u 4
|
.Dl mdconfig -a -t vnode -f /tmp/boot.flp -u 4
|
||||||
.Pp
|
.Pp
|
||||||
To dettach and free all resources used by
|
To detach and free all resources used by
|
||||||
.Pa /dev/md4 :
|
.Pa /dev/md4 :
|
||||||
.Pp
|
.Pp
|
||||||
.Dl mdconfig -d -u 4
|
.Dl mdconfig -d -u 4
|
||||||
.Pp
|
.Pp
|
||||||
To create and mount a 128MByte swap backed filesystem on
|
To create and mount a 128MByte swap backed filesystem on
|
||||||
.Pa /tmp :
|
.Pa /tmp :
|
||||||
|
.Bd -literal -offset indent
|
||||||
|
mdconfig -a -t swap -s 128M -u 10
|
||||||
|
disklabel -r -w md10 auto
|
||||||
|
newfs -f 4096 /dev/md10c
|
||||||
|
tunefs -n enable /dev/md10c
|
||||||
|
mount /dev/md10c /tmp
|
||||||
|
.Ed
|
||||||
.Pp
|
.Pp
|
||||||
.Dl mdconfig -a -t swap -s 128M -u 10
|
It is practically impossible to give a universal example of the
|
||||||
.Dl disklabel -r -w md10 auto
|
.Cm preload
|
||||||
.Dl newfs -f 4096 /dev/md10c
|
type of disk, it is mainly useful in the embedded systems market,
|
||||||
.Dl tunefs -n enable /dev/md10c
|
but to give a feel for how it works:
|
||||||
.Dl mount /dev/md10c /tmp
|
On most standard PC architecture machines this will create a disk
|
||||||
.Pp
|
backed by the BIOS ROM:
|
||||||
It is practically impossible to give a universal example of the ``preload'' type of disk,
|
|
||||||
it is mainly useful in the embedded systems market, but to give a feel for how it works:
|
|
||||||
On most standard PC architecture machines this will create a disk backed by the BIOS ROM:
|
|
||||||
.Pp
|
.Pp
|
||||||
.Dl mdconfig -a -t preload -s 128k -b 0xc00fe000
|
.Dl mdconfig -a -t preload -s 128k -b 0xc00fe000
|
||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
.Xr md 4 ,
|
.Xr md 4 ,
|
||||||
.Xr disklabel 8 ,
|
.Xr disklabel 8 ,
|
||||||
.Xr fdisk 8 ,
|
.Xr fdisk 8 ,
|
||||||
.Xr malloc 9 .
|
.Xr malloc 9
|
||||||
|
Loading…
Reference in New Issue
Block a user