Commit Graph

81 Commits

Author SHA1 Message Date
keramida
f407fc8e9b Add an example which shows how mdconfig(8) can be used
to mount an ISO 9660 CD image file.

PR:		112691
Submitted by:	Warren Block, wblock at wonkity.com
MFC after:	3 days
2007-05-18 13:57:17 +00:00
n_hibma
a5256aaa91 Kris suggested that swap is a better choice as a default than malloc.
MFC:	1 week
2007-02-20 22:04:23 +00:00
n_hibma
afe986e40e [Found the original diff I made, see previous commit for other part]
Assume '-a' and '-t malloc' flags for '-s <size>' (malloc ramdisk) if not
specified.

Reviewed by:	phk (some time ago)
MFC:		1 week
2007-02-20 21:29:30 +00:00
n_hibma
4a1dbd81cb Make attach the default for -f. That way
mdconfig -f image

works like a charm.

Reviewed by:	phk (some time ago)
MFC:		1 week
2007-02-20 21:04:12 +00:00
phk
7f0301fd6c Make WITHOUT_DYNAMICROOT=foo work again: remember to reference
libbsdxml and libsbuf.
2006-04-01 16:34:45 +00:00
jasone
8fe77c08b6 Unbreak the build. 2006-03-27 05:33:35 +00:00
wkoszek
9c74b5d797 For now, bring back some of the old bits as a fix for specifying md(4)
device number at creation time with -u option. Together with XMLizing
mdconfig(8), I broke this functionality.

This change is temporary. Complete fix will be commited soon.

Approved by:	cognet (mentor)
2006-03-27 00:46:22 +00:00
wkoszek
2a5afd7475 Teach md(4) and mdconfig(8) how to understand XML. Right now there won't be
a problem with listing large number of md(4) devices. Either 'list' or
'query' mode uses XML.

Additionally, new functionality was introduced. It's possible to pass
multiple devices to -u:

	# ./mdconfig -l -u md0,md1

Approved by:	cognet (mentor)
2006-03-26 23:21:11 +00:00
wkoszek
096cd178c1 Keep proper order of includes. Additionally, sort them. Make functions used
in that file static.

Approved by:	cognet (mentor)
2006-03-26 22:52:36 +00:00
pjd
c4fa5b3bb1 Use kld(3) for loading geom_md.ko. 2006-02-18 11:40:24 +00:00
dd
5ebe38d667 Sort the list results by the unit number. The list returned by the
kernel is in the order the devices were made, which is not useful to
the user. Also, remove the "%d more" test since the kernel does not
return the complete count in md_pad[0] (maybe it should?).

Submitted by:	Wojciech A. Koszek
2005-12-22 10:32:11 +00:00
pjd
679cff6ef7 Rename GEOM class kernel module g_md.ko to geom_md.ko for consistency
with the rest.

mdconfig.c:	Simplify mdmaybeload() function.
mdioctl.h:	Removed (now unused) #define.
loader.conf:	Sort GEOM classes properly.

OK'ed by:	phk
2005-11-11 11:31:23 +00:00
csjp
42baca97e5 When using files as backing stores for devices, and the user has requested the
device be created read+write, check to see if the backing store is read only
through the use of the access(2) system call. If this check fails returning
EACCES, EPERM or EROFS then gracefully downgrade the access to read only. Also
print a warning message to stderr, informing the user that the access mode
they requested is not available.

This behavior used to be handled by md(4) but was changed in revision 1.154

Discussed with:	pjd, phk, Dario Freni <saturnero at freesbie dot org>
Reviewed by:	phk
2005-08-30 16:45:32 +00:00
pjd
b375ed0383 We can specify device size in bytes. Document this in usage. 2005-03-01 14:56:49 +00:00
mr
66cd660bb1 Document the terabyte "-s" parameter in the usage string.
Split the usage line to not exceed 80 chars.
2005-02-21 09:09:07 +00:00
ru
719be5d341 Sync program's usage() with manpage's SYNOPSIS. 2005-02-10 09:19:34 +00:00
pjd
f7dfd80b65 Allow to specify device size in bytes.
MFC after:	1 week
2005-01-22 20:02:01 +00:00
pjd
b19cea505c Rewrite piece of code which I committed some time ago that allows to
show file name for 'mdconfig -l -u <x>' command.
This allows to preserve API/ABI compatibility with version 0 (that's why
I changed version number back to 0) and will allow to merge this change
to RELENG_5.

MFC after:	5 days
2004-12-27 17:20:06 +00:00
ru
aaa7e9e341 Sync usage() with manpage SYNOPSIS and code. 2004-11-13 17:08:52 +00:00
dd
0d0c457d3a Bump .Dd, replace missing letter, and prefer to use a verb that
matches the option letter.

Submitted by:	ru
Should know better by now:	dd
2004-11-06 14:03:37 +00:00
pjd
d18ec52c75 For file backed md(4) devices output their source file via
'mdconfig -l -u <unit>'.
Bump version number, as this change breaks ABI/API.
2004-11-06 13:07:02 +00:00
dd
1cf63fa355 Update the description of -l to reflect reality. After mdconfig.c
1.25, -l without -u only lists the names, so specifying -u does more
than just limit the output to one device.
2004-11-06 10:21:12 +00:00
dd
f289f714cb If there aren't any devices to list, output nothing instead of an
empty line. This is consistent with other utilities.

While I'm here, remove artifacts of the previous list implementation.
2004-11-06 09:56:27 +00:00
pjd
67f6d06709 - Make md(4) 64-bit clean.
After this change it should be possible to use very big md(4) devices.
- Clean up and simplify the code a bit.
- Use humanize_number(3) to print size of md(4) devices.
- Add 't' suffix which stands for terabyte.
- Make '-S' to really work with all types of devices.
- Other minor changes.
2004-09-16 21:32:13 +00:00
jmg
db223378ac add support for documented readonly option...
also print out the option that is unknow so that the user knows what (s)he
did wrong..

MFC after:	3 days
2004-09-08 20:28:29 +00:00
jmg
547a1b99a4 change the name of the md module, to g_md, introduce a define with the
name MD_MODNAME, and make mdconfig use this new define...
2004-08-09 06:45:20 +00:00
phk
0c577f0c87 Give better diagnostic for problems with backing files. 2004-07-25 08:17:23 +00:00
ru
46fddaa54b Mechanically kill hard sentence breaks. 2004-07-02 21:45:06 +00:00
ru
f6aa4621fd Assorted markup, grammar, and spelling fixes. 2004-05-17 08:35:43 +00:00
phk
0f56e66e2f Fix a long-standing deadlock issue with vnode backed md(4) devices:
On vnode backed md(4) devices over a certain, currently undetermined
size relative to the buffer cache our "lemming-syncer" can provoke
a buffer starvation which puts the md thread to sleep on wdrain.

This generally tends to grind the entire system to a stop because the
event that is supposed to wake up the thread will not happen until a fair
bit of the piled up I/O requests in the system finish, and since a lot
of those are on a md(4) vnode backed device which is currently waiting
on wdrain until a fair amount of the piled up ... you get the picture.

The cure is to issue all VOP_WRITES on the vnode backing the device
with IO_SYNC.

In addition to more closely emulating a real disk device with a
non-lying write-cache, this makes the writes exempt from rate-limited
(there to avoid starving the buffer cache) and consequently prevents
the deadlock.

Unfortunately performance takes a hit.

Add "async" option to give people who know what they are doing the
old behaviour.
2004-03-10 20:41:09 +00:00
phk
35bd1c71de s/bytes/byte/ 2004-02-19 19:53:07 +00:00
phk
39966fbafe Note that geometry can also be specified on vnode backed deviecs. 2004-01-12 10:54:09 +00:00
phk
880a2ed129 Warn that big malloc disks are a panic(8) implementation.
Submitted by:	Colin Percival <cperciva@builder.daemonology.net>
(Who should really get his own bit one of these days!)

PR:	59988
2004-01-02 14:28:06 +00:00
blackend
922aa1a4f4 Add a full example of a file-backed disk creation, I used the Handbook's
example.

PR:		docs/51897
Submitted by:	Kevin Oberman <oberman@es.net>
2003-10-11 09:59:25 +00:00
blackend
88e85b883a s/disklabel/bsdlabel where needed. 2003-10-11 08:24:07 +00:00
phk
e8e421549d Document the -x and -y options. 2003-09-21 19:05:35 +00:00
kan
8c2df19687 Do not compare unsigned int values with ULONG_MAX. The comparison is
always false on 64bit platforms and GCC 3.3.1 issues warning there.
2003-07-11 05:47:05 +00:00
rwatson
057b61aa1c Add "-n" argument, which causes mdconfig to simply print the unit
number X, rather than mdX, making it easier to script tests that
use md devices but don't want to make assumptions about any existing
md use (such as in diskless environments).
2003-06-11 06:38:24 +00:00
dougb
e1acb7b583 Add .Xr's to mdmfs(8).
Submitted by:	Scot W. Hetzel <hetzels@westbend.net>
2003-04-27 01:46:56 +00:00
phk
f3a79aea41 Add a couple of undocumented test options to MD(4) to aid in regression
testting of GEOM.
2003-04-09 11:59:29 +00:00
yar
5f9d93b08d Give clearer diagnostics on some cases of invalid
combinations of mdconfig(8) command-line arguments.

Make mdconfig(8) accept "-a -f file -o options"
equally with "-a -f file" (assuming "-t vnode".)
2003-04-01 15:23:55 +00:00
phk
7499df5457 Add a "-S sectorsize" option to enable Kirk to find a bug :-) 2003-03-03 13:05:00 +00:00
phk
e5f71e4b1b Don't use the kern.disks sysctl to find a list of md devices, use the
MDIOCLIST ioctl instead.

Spotted by:	keramida
2003-01-27 08:01:08 +00:00
keramida
70e019aa6b Make sure strsep() gets a nul-terminated string.
Reviewed by:	phk
2002-10-10 10:07:19 +00:00
phk
b8492c6de7 Don't show disklabel in the examples, it is not necessary. 2002-09-26 21:29:10 +00:00
trhodes
136be46680 s/filesystem/file system/g as discussed on -developers 2002-08-21 18:11:48 +00:00
imp
9a400152f8 Don't use NULL where you really mean 0 to sysctlbyname. 2002-08-21 15:15:15 +00:00
rse
80f61fa8f1 Replace extra call to "tunefs" with the equivalent of "newfs -U".
Reviewed by:	phk
2002-07-15 11:30:21 +00:00
charnier
a2accd01f0 The .Nm utility 2002-07-06 19:34:18 +00:00
des
4d6b787d2d Usage style sweep: spell "usage" with a small 'u'.
Also change one case of blatant __progname abuse (several more remain)
This commit does not touch anything in src/{contrib,crypto,gnu}/.
2002-04-22 13:44:47 +00:00