Commit Graph

212 Commits

Author SHA1 Message Date
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
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
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
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
Pawel Jakub Dawidek
850590166f Allow geli to operate on read-only providers.
Initial patch from:	vd
MFC after:		2 weeks
2006-08-09 18:11:14 +00:00
Pawel Jakub Dawidek
7fd26f86d1 Add missing #. 2006-08-07 20:09:09 +00:00
Pawel Jakub Dawidek
c84efdca04 Allow to use the old -a option to specify an encryption algorithm to use
(for backward compatibility), but print a warning to inform about the
change.
2006-06-06 22:06:24 +00:00
Christian Brueffer
6f36bcfc77 Clarify and merge two sentences.
Discussed with:		pjd
2006-06-06 19:03:51 +00:00
Christian Brueffer
b47c8c10c3 Mdoc cleanup and some wording improvements. 2006-06-06 14:02:13 +00:00
Pawel Jakub Dawidek
ba0b146814 Remove section committed by mistake. It is not yet ready. 2006-06-06 07:10:42 +00:00
Pawel Jakub Dawidek
198eeec116 Document geli(8) data authentication.
Supported by:	Wheel Sp. z o.o. (http://www.wheel.pl)
2006-06-05 21:43:51 +00:00
Pawel Jakub Dawidek
7fe923a866 Userland bits of geli(8) data authentication.
Now, encryption algorithm is given using '-e' option, not '-a'.
The '-a' option is now used to specify authentication algorithm.

Supported by:	Wheel Sp. z o.o. (http://www.wheel.pl)
2006-06-05 21:40:54 +00:00
Pawel Jakub Dawidek
8134d91329 Correct error messages.
MFC after:	2 weeks
2006-05-01 12:05:45 +00:00
Ruslan Ermilov
e1fe3dba5c Reimplementation of world/kernel build options. For details, see:
http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html

The src.conf(5) manpage is to follow in a few days.

Brought to you by:	imp, jhb, kris, phk, ru (all bugs are mine)
2006-03-17 18:54:44 +00:00
Pawel Jakub Dawidek
67bcd64670 Add some notes how to properly dump kernel onto gmirror provider.
Reviewed and corrected by:	brueffer
MFC after:	3 days
2006-03-08 08:50:52 +00:00
Wojciech A. Koszek
98213e5c70 Print "clear" and "dump" only once.
Reviewed by:	pjd
Approved by:	cognet (mentor)
MFC after:	3 days
2006-03-03 21:35:57 +00:00
Pawel Jakub Dawidek
17f4ac945f Add an example how to use keyfiles for encrypted providers which should be
attached before the root file system is mounted.

MFC after:	3 days
2006-02-11 13:18:47 +00:00
Pawel Jakub Dawidek
f2aa80d883 - Allow to use -b without passphrase or with keyfiles as it will be
supported for a moment.
- Don't allow to use -i when no passphrase is given. Now if iterations is
  equal to -1 (not set), we know that we should not ask for the passphrase
  on boot.
  It still doesn't handle situation when one key is protected with
  passphrase and the other is not. There is no quick fix for this.
  The complete solution will be to make number of iterations a per-key
  value. Because this need metadata format change and is only needed for
  devices attached on boot, I'll leave it as it is for now.

MFC after:	3 days
2006-02-11 13:04:10 +00:00
Pawel Jakub Dawidek
f1650f412f Deny init/attach/setkey subcommands when no key components are given.
MFC after:	3 days
Tested with:	prove /usr/src/tools/regression/geom_eli
2006-02-01 15:01:55 +00:00
Joel Dahl
fbf9b468d5 Expand contractions. 2006-02-01 14:33:14 +00:00
Pawel Jakub Dawidek
66aa222e60 Remove trailing spaces. 2006-02-01 12:11:37 +00:00
Pawel Jakub Dawidek
4ca64f1db6 Remove unused argument.
MFC after:	3 days
2006-01-31 15:55:52 +00:00
Pawel Jakub Dawidek
aaf8e1867b Allow to specify only one disk. This is helpful when we want to extend
our concatenated device later.

MFC after:	1 week
2006-01-30 22:47:07 +00:00
Pawel Jakub Dawidek
df3d5a19fc Teach NOP GEOM class how to gather the following statistics:
- number of read I/O requests,
- number of write I/O requests,
- number of read bytes,
- number of written bytes.
Add 'reset' subcommand for resetting statistics.
2005-12-08 23:00:31 +00:00
Pawel Jakub Dawidek
f13942a746 - The geom(8) utility only uses three types of arguments: string (char *),
value (intmax_t) and boolean (int).
  Based on that provide three functions:
        - gctl_get_ascii()
        - gctl_get_int()
        - gctl_get_intmax()
- Hide gctl_get_param() function, as it is only used internally in
  subr.c.
- Allow to provide argument name as (fmt, ...).
- Assert geom(8) bugs (missing argument is a geom(8) bug).

- Clean-up and simplify the code by using new functions and assumtions
  (no more checking for missing argument).

Tested by:	regression tests
2005-12-07 01:38:27 +00:00
Joel Dahl
19797b2256 s/5.5/6.0/ in HISTORY section.
Discussed with:	ru
2005-11-24 09:25:10 +00:00
Ceri Davies
dd7337fc3a gmirror.8:
Note the default balancing algorithm and stripe size.

geom_mirror.c:
  Slightly friendlier error message.

Reviewed by:	pjd
2005-10-25 13:45:07 +00:00
Pawel Jakub Dawidek
0896d83c56 Add a note in example as well, that last sector is used for metadata,
so it don't provoke confusions.

Noticed by:	Victor Sudakov <sudakov@sibptus.tomsk.ru>
MFC after:	2 days
2005-09-29 08:56:15 +00:00
Pawel Jakub Dawidek
df7eabb059 Even if there are no valid keys in metadata, but provider is attached
we can still use setkey subcommand.

MFC after:	3 days
Found by:	regression tests
2005-09-10 07:43:03 +00:00
Marius Strobl
52a7b796a4 As with NO_CRYPT, don't try to compile geli(8) when NO_OPENSSL is defined
either.

MFC after:	1 week
2005-08-27 20:51:12 +00:00
Takanori Watanabe
cf5a7ef8d1 Update Document. 2005-08-26 11:39:38 +00:00
Pawel Jakub Dawidek
dd549194ae By default, when doing crypto work in software, start as many threads
as we have active CPUs and bind each thread to its own CPU.

MFC after:	3 days
2005-08-21 18:12:51 +00:00
Pawel Jakub Dawidek
7a5c26fcbd Allow to change number of iterations for PKCS#5v2. It can only be used
when there is only one key set.

MFC after:	3 days
2005-08-19 22:19:25 +00:00
Pawel Jakub Dawidek
829781048d Move function for calculating number of bits into more central place.
I want to use it so more.

MFC after:	3 days
2005-08-19 22:13:09 +00:00
Pawel Jakub Dawidek
4cb6ca7622 Update manual page (now dedicated kernel thread is always started).
MFC after:	3 days
2005-08-17 15:27:23 +00:00
Pawel Jakub Dawidek
5b5a030fa4 When keys were configured without passphrase, number of iterations in
metadata is equal to -1. if we then wanted to attach provider (or change
keys) and forget about '-p' flag it failed on assertion (quite ok, without
assertion it could call PKCS#5v2 with 4294967295 iterations).

Instead of failing on assertion, remind about '-p' flag.

MFC after:	3 days
2005-08-14 14:13:07 +00:00
Pawel Jakub Dawidek
325319eb3d GELI doesn't need cryptodev.
MFC after:	2 days
2005-08-12 07:44:42 +00:00
Pawel Jakub Dawidek
9417a618d1 Add code for Ext2FS and ReiserFS labels recognition.
Submitted by:	Stanislav Sedov <stas@310.ru>
PR:		kern/84638
MFC after:	1 week
2005-08-12 00:27:45 +00:00
Ruslan Ermilov
a5de1230a9 Add missing check for the NO_CRYPT build option.
Reported by:	Alexander Polakov
2005-08-02 20:12:30 +00:00
Christian Brueffer
acc79971c2 Misc cleanup (spelling, grammar, mdoc, style, cut >80 char lines). 2005-07-30 13:27:15 +00:00
Pawel Jakub Dawidek
fd833a6a19 I actually do need libmd. 2005-07-29 10:06:57 +00:00
Pawel Jakub Dawidek
a05fe8d0e5 I think I found the problem, reconnect geli to the build. 2005-07-27 23:56:32 +00:00
Pawel Jakub Dawidek
0ee6653d31 - Reduce WARNS level to 3, so it will be compilabe on alpha.
- Don't link libmd, it is not needed.
- Connect manual page to the build.

MFC after:	1 week
2005-07-27 23:56:01 +00:00
Pawel Jakub Dawidek
f90af958e4 Disconnect geli from the build for now.
I need to find out first what is the cause of sha2.c compilation problem
on alpha.
2005-07-27 23:30:50 +00:00
Pawel Jakub Dawidek
5ca1fcfe06 Connect GEOM_ELI class to the build.
MFC after:	1 week
2005-07-27 21:47:55 +00:00
Pawel Jakub Dawidek
c58794debd Add GEOM_ELI class which provides GEOM providers encryption.
For features list and usage see manual page: geli(8).

Sponsored by:	Wheel Sp. z o.o.
		http://www.wheel.pl
MFC after:	1 week
2005-07-27 21:43:37 +00:00
Pawel Jakub Dawidek
436b93a0dd Don't forget to initialize 'id' field.
MFC after:	3 days
2005-07-13 07:46:55 +00:00
Pawel Jakub Dawidek
0080ee9897 Fix stripe size in example.
Found by:	kris
MFC after:	3 days
2005-04-26 09:23:21 +00:00
Pawel Jakub Dawidek
8bdc733007 Remove duplicated description of 'clear' subcommand.
Pointed out by:	marck
X-MFC-after:	few seconds
2005-04-23 12:17:21 +00:00
Pawel Jakub Dawidek
d37ed29c98 Document 'clear' and 'dump' subcommands.
MFC after:	1 week
2005-04-15 23:51:20 +00:00
Pawel Jakub Dawidek
220bc2ffc1 Allow classes to specify local source files.
MFC after:	3 weeks
2005-04-07 15:57:38 +00:00
Pawel Jakub Dawidek
e10c321f69 Define subcommands' usage inside g_command structure.
MFC after:	1 week
2005-03-14 14:25:47 +00:00
Pawel Jakub Dawidek
650a08d046 Instead of documenting every standard subcommand's argument everywhere,
just leave reference to geom(8).

MFC after:	1 week
2005-03-14 13:14:04 +00:00
Pawel Jakub Dawidek
85e9dc7d1b - Document 'status' subcommand.
- Update copyrights.

MFC after:	1 week
2005-03-13 19:38:12 +00:00
Christian Brueffer
7b3512daac Typos and grammar fixes, wordsmithing 2005-02-28 01:33:10 +00:00
Pawel Jakub Dawidek
e68909854c - Add md_provsize field to metadata, which will help with
shared-last-sector problem.
  After this change, even if there is more than one provider with the same
  last sector, the proper one will be chosen based on its size.
  It still doesn't fix the 'c' partition problem (when da0s1 can be confused
  with da0s1c) and situation when 'a' partition starts at offset 0
  (then da0s1a can be confused with da0s1 and da0s1c). One can use '-h'
  option there, when creating device or avoid sharing last sector.
  Actually, when providers share the same last sector and their size is equal,
  they provide exactly the same data, so the name (da0s1, da0s1a, da0s1c)
  isn't important at all.
- Provide backward compatibility.
- Update copyright's year.

MFC after:	1 week
2005-02-27 23:07:47 +00:00
Tom Rhodes
087f49016f Fix a couple of grammar nits.
PR:		77437
Submitted by:	Paul A. Hoadley <paulh@logicsquad.net> (original version)
2005-02-24 01:00:09 +00:00
Pawel Jakub Dawidek
fa30f3b293 Fix year in copyrights. 2005-02-16 22:19:13 +00:00
Ruslan Ermilov
6087df9e8b Sort sections. 2005-01-18 10:09:38 +00:00
Ruslan Ermilov
a866e17077 Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
Pawel Jakub Dawidek
a064f065ee Fix arguments syntax.
Manual pages fixes by:	ru
MFC after:		3 days
2005-01-15 13:02:50 +00:00
Ruslan Ermilov
e6ee149692 Markup fixes. 2005-01-15 10:05:02 +00:00
Pawel Jakub Dawidek
560cb85703 Connect SHSEC GEOM class to the build. 2005-01-11 18:18:40 +00:00
Pawel Jakub Dawidek
080361d6b8 Introduce a new GEOM class - SHSEC. It provides sharing secret between
the given providers. Without even one of the configured components there
should be no way to get the secret.

Supported by:	WHEEL Sp. z o.o.
		http://www.wheel.pl
2005-01-11 18:06:44 +00:00
Ruslan Ermilov
214144704b Scheduled mdoc(7) sweep. 2005-01-10 16:17:34 +00:00
Pawel Jakub Dawidek
a245a5483c - Add genid field to the metadata which will allow to improve reliability a bit.
After this change, when component is disconnected because of an I/O error,
  it will not be connected and synchronized automatically, it will be logged
  as broken and skipped. Autosynchronization can occur, when component is
  disconnected (on orphan event) and connected again - there were no I/O
  error, so there is no need to not connected the component, but when there were
  writes while it wasn't connected, it will be synchronized.
  This fix cases, when component is disconnected because of I/O error and can be
  connected again and again.
- Bump version number.
- Implement backward compatibility mechanism. After this change when metadata in
  old version is detected, it is automatically upgraded to the new (current)
  version.
2004-12-25 19:17:47 +00:00
Pawel Jakub Dawidek
9a9f504132 - Add genid field to the metadata which will allow to improve reliability a bit.
After this change, when component is disconnected because of an I/O error,
  it will not be connected and synchronized automatically, it will be logged
  as broken and skipped. Autosynchronization can occur, when component is
  disconnected (on orphan event) and connected again - there were no I/O
  error, so there is no need to not connected the component, but when there were
  writes while it wasn't connected, it will be synchronized.
  This fix cases, when component is disconnected because of I/O error and can be
  connected again and again.
- Bump version number.
- Add version change history.
- Implement backward compatibility mechanism. After this change when metadata in
  old version is detected, it is automatically upgraded to the new (current)
  version.
2004-12-22 23:09:32 +00:00
Pawel Jakub Dawidek
84a8a1332e 'forget' command takes device names, not provider names. 2004-12-22 17:50:44 +00:00
Pawel Jakub Dawidek
53ed4e0d54 - Turn off 'fast' mode by default and increase maximum memory to consume
when this mode is used.
- Manual page update.
2004-12-09 12:26:47 +00:00