Commit Graph

211 Commits

Author SHA1 Message Date
Marcel Moolenaar
a16f9b367d Allow building of a special rescue version of geom that
has a subset of the classes compiled-in.
2007-11-04 00:32:54 +00:00
Marcel Moolenaar
b3f09ae457 Fix a last-minute, but more importantly, an untested change that
made the previous commit non-functional: the usage string was put
in the wrong field...
2007-10-21 19:38:21 +00:00
Marcel Moolenaar
c83e7f0d4c Add the show command to print the partition information ala gpt(8).
Update the manpage accordingly. While here, mention the MBR scheme
and add a bugs section. With this commit gpt(8) can be obsoleted.
2007-10-21 00:04:23 +00:00
Pawel Jakub Dawidek
f854db0bf5 Bring in the GEOM Virtualisation class, which allows to create huge GEOM
providers with limited physical storage and add physical storage as
needed.

Submitted by:	Ivan Voras
Sponsored by:	Google Summer of Code 2006
Approved by:	re (kensmith)
2007-09-23 07:34:23 +00:00
Pawel Jakub Dawidek
e84091cb52 For arguments declared as numbers always use expand_number(3).
This allows to use numbers in human-readable form in many geom(8)
utilities. Such a simple change and makes live so much nicer.
Some examples:

	gstripe label -s 16k
	gmirror label -s 4k
	gnop create -o 1g -s 128m -S 2k
	gjournal label -s 2g
	geli label -i 128k -s 4k

Approved by:	re (kensmith)
2007-09-21 10:00:05 +00:00
Pawel Jakub Dawidek
764907187e Use 'val' function argument instead of 'optarg' global variable.
This doesn't fix any real bug, because in those tw ocases we always
passed 'optarg' as 'val'.

Approved by:	re (kensmith)
2007-09-21 09:52:43 +00:00
Pawel Jakub Dawidek
864cba9669 Add support for Camellia encryption algorithm.
PR:		kern/113790
Submitted by:	Yoshisato YANAGISAWA <yanagisawa@csg.is.titech.ac.jp>
Approved by:	re (bmah)
2007-09-01 06:33:02 +00:00
Ruslan Ermilov
0a21e430f3 Fix the online usage for the "dump" command. 2007-05-24 09:21:20 +00:00
Marcel Moolenaar
cf805fab87 Fix the construction of the gctl_req that got broken by my
previous commit and that introduced optional parameters.
Existing classes (like geli(8)) use empty strings by default
and expect the parameter to be passed to the kernel as such.
Also, the default value of a string argument can be NULL.
Fix both cases by making the optional parameter conditional
upon gc_argname being set and making sure to test for NULL
before dereferencing the pointer.

Reported by: brueffer@
2007-05-17 15:34:51 +00:00
Marcel Moolenaar
18e10ae841 Bump G_LIB_VERSION to reflect the ABI change.
Pointed out by: pjd@
2007-05-16 23:32:40 +00:00
Marcel Moolenaar
3cf55d3ab9 Add gpart(8).
In order to support gpart(8), geom(8) needs to support a named
argument. Also, optional string parameters are a requirement.
Both have been added to the infrastructure. The former required
all existing classes to be adjusted.
2007-05-15 20:25:18 +00:00
Pawel Jakub Dawidek
18eb427c60 Correct some typos. 2007-05-06 14:54:41 +00:00
Pawel Jakub Dawidek
e15b9720f1 Fix mdoc warnings. 2007-05-06 00:31:38 +00:00
Pawel Jakub Dawidek
e6d0ea1022 Do some cleanups (like freeing memory and closing file descriptors) before
leaving the functions.
2007-05-01 23:33:12 +00:00
Pawel Jakub Dawidek
89f75c2a04 - Protect against specifing journal less than 100MB and against journal
which size is not multiple of sector size.

  Reported by:	Eric Anderson <anderson@centtech.com>

- Improve wording in error message. I'm sorry, I don't remember who
  submitted this one.
2007-04-03 15:29:16 +00:00
Pawel Jakub Dawidek
5d47cd0f1a Exit status should be 1 on error.
PR:		bin/110705
Reported by:	Tom Judge
MFC after:	2 weeks
2007-03-23 21:05:36 +00:00
Pawel Jakub Dawidek
97a669a3b2 Warn when user use sectorsize bigger than the page size, which will lead
to problems when the geli device is used with file system or as a swap.

Hopefully will prevent problems like kern/98742 in the future.

MFC after:	1 week
2007-03-05 12:41:44 +00:00
Pawel Jakub Dawidek
5b110804b1 Fix incorrect comment. Geli will protect against data modification, of
course! It won't protect against reply attacks - try harder to explain
them correctly.

MFC after:	1 week
2007-03-05 12:39:49 +00:00
Alex Dupre
65835cf341 Call the multipath device with its real name. 2007-02-27 08:56:11 +00:00
Christian Brueffer
eb6cb8953e First cleanup pass: new sentence -> new line, typos fixed, some markup
errors fixed.
2007-02-27 07:53:20 +00:00
Matt Jacob
a5e9bfc6f9 Add a man page. 2007-02-27 07:29:15 +00:00
Matt Jacob
e770bc6bf5 First cut at GEOM based multipath. This is an active/passive{/passive...}
arrangement that has no intrinsic internal knowledge of whether devices
it is given are truly multipath devices. As such, this is a simplistic
approach, but still a useful one.

The basic approach is to (at present- this will change soon) use camcontrol
to find likely identical devices and and label the trailing sector of the
first one. This label contains both a full UUID and a name. The name is
what is presented in /dev/multipath, but the UUID is used as a true
distinguishor at g_taste time, thus making sure we don't have chaos
on a shared SAN where everyone names their data multipath as "Fred".

The first of N identical devices (and N *may* be 1!) becomes the active
path until a BIO request is failed with EIO or ENXIO. When this occurs,
the active disk is ripped away and the next in a list is picked to
(retry and) continue with.

During g_taste events new disks that meet the match criteria for existing
multipath geoms get added to the tail end of the list.

Thus, this active/passive setup actually does work for devices which
go away and come back, as do (now) mpt(4) and isp(4) SAN based disks.

There is still a lot to do to improve this- like about 5 of the 12
recommendations I've received about it,  but it's been functional enough
for a while that it deserves a broader test base.

Reviewed by: pjd
Sponsored by: IronPort Systems
MFC: 2 months
2007-02-27 04:01:58 +00:00
Pawel Jakub Dawidek
e739933759 Correct typo.
Spotted by:	Tomasz Dudzisz
2007-02-22 19:25:37 +00:00
Pawel Jakub Dawidek
2e0f7f9fb0 Forgot to hook up gjournal manual page to the build.
Reminded by:	simon, piso
2007-02-10 17:59:46 +00:00
Pawel Jakub Dawidek
51ca5b2182 Add gjournal(8) manual page. Documentation of kern.geom.journal.* sysctls
is still missing, ehh.

Reviewed by:	trhodes
2007-01-29 22:12:22 +00:00
Pawel Jakub Dawidek
eeefa1fa7e When the following conditions are meet:
- First configured key is based only on keyfile (no passphrase).
- Device is attached.
- User changes first key (setkey) from keyfile to passphrase and doesn't
  specify number of iterations (with -i option).
...geli(8) won't store calculated number of iterations in metadata.
This result in device beeing unaccesable after detach.

One can recover from this situation by guessing number of iterations
generated, storing it in metadata and trying to attach device.
Recovery procedure isn't nice, but one's data is not lost.

Reported by:	Thomas Nickl <T.Nickl@gmx.net>
MFC after:	1 week
2007-01-25 11:44:03 +00:00
Pawel Jakub Dawidek
1378624c2e Implement gctl_change_param() function, which changes value of existing
parameter.

MFC after:	1 week
2007-01-25 11:35:27 +00:00
Ceri Davies
32ef7e9ba8 Remove duplicate "clear" subcommand.
PR:		docs/106947
Submitted by:	TAOKA Fumiyoshi
2006-12-21 18:30:23 +00:00
Ceri Davies
42db1b70c5 Bump .Dd for -f|-F. 2006-11-02 10:44:02 +00:00
Pawel Jakub Dawidek
501250ba60 Now, that we have gjournal in the tree add possibility to configure
gmirror and graid3 in a way that it is not resynchronized after a
power failure or system crash.
It is safe when gjournal is running on top of gmirror/graid3.
2006-11-01 22:51:49 +00:00
Pawel Jakub Dawidek
aee5398c29 G_TYPE_NONE was replaced with G_TYPE_BOOL. 2006-11-01 22:28:11 +00:00
Pawel Jakub Dawidek
6634ef3651 Fix powerpc build.
Reported by:	Peter Grehan <grehan@freebsd.org>
2006-11-01 09:22:33 +00:00
Pawel Jakub Dawidek
f348204c94 Hook up gjournal bits to the build.
Sponsored by:	home.pl
2006-10-31 22:22:30 +00:00
Pawel Jakub Dawidek
bd7f6c2999 Add userland control utility for gjournal GEOM class.
Sponsored by:	home.pl
2006-10-31 21:32:54 +00:00
Pawel Jakub Dawidek
360df38e5f Be sure to not create devices with (mediasize % sectorsize) != 0.
Reported by:	xride
MFC after:	1 week
2006-10-10 15:00:32 +00:00
Pawel Jakub Dawidek
2e0ca9c4a3 Be sure to not create device which 2006-10-10 14:58:21 +00:00
Ruslan Ermilov
04c7da702f A GEOM cache can speed up read performance by sending fixed size
read requests to its consumer.  It has been developed to address
the problem of a horrible read performance of a 64k blocksize FS
residing on a RAID3 array with 8 data components, where a single
disk component would only get 8k read requests, thus effectively
killing disk performance under high load.  Documentation will be
provided later.  I'd like to thank Vsevolod Lobko for his bright
ideas, and Pawel Jakub Dawidek for helping me fix the nasty bug.
2006-10-06 08:27:07 +00:00
Pawel Jakub Dawidek
5e527bc0c9 MFp4: G_TYPE_BOOL sounds much better than G_TYPE_NONE.
Changes:	98722
2006-09-30 14:40:50 +00:00
Pawel Jakub Dawidek
6fc6000883 MFp4:
- Print proper error message when argument is specified twice.
  Before the change it was detected properly, because of how
  G_OPT_DONE() macro worked.
- Use err(3) functions where appropriate.
- Add some assertions.
- Bump version number, because G_TYPE_BOOL addition breaks API and ABI.

Changes:	98721,98722,98723,101360,106985
2006-09-30 14:39:18 +00:00
Pawel Jakub Dawidek
710d02a403 Add __printflike() attribute to various functions. 2006-09-30 14:35:37 +00:00
Ruslan Ermilov
8266d47670 Markup fixes. 2006-09-18 11:55:10 +00:00
Christian Brueffer
b94ebe0fad Remove a contraction and add a missing article. 2006-09-17 11:30:44 +00:00
Pawel Jakub Dawidek
1650d24936 Fix copy&paste mistake.
Submitted by:	Matthias Lederhofer <matled@gmx.net>
2006-09-16 10:47:30 +00:00
Pawel Jakub Dawidek
8abd1ad101 Add 'configure' subcommand which for now only allows setting and removing
of the BOOT flag. It can be performed on both attached and detached
providers.

Requested by:	Matthias Lederhofer <matled@gmx.net>
MFC after:	1 week
2006-09-16 10:43:17 +00:00
Pawel Jakub Dawidek
7330b46e36 Note that we don't destroy keys on read-only attached providers.
MFC after:	1 week
2006-09-16 09:27:54 +00:00
Pawel Jakub Dawidek
301b9004a9 First kill detached providers, because of two reasons:
- after killing all attached providers, all providers are then detached
  and operation is repeated for those who were attached,
- we don't want to remove keys for read-only attached providers, we only
  want to detach them.

MFC after:	1 week
2006-09-16 09:26:57 +00:00
Pawel Jakub Dawidek
6a146a1989 - Split failure probability configuration into read failure probability and
write failure probability.
- Allow to specify an error number to return of failure.

MFC after:	3 days
2006-09-08 09:21:21 +00:00
Maxim Konovalov
939b8dd67a o Spell.
Submitted by:	ru
2006-08-10 01:13:38 +00:00
Maxim Konovalov
5c5effc42f o Strip eol whitespaces. 2006-08-09 19:41:34 +00:00
Maxim Konovalov
cc163b19c0 o New sentence, new line.
o Touch Dd for -r.
2006-08-09 18:35:31 +00:00