Changeset View
Changeset View
Standalone View
Standalone View
sbin/mdmfs/mdmfs.8
Show All 19 Lines | |||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" 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 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd September 9, 2016 | .Dd September 9, 2017 | ||||
.Dt MDMFS 8 | .Dt MDMFS 8 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm mdmfs , | .Nm mdmfs , | ||||
.Nm mount_mfs | .Nm mount_mfs | ||||
.Nd configure and mount an in-memory file system using the | .Nd configure and mount an in-memory file system using the | ||||
.Xr md 4 | .Xr md 4 | ||||
driver | driver or the | ||||
.Xr tmpfs 5 | |||||
filesystem | |||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
.Nm | .Nm | ||||
.Op Fl DLlMNnPStTUX | .Op Fl DLlMNnPStTUX | ||||
.Op Fl a Ar maxcontig | .Op Fl a Ar maxcontig | ||||
.Op Fl b Ar block-size | .Op Fl b Ar block-size | ||||
.Op Fl c Ar blocks-per-cylinder-group | .Op Fl c Ar blocks-per-cylinder-group | ||||
.Op Fl d Ar max-extent-size | .Op Fl d Ar max-extent-size | ||||
.Op Fl E Ar path-mdconfig | .Op Fl E Ar path-mdconfig | ||||
Show All 13 Lines | |||||
.Ar mount-point | .Ar mount-point | ||||
.Sh DESCRIPTION | .Sh DESCRIPTION | ||||
The | The | ||||
.Nm | .Nm | ||||
utility is designed to be a work-alike and look-alike of the deprecated | utility is designed to be a work-alike and look-alike of the deprecated | ||||
.Xr mount_mfs 8 . | .Xr mount_mfs 8 . | ||||
The end result is essentially the same, | The end result is essentially the same, | ||||
but is accomplished in a completely different way. | but is accomplished in a completely different way. | ||||
The | Based on | ||||
.Ar md-device , | |||||
the | |||||
.Nm | .Nm | ||||
utility configures an | utility either creates a | ||||
.Xr tmpfs 5 | |||||
filesystem, or it configures an | |||||
.Xr md 4 | .Xr md 4 | ||||
disk using | disk using | ||||
.Xr mdconfig 8 , | .Xr mdconfig 8 , | ||||
puts a UFS file system on it (unless | puts a UFS file system on it (unless | ||||
.Fl P | .Fl P | ||||
was specified) using | was specified) using | ||||
.Xr newfs 8 , | .Xr newfs 8 , | ||||
and mounts it using | and mounts it using | ||||
.Xr mount 8 . | .Xr mount 8 . | ||||
It can handle | It can handle | ||||
.Xr geom_uzip 4 | .Xr geom_uzip 4 | ||||
compressed disk images, as long as the kernel supports this GEOM class. | compressed disk images, as long as the kernel supports this GEOM class. | ||||
All the command line options are passed to the appropriate program | All the command line options are passed to the appropriate program | ||||
at the appropriate stage in order to achieve the desired effect. | at the appropriate stage in order to achieve the desired effect. | ||||
.Pp | .Pp | ||||
When | |||||
.Ar md-device | |||||
is `auto', | |||||
.Nm | |||||
uses | |||||
.Xr tmpfs 5 | |||||
if it is present in the kernel or can be loaded as a module, | |||||
otherwise it falls back to using | |||||
.Xr md 4 | |||||
auto-unit as if `md' had been specified. | |||||
.Pp | |||||
When | |||||
.Ar md-device | |||||
is `tmpfs', | |||||
.Nm | |||||
mounts a | |||||
.Xr tmpfs 5 | |||||
filesystem, translating the | |||||
.Fl s | |||||
size option, if present, into a `-o size=' mount option. | |||||
Any | |||||
.Fl o | |||||
options on the command line are passed through to the | |||||
.Xr tmpfs 5 | |||||
mount. | |||||
Options specific to | |||||
.Xr mdconfig 8 | |||||
or | |||||
.Xr newfs 8 | |||||
are ignored. | |||||
.Pp | |||||
When | |||||
.Ar md-device | |||||
does not result in | |||||
.Xr tmpfs 5 | |||||
being used, then an | |||||
.Xr md 4 | |||||
device is configured instead. | |||||
By default, | By default, | ||||
.Nm | .Nm | ||||
creates a swap-based | creates a swap-based | ||||
.Pq Dv MD_SWAP | .Pq Dv MD_SWAP | ||||
disk with soft-updates enabled | disk with soft-updates enabled | ||||
and mounts it on | and mounts it on | ||||
.Ar mount-point . | .Ar mount-point . | ||||
It uses the | It uses the | ||||
▲ Show 20 Lines • Show All 122 Lines • ▼ Show 20 Lines | |||||
.It Fl s Ar size | .It Fl s Ar size | ||||
Specify the size of the disk to create. | Specify the size of the disk to create. | ||||
This only makes sense if | This only makes sense if | ||||
.Fl F | .Fl F | ||||
is | is | ||||
.Em not | .Em not | ||||
specified. | specified. | ||||
That is, | That is, | ||||
this will work for the default swap-backed | this will work when the backing storage is some form of | ||||
.Pq Dv MD_SWAP | memory, as opposed to a fixed-size file. | ||||
disks, | The size may include the usual SI suffixes (k, m, g, t, p). | ||||
and the optional | A number without a suffix is interpreted as a count of 512-byte sectors. | ||||
.Pq Fl M | |||||
.Xr malloc 9 | |||||
backed disks | |||||
.Pq Dv MD_MALLOC . | |||||
.It Fl t | .It Fl t | ||||
Turn on the TRIM enable flag for | Turn on the TRIM enable flag for | ||||
.Xr newfs 8 . | .Xr newfs 8 . | ||||
When used with a file system that issue BIO_DELETE bio requests, | When used with a file system that issue BIO_DELETE bio requests, | ||||
.Xr md 4 | .Xr md 4 | ||||
returns deleted blocks to the system memory pool. | returns deleted blocks to the system memory pool. | ||||
.It Fl T Ar fstype | .It Fl T Ar fstype | ||||
Specify a file system type for a vnode-backed memory disk. | Specify a file system type for a vnode-backed memory disk. | ||||
▲ Show 20 Lines • Show All 149 Lines • ▼ Show 20 Lines | |||||
.Li 01777 | .Li 01777 | ||||
as if | as if | ||||
.Fl p Ar 1777 | .Fl p Ar 1777 | ||||
was given on the command line. | was given on the command line. | ||||
.El | .El | ||||
.Sh SEE ALSO | .Sh SEE ALSO | ||||
.Xr md 4 , | .Xr md 4 , | ||||
.Xr fstab 5 , | .Xr fstab 5 , | ||||
.Xr tmpfs 5 , | |||||
.Xr mdconfig 8 , | .Xr mdconfig 8 , | ||||
.Xr mount 8 , | .Xr mount 8 , | ||||
.Xr newfs 8 | .Xr newfs 8 | ||||
.Sh HISTORY | .Sh HISTORY | ||||
The | The | ||||
.Nm | .Nm | ||||
utility appeared in | utility appeared in | ||||
.Fx 5.0 . | .Fx 5.0 . | ||||
.Sh AUTHORS | .Sh AUTHORS | ||||
.An Dima Dorfman | .An Dima Dorfman |