2 .\" Copyright (c) 2001 Dima Dorfman.
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 .Nd configure and mount an in-memory file system using the
43 .Op Fl b Ar block-size
44 .Op Fl c Ar blocks-per-cylinder-group
45 .Op Fl d Ar max-extent-size
46 .Op Fl E Ar path-mdconfig
52 .Op Fl m Ar percent-free
53 .Op Fl O Ar optimization
54 .Op Fl o Ar mount-options
55 .Op Fl p Ar permissions
59 .Op Fl w Ar user : Ns Ar group
65 utility is designed to be a work-alike and look-alike of the deprecated
67 The end result is essentially the same,
68 but is accomplished in a completely different way.
73 utility either creates a
75 filesystem, or it configures an
79 puts a UFS file system on it (unless
87 compressed disk images, as long as the kernel supports this GEOM class.
88 All the command line options are passed to the appropriate program
89 at the appropriate stage in order to achieve the desired effect.
97 if it is present in the kernel or can be loaded as a module,
98 otherwise it falls back to using
100 auto-unit as if `md' had been specified.
108 filesystem, translating the
110 size option, if present, into a `-o size=' mount option.
113 options on the command line are passed through to the
128 device is configured instead.
133 disk with soft-updates enabled
147 auto-unit feature to automatically select an unused device.
148 Unless otherwise specified with one of the options below,
149 it uses the default arguments to all the helper programs.
151 The following options are available.
153 the option letter matches the one used by
156 .Bl -tag -width indent
157 .It Fl a Ar maxcontig
158 Specify the maximum number of contiguous blocks that will be laid
159 out before forcing a rotational delay
163 .It Fl b Ar block-size
164 The block size of the file system, in bytes.
165 .It Fl c Ar blocks-per-cylinder-group
166 The number of blocks per cylinder group in the file system.
168 If not using auto-unit,
171 to try to detach the unit before attaching it.
172 .It Fl d Ar max-extent-size
173 The file system may choose to store large files using extents.
174 This parameter specifies the largest extent size that may be
176 It is presently limited to its default value which is 16
177 times the file system blocksize.
178 .It Fl E Ar path-mdconfig
185 Indicate the maximum number of blocks any single file can allocate
186 out of a cylinder group before it is forced to begin allocating
187 blocks from another cylinder group.
189 Create a vnode-backed
191 memory disk backed by
193 .It Fl f Ar frag-size
194 The fragment size of the file system in bytes.
196 Number of bytes per inode.
198 Copy the content of directory
203 Enable multilabel MAC on the new file system.
205 Show the output of the helper programs.
214 instead of a swap-backed disk.
215 .It Fl m Ar percent-free
216 The percentage of space reserved for the superuser.
218 Do not actually run the helper programs.
219 This is most useful in conjunction with
224 directory on the new file system.
225 .It Fl O Ar optimization
226 Select the optimization preference;
231 which will optimize for minimum space fragmentation and
232 minimum time spent allocating blocks,
234 .It Fl o Ar mount-options
235 Specify the mount options with which to mount the file system.
238 for more information.
240 Preserve the existing file system;
243 This only makes sense if
245 is specified to create a vnode-backed disk.
246 .It Fl p Ar permissions
247 Set the file (directory) permissions of the mount point
253 argument can be in any of the mode formats recognized by
255 If symbolic permissions are specified,
256 the operation characters
260 are interpreted relative to the initial permissions of
263 Do not enable soft-updates on the file system.
265 Specify the size of the disk to create.
266 This only makes sense if
272 this will work when the backing storage is some form of
273 memory, as opposed to a fixed-size file.
274 The size may include the usual SI suffixes (k, m, g, t, p).
275 A number without a suffix is interpreted as a count of 512-byte sectors.
277 Turn on the TRIM enable flag for
279 When used with a file system that issue BIO_DELETE bio requests,
281 returns deleted blocks to the system memory pool.
283 Specify a file system type for a vnode-backed memory disk.
284 Any file system supported by
286 command can be specified.
287 This option only makes sense when
293 Enable soft-updates on the file system.
294 This is the default, and is accepted only
296 It is only really useful to negate the
298 flag, should such a need occur.
300 Specify the UFS version number for use on the file system; it may be
305 The default is derived from the default of the
308 .It Fl w Ar user : Ns Ar group
309 Set the owner and group to
314 The arguments have the same semantics as with
316 but specifying just a
322 Print what command will be run before running it, and
323 other assorted debugging information.
330 options are passed to
338 .Fl a , b , c , d , e , f , i , m
341 options are passed to
343 with the same letter.
354 with the same letter.
361 For information on semantics, refer to the documentation of the programs
362 that the options are passed to.
364 Create and mount a 32 megabyte swap-backed file system on
367 .Dl "mdmfs -s 32m md /tmp"
369 The same file system created as an entry in
372 .Dl "md /tmp mfs rw,-s32m 2 0"
374 Create and mount a 16 megabyte malloc-backed file system on
380 do not use soft-updates on it and mount it
383 .Dl "mdmfs -M -S -o async -s 16m md1 /tmp"
387 based compressed disk image:
389 .Dl "mdmfs -P -F foo.uzip -oro md.uzip /tmp/"
391 Mount the same image, specifying the
395 .Dl "mdmfs -P -F foo.uzip -oro md1.uzip /tmp/"
397 Configure a vnode-backed file system and mount its first partition,
398 using automatic device numbering:
400 .Dl "mdmfs -P -F foo.img mds1a /tmp/"
402 Mount a vnode-backed cd9660 file system using automatic device numbering:
404 .Dl "mdmfs -T cd9660 -P -F foo.iso md /tmp"
408 utility, while designed to be compatible with
410 can be useful by itself.
413 had some silly defaults, a
415 mode is provided for the case where bug-to-bug compatibility is desired.
417 Compatibility is enabled by starting
424 .Xr getprogname 3 ) .
425 In this mode, the following behavior, as done by
428 .Bl -bullet -offset indent
436 was given on the command line.