Commit Graph

37 Commits

Author SHA1 Message Date
Gordon Bergling
f2ec704adc mdmfs(8): Fix an issue reported by mandoc
- whitespace at end of input line

MFC after:	1 week
2020-10-03 18:47:50 +00:00
Kyle Evans
f852618602 mdmfs(8): add -k skel option to populate fs from a skeleton
mdmfs(8) lacks the ability to populate throwaway memory filesystems from an
existing directory.

This features permits an interesting setup where /var for instance lives on
a device where wear-leveling is something you want to avoid as much as
possible and nonetheless you don't want to lose your logs, ports metadata,
etc. Here are the steps:

1. Copy /var to /var.bak;
2. Mount an mfs into /var using -k /var.bak at startup;
3. Synchronize /var to /var.bak weekly and on shutdown.

Note that this more or less mimics OpenBSD's mount_mfs(8) -P flag.

PR:		146254
Submitted by:	jlh (many moons ago)
MFC after:	1 week
2019-11-01 03:10:53 +00:00
Ian Lepore
50e3590c44 Enhance mdmfs(8) to work with tmpfs(5).
Existing scripts and associated config such as rc.initdiskless, rc.d/var,
and others, use mdmfs to create memory filesystems. That program accepts a
size argument which allows SI suffixes and treats an unsuffixed number as a
count of 512 byte sectors. That makes it difficult to convert existing
scripts to use tmpfs instead of mdmfs, because tmpfs treats unsuffixed
numbers as a count of bytes. The script logic to deal with existing user
config that might include suffixed and unsuffixed numbers is... unpleasant.

Also, there is no g'tee that tmpfs will be available. It is sometimes
configured out of small-resource embedded systems to save memory and flash
storage space.

These changes enhance mdmfs(8) so that it accepts two new values for the
'md-device' arg: 'tmpfs' and 'auto'. With tmpfs, the program always uses
tmpfs(5) (and fails if it's not available). With 'auto' the program prefers
tmpfs, but falls back to using md(4) if tmpfs isn't available. It also
handles the -s <size> argument so that the mdconfig interpetation of
unsuffixed numbers applies when tmpfs is used as well, so that existing user
config keeps working after a switch to tmpfs.

A new rc setting, mfs_type, is added to etc/defaults/rc.conf to let users
force the use of tmpfs or md; the default value is "auto".

Differential Revision:	https://reviews.freebsd.org/D12301
2017-09-29 22:13:26 +00:00
Allan Jude
0fcf43f6f3 Add missing history sections to a number of storage related man pages
gmultipath.8: Add HISTORY
	Adjust sentences with bad phrases picked up by igor

ggatec.8: Add HISTORY

ggated.8: Add HISTORY

ggatel.8: Add HISTORY
	Seperate out sentence as advised by igor.

hastctl.8: Add HISTORY

hastd.8: Add HISTORY
	Fix sentence highlighted by igor.

iscontrol.8: Add HISTORY

mdmfs.8: Add HISTORY
	Address issues raised by igor

mount_nfs.8: Add HISTORY
	Not sure where mount_nfs first showed up, but the verison used
	in the BSD's originates from 4.4BSD according to CSRG archive.

	Though commercial offerings from Sun and others covers older
	systems, eg https://groups.google.com/forum/#!topic/net.unix-wizards/lMe7aQikqJI

nandfs.8: Add HISTORY
	Adjust sentence in description to address bad phrase highlighted
	by igor.

nvmecontrol.8: Add HISTORY

PR:		212491
PR:		212498
PR:		212499
PR:		212500
PR:		212501
PR:		212502
PR:		212505
PR:		212508
PR:		212540
PR:		212543
PR:		212546
Submitted by:	Sevan Janiyan <venture37@geeklan.co.uk>
2016-09-16 04:28:31 +00:00
Alex Kozlov
9bb18677ba - Implement -T option to allow to specify a fs type for a vnode-backed memory disk
- Rephrase -t option description (manpage)
- Split long sentences (manpage)

Differential Review:	https://reviews.freebsd.org/D4394

Reviewed by:	mav, wblock (manpage)
Approved by:	mav
2016-03-11 06:07:09 +00:00
Alexander Motin
fd07a29ced Update meaning of -n argument.
Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after:	1 week
2016-03-07 10:56:21 +00:00
Eitan Adler
50d675f7a9 Remove trailing whitespace per mdoc lint warning
Disussed with:	gavin
No objection from:	doc
Approved by:	joel
MFC after:	3 days
2012-03-29 05:02:12 +00:00
Konstantin Belousov
bf6619ba88 dd -t switch for mdmfs to enable TRIM on the configured filesystem.
While there, fix minor style issues.

Submitted by:	Alex Kozlov <spam rm-rf kiev ua>
MFC after:	1 week
Approved by:	re (bz)
2011-09-06 10:19:01 +00:00
Ceri Davies
032ae0f379 Grammar nits. 2007-02-15 21:49:32 +00:00
Matteo Riondato
de63bf714c Add examples for configuring and mounting geom_uzip(4) based disks'
image and sliced/partitioned memory disks.
MFC after:	1 week
2007-02-15 18:07:52 +00:00
Matteo Riondato
c72132f05f Correct -c and -d description.
Other requests made in the PR were already solved in the past.

PR:		bin/66763
MFC after:	1 week
2007-02-15 14:46:04 +00:00
Ruslan Ermilov
957d7c8f9c Remove the -C option as it does more harm than good. To be fully
compatible, it would have to (at least):

- support the "compat-compat" -T option,
- *not* support the -l, -O, and -v options,
- default to soft updates being disabled.

Worse, the compatibility mode makes it impossible to mount_mfs(8)
a file system from fstab(5) with soft updates disabled (-S).  [1]

Now, the only difference when called as "mount_mfs" or "mfs" (as
opposed to "mdmfs") is that the file mode of the mount point is
set by default to 01777.  All options available to mdmfs(8) are
also available to mount_mfs(8); the -C option is still recognized
but ignored for backward compatibility.

PR:		bin/98860 [1]
MFC after:	2 weeks
2006-11-03 12:02:24 +00:00
Ruslan Ermilov
02f6fe9e59 Fix .Dd arguments. 2006-10-21 16:02:42 +00:00
Matteo Riondato
e7e3ba9bbc The UFS filesystem get created only if -P was not specified.
Specify this on the description

MFC after:	3 days
2006-10-01 09:40:55 +00:00
Ruslan Ermilov
8266d47670 Markup fixes. 2006-09-18 11:55:10 +00:00
Maxim Sobolev
63f8ddbe92 Add new -E option, which allows to specify location of the mdconfig(8)
utility instead of using default _PATH_MDCONFIG (/sbin/mdconfig).

MFC after:      1 week
2006-02-16 21:28:54 +00:00
Dima Dorfman
05b2fd309f Add a -P option to allow skipping newfs when using a vnode-backed
disk. Apparently some people want to use mdmfs as mount_* as a
shortcut for mounting existing file-based file systems.

Note that unlike in the patches from the submitters, this option is
not available in compat mode. Compat mode was supposed to support only
things that mount_mfs used to support. To use this option from fstab,
mdmfs should be called mount_md, not mount_mfs. This distinction has
not always upkept for new options, and those can't be fixed now
without breaking people's systems, but new options should not usually
be allowed in compat mode. (Not sure why -F is allowed there at all.)

PR:		57641
Submitted by:	Ruben de Groot
Submitted independently by: Wojciech A. Koszek, for Urzad Miasta Czestochowa
2006-01-02 01:50:30 +00:00
Ruslan Ermilov
d04b5dfe6c Assorted markup, grammar, and spelling fixes. 2004-05-17 08:35:43 +00:00
Robert Watson
1d3170aa53 Add a "-l" parameter to mdmfs so that memory file systems can be
created with the multilabel flag from inception.  This simply
passes the "-l" flag on to newfs(8).

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, McAfee Research
2004-02-26 01:15:47 +00:00
Yaroslav Tykhiy
ce03e3a7bd Don't reinvent the wheel: Use setmode(3) to interpret
a file mode specification from the command line.  This
approach is more flexible and less error-prone than using
a mere strtoul(3).
2003-08-05 15:04:39 +00:00
Ruslan Ermilov
031ba6ffd4 mdoc(7) fix: Add the forgotten paragraph command.
Approved by:	re (blanket)
2003-05-17 22:31:48 +00:00
Doug Barton
4460871b32 Add an example of how to create an fstab entry. 2003-05-05 23:41:17 +00:00
Doug Barton
f72709f6ae Also MLINK the man page for mount_mfs. 2003-04-27 01:40:45 +00:00
Jens Schweikhardt
57bd0fc6e8 english(4) police. 2002-12-27 12:15:40 +00:00
Robert Watson
622448fa77 Teach mdmfs how to pass UFS version numbers through to newfs. Because
of an argument name collision with -O, use -v, and default to whatever
the newfs default is for the platform (generally, UFS1).  This is
required to support diskless workstations that use UFS2 for their
mdmfs file systems.

Reviewed by:	dd, bmah
Approved by:	re (bmah)
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-12-01 23:19:57 +00:00
Poul-Henning Kamp
b7e368f7c1 Don't disklabel(8) the md(4) device, it is not needed, and we don't want
to propagete BSD disklabels to architectures not already so polluted.

Sponsored by:	DARPA & NAI Labs.
2002-09-22 09:46:28 +00:00
Tom Rhodes
ce66ddb763 s/filesystem/file system/g as discussed on -developers 2002-08-21 18:11:48 +00:00
Philippe Charnier
e1205e80e5 The .Nm utility 2002-07-06 19:34:18 +00:00
Ian Dowse
2dc4ac06ce Enable bug-for-bug compatibility with mount_mfs when the program
name is "mount_mfs" or "mfs". Previously, the condition was that
the program name must start with "mount_", but this both missed
the case where mount(8) invokes mdmfs with argv[0] = "mfs", and it
included cases such as "mount_md" where compatibility is not
required.

Reviewed by:	dd
2001-09-30 15:14:16 +00:00
Ruslan Ermilov
6a68a83e56 mdoc(7) police: Section cross-references are marked with .Sx.
-compat is not a valid keyword.
2001-08-16 07:43:16 +00:00
Dima Dorfman
f7acb7e404 Implement a better compatibility mode with mount_mfs. It is the
default if the executable is named (called as) "mount_*", or can be
enabled with the -C option.  This allows users to leave their old
fstab entires unchanged (modulo symlink'ing mdmfs to mount(md|mfs))
and have things behave the way they should (by emulating mount_mfs
silliness), while still allowing mdmfs to be used as a generic
make-an-md-and-mount-it type thing.

Right now, the only effects of this option is to set the mount-point
mode to 01777 as if "-p 1777" was given, and to complain about getting
command-line options that mount_mfs didn't take (e.g., -X, -L, et al).
The latter is mostly to try to catch operator errors.

Also implement -U, which turns on soft-updates.  It's redundant (since
softdep is the default), but implement it anyway for compatibility.
2001-08-16 02:40:29 +00:00
Dima Dorfman
ab1d004fd0 Document -X.
Submitted by:	kris
2001-07-30 09:13:21 +00:00
Dima Dorfman
d69f5dee04 Nuke my e-mail address since it seems out of place here. 2001-07-30 09:11:17 +00:00
Dima Dorfman
ba40ba4754 Add a missing word.
Submitted by:	Alexander Leidinger <Alexander@Leidinger.net>
2001-06-20 22:10:31 +00:00
Dima Dorfman
29dfd70b01 Add a SEE ALSO section. 2001-06-20 00:37:34 +00:00
Dima Dorfman
9dde6035c7 Miscellaneous mdoc(7) fixes; also expand contractions.
Submitted by:	ru
2001-06-20 00:34:20 +00:00
Dima Dorfman
4d7de91f9e Introduce mdmfs(8), a wrapper around mdconfig(8), disklabel(8),
newfs(8), and mount(8) that mimics the command line option set of the
deprecated mount_mfs(8).

Approved by:	jkh, phk, -hackers
2001-06-18 23:46:58 +00:00