Commit graph

583 commits

Author SHA1 Message Date
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 687b001501 Detect if class name is '-h' or 'help' and if it is, show general help
message, i.e.:
	geom: usage: geom <class> <command> [options]

PR:		bin/71537
Submitted by:	bugghy <bugghy@phenix.rootshell.be>
MFC after:	5 days
2004-12-28 17:07:18 +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
Ruslan Ermilov 83c7ade90a NOSHARED -> NO_SHARED 2004-12-21 09:59:45 +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
Pawel Jakub Dawidek 4a9a72aa33 Note that sysctls documentation is missing. 2004-11-05 22:38:14 +00:00
Ceri Davies d608b5ab7e Grammatical and spelling improvements.
Reviewed by:	pjd
2004-11-04 19:12:43 +00:00
Pawel Jakub Dawidek 539309e427 Remove extra 's'.
Submitted by:	ceri
2004-11-03 17:31:09 +00:00
Pawel Jakub Dawidek 9e158770cf Be more correct.
Submitted by:	ceri
2004-11-03 17:21:37 +00:00
Pawel Jakub Dawidek 5628bfa721 Remove one more redundant 'not'. 2004-11-03 16:32:55 +00:00
Pawel Jakub Dawidek 57c4071989 Remove redundant 'not'. 2004-11-01 15:46:21 +00:00
David E. O'Brien 9a6e0a5e5c Embellish the man page after trying to migrate to gstripe from ccd(4). 2004-09-26 17:29:09 +00:00
Pawel Jakub Dawidek 0c8a9da21e Don't allow to specify wrong stripe size.
Reported by:	obrien
2004-09-26 17:15:42 +00:00
Pawel Jakub Dawidek ffb2425733 Document '-p' flag for 'insert' command correct. 2004-09-18 19:02:10 +00:00
Pawel Jakub Dawidek 5c8d2ac300 Do not exit after printing usage, give geom(8) a chance to show standard
commands.
2004-09-17 08:41:15 +00:00
Pawel Jakub Dawidek 138cedfdc6 - Show all commands in usage, even if those commands are not available.
- When command is not available, just say it, instead of says, that command
  is unknown. Old behaviour seems to be too confusing.
2004-09-17 08:38:53 +00:00
Pawel Jakub Dawidek edcf2d2891 When configuring RAID3 with verification option, force synchronization
of parity component, because we can't return an EIO error for read of
every sector which wasn't written first.

Discussed with:	phk
2004-08-30 22:08:00 +00:00
Pawel Jakub Dawidek 6654ade6e5 Warn the user if we are not going to use the whole provider's space. 2004-08-28 02:49:28 +00:00
Pawel Jakub Dawidek 08249e9e6e Warn the user if we are not going to use whole provider space.
Requested by:	Michael Handler <handler@grendel.net>
2004-08-28 02:34:10 +00:00
Pawel Jakub Dawidek f792f1d865 - If error string begins with "warning: ", don't exit, treat it as a warning
only.
- Use getprogname() function when informing about versions problem.
2004-08-28 02:29:40 +00:00
Pawel Jakub Dawidek b3530b8e7f Add missing GEOM classes, which are aware of geom(8).
Submitted by:	kuriyama
2004-08-23 06:23:17 +00:00
Pawel Jakub Dawidek 742925a31b Fix sysctl name. 2004-08-22 16:22:20 +00:00
Pawel Jakub Dawidek dba915cfee Implementation of 'verify reading' algorithm, which uses parity data for
verification of regular data when device is in complete state.
On verification error, EIO error is returned for the bio and sysctl
kern.geom.raid3.stat.parity_mismatch is increased.

Suggested by:	phk
2004-08-22 16:21:12 +00:00
Pawel Jakub Dawidek f5a2f7feac Implement new reading algorithm, which will use parity component for reading
as well, even if device is in complete state.
I observe 40% of speed-up with this option for random read operations,
but slowdown for sequential reads.
Basically, without this option reading from a RAID3 device built from 5
components (c0-c4) looks like this:

	Request no.	Used components
	1		c0+c1+c2+c3
	2		c0+c1+c2+c3
	3		c0+c1+c2+c3

With the new feature:

	Request no.	Used components
	1		c0+c1+c2+c3
	2		(c1^c2^c3^c4)+c1+c2+c3
	3		c0+(c0^c2^c3^c4)+c2+c3
	4		c0+c1+(c0^c1^c3^c4)+c3
	5		c0+c1+c2+(c0^c1^c2^c4)
	6		c0+c1+c2+c3
	[...]
2004-08-21 18:11:46 +00:00
Pawel Jakub Dawidek 925fa96b13 - Add a manual page for graid3(8) utility.
- Connect it to the build.
- Inform geom(8) about it.
2004-08-18 16:41:30 +00:00
Pawel Jakub Dawidek e3a3431fe8 Add a line to BUGS section about the need of implementation description. 2004-08-18 16:37:04 +00:00
Pawel Jakub Dawidek 0e45644862 Add some missing empty lines. 2004-08-18 16:14:24 +00:00
Pawel Jakub Dawidek 3d9be34543 Fix typo. 2004-08-18 16:09:20 +00:00
Pawel Jakub Dawidek c9b309abe7 Actually one can specify more than one device to stop. 2004-08-18 15:56:02 +00:00
Pawel Jakub Dawidek 4510a84d6b Ok, let's try again:
Add manual page for gmirror(8) utility.
2004-08-18 15:54:52 +00:00
Pawel Jakub Dawidek 0fe2ba03d6 - Add a manual page for gmirror(8) utility.
- Connect it to the build.
- Inform geom(8) manual page about it.

Reviewed by:	trhodes
2004-08-18 15:48:18 +00:00
Pawel Jakub Dawidek e81856c34c Connect RAID3 GEOM class to the build. 2004-08-16 06:36:21 +00:00
Pawel Jakub Dawidek 2d1661a5b6 Introduce GEOM RAID3 class, i.e. kernel module, which implements RAID3
transformation and graid3(8) userland utility, which can be used for
configuration. No manual page yet, sorry.

Hardware provided by:	Daniel Seuffert
2004-08-16 06:23:14 +00:00
Pawel Jakub Dawidek 896a489487 The geom(8) utility needs dynamic linker functionality to work, so it can't
be staticaly linked.
This fixes problems on systems compiled with NO_DYNAMICROOT.
2004-08-12 13:15:52 +00:00
Pawel Jakub Dawidek c38d2f4eca Forgot to commit those: introduce hardcoded provider functionality,
which allow to store provider's name in the metadata and avoid
problems when few providers share the same last sector.
2004-08-10 19:52:12 +00:00
Pawel Jakub Dawidek 6c74f5177c - Introduce option for hardcoding providers' names into metadata.
It allows to fix problems when last provider's sector is shared between few
  providers.
- Bump version number for CONCAT and STRIPE and add code for backward
  compatibility.
- Do not bump version number of MIRROR, as it wasn't officially introduced yet.
  Even if someone started to play with it, there is no big deal, because
  wrong MD5 sum of metadata will deny those providers.
- Update manual pages.
- Add version history to g_(stripe|concat).h files.
2004-08-09 11:29:42 +00:00
Pawel Jakub Dawidek cea363682f Add and document kern.geom.stripe.fast_failed sysctl, which shows how
many times "fast" mode failed.
2004-08-06 10:19:34 +00:00
Pawel Jakub Dawidek fe5e0baab7 Don't use version number in library name. The library version is checked
after dlopen() anyway, so we should be safe.

Suggested by:	ru
2004-08-02 09:05:29 +00:00
Pawel Jakub Dawidek 32e7be7043 After changing LIBDIR to SHLIBDIR, because of dependencies problems,
new problem shows up: symblic links (<libname>.so) are created under
/usr/lib/ now, instead of under /lib/geom/ where geom(8) looks for them.
Introduce a workaround to fix this by teaching geom(8) to open libraries
via /lib/geom/<libname>.so.<major_number> instead of /lib/geom/<libname>.so.
2004-08-01 22:24:07 +00:00
Pawel Jakub Dawidek f97ee75284 Use SHLIBDIR instead of LIBDIR. This should fix buildworld breakage.
Reported by:	des
2004-07-31 09:20:27 +00:00
Pawel Jakub Dawidek 55d6eb9fef Add '-p' option for 'insert' command which allows to specify priority
of the new component.
Version number wasn't bumped (it should be), because I think there are
no geom_mirror users yet.
2004-07-31 00:54:44 +00:00
Pawel Jakub Dawidek 8a8fbaca32 Connect GEOM_MIRROR class to the build. 2004-07-30 23:18:53 +00:00
Pawel Jakub Dawidek fa4a1febf7 Add GEOM_MIRROR class which provide RAID1 functionality and has many useful
features. The gmirror(8) utility should be used for control of this class.
There is no manual page yet, but I'm working on it with keramida@.

Many useful tests provided by:	simon (thank you!)
Some ideas from:		scottl, simon, phk
2004-07-30 23:13:45 +00:00
Pawel Jakub Dawidek d5c96d389e - Add '-S' option, which allow to specify sector size for transparent
provider.
- Bump version number.

This allows for a quite interesting trick. One can setup a stripe with
stripe size of 512 bytes and create transparent provider on top of it
with sector size equal to <ndisks> * 512. The result will be something
like RAID3 without parity disk (every access will touch all disks).
2004-07-30 08:19:22 +00:00
Pawel Jakub Dawidek 5c41aee2f0 Fix typo. 2004-07-30 08:03:46 +00:00
Pawel Jakub Dawidek 1d723f1d51 Improve geom(8)'s 'list' command to show geoms and their providers and
consumers. Teach STRIPE, CONCAT and NOP classes about this improvement.
2004-07-26 17:14:47 +00:00
Pawel Jakub Dawidek 889c5dc22b Change naming scheme from /dev/<name>.stripe to /dev/stripe/<name>. 2004-07-26 16:10:27 +00:00
Pawel Jakub Dawidek ba385d0091 Change naming scheme from /dev/<name>.concat to /dev/concat/<name>. 2004-07-26 16:08:32 +00:00
Pawel Jakub Dawidek e370e911b2 MFp4: Add two options for gnop(8)'s 'create' command:
-o offset - specifies where to start on the original provider
	-s size - specifies size of the transparent provider
2004-07-19 07:52:56 +00:00
Pawel Jakub Dawidek cdf961ac2a MFp4: Add 'dump' command to gconcat(8), glabel(8) and gstripe(8) which allow
to dump metadata from given components.
2004-07-18 08:00:30 +00:00
Pawel Jakub Dawidek b03d330986 Add a reference to glabel(8). 2004-07-14 13:32:00 +00:00
Pawel Jakub Dawidek 608e135b58 Document sysctl variables.
Based on:	simon's patch
2004-07-13 12:32:20 +00:00
Pawel Jakub Dawidek 3d3ddf3470 Those sysctl are used to control GEOM class, not a userland utility.
Reviewed by:	simon
2004-07-13 12:30:11 +00:00
Pawel Jakub Dawidek 11eeab06ba Document sysctls variables used by GEOM_STRIPE class.
Submitted by:	simon
2004-07-13 11:28:40 +00:00
Pawel Jakub Dawidek 2d3dab54ee Decrease default stripe size to 4k, as we have "FAST" mode turned on by
default.
2004-07-09 14:41:51 +00:00
Ruslan Ermilov 0e252c9a1a Slight markup and grammar fixes. 2004-07-07 21:00:57 +00:00
Pawel Jakub Dawidek a272d96ed7 Fix copy&paste bug. 2004-07-06 18:18:20 +00:00
Pawel Jakub Dawidek a2e31b8b53 - Add 'stop' command, which works just like 'destroy' command, but sounds
less dangerous.
- Update manual pages and extend examples.
- Bump versions.
2004-07-05 21:16:37 +00:00
Pawel Jakub Dawidek 10fa0ebe1f MFp4: gmirror(8) is coming soon, and we need g_metadata_read() there. 2004-07-05 02:06:44 +00:00
Pawel Jakub Dawidek 363c05f17e Grammar nits.
Submitted by:	David Magda <dmagda@ee.ryerson.ca>
2004-07-03 08:36:09 +00:00
Pawel Jakub Dawidek e1237b285b Introduce GEOM_LABEL class.
This class is used for detecting volume labels on file systems:
UFS, MSDOSFS (FAT12, FAT16, FAT32) and ISO9660.
It also provide native labelization (there is no need for file system).

g_label_ufs.c is based on geom_vol_ffs from Gordon Tetlow.
g_label_msdos.c and g_label_iso9660.c are probably hacks, I just found
where volume labels are stored and I use those offsets here,
but with this class it should be easy to do it as it should be done by
someone who know how.
Implementing volume labels detection for other file systems also should
be trivial.

New providers are created in those directories:
/dev/ufs/ (UFS1, UFS2)
/dev/msdosfs/ (FAT12, FAT16, FAT32)
/dev/iso9660/ (ISO9660)
/dev/label/ (native labels, configured with glabel(8))

Manual page cleanups and some comments inside were submitted by
Simon L. Nielsen, who was, as always, very helpful. Thanks!
2004-07-02 19:40:36 +00:00
Pawel Jakub Dawidek a6d8900933 Add missing newlines. 2004-06-17 06:04:14 +00:00
Pawel Jakub Dawidek 09cc9ab63d Implement 3 new functions:
- g_lcm() - calculates Least Common Multiple of two given values,
		it is helpful when we need to find sector size for provider
		which is based on disks with different sector size;
	- g_get_mediasize() - returns media size of given provider;
	- g_get_sectorsize() - returns sector size of given provider;
Those function aren't used now, but are used by geom_mirror which will be
committed soon.
2004-06-16 10:44:26 +00:00
Pawel Jakub Dawidek 578b2b7d2e Connect geom(8) to the build.
Reminded by:	des
2004-06-15 17:31:35 +00:00
Lukas Ertl b3db79c7a1 Fix typo. 2004-05-30 17:40:39 +00:00
Pawel Jakub Dawidek 8374d9db17 Fix order. 2004-05-26 17:51:53 +00:00
Pawel Jakub Dawidek af565b58fa Print provider's size in human-readable form as well. 2004-05-26 11:08:35 +00:00
Pawel Jakub Dawidek a2165cbdce - Add a cross-reference to geom(8).
- Add missing 'a'.
2004-05-24 23:05:21 +00:00
Pawel Jakub Dawidek 3e64260d81 Add manual page for geom(8) utility.
Supported by:	Wheel - Open Technologies - http://www.wheel.pl
2004-05-24 23:03:29 +00:00
Pawel Jakub Dawidek b70eccf3bd Add standard command "help" to print usage. 2004-05-22 16:57:39 +00:00
Pawel Jakub Dawidek 7f21753e25 Actually we are also able to list only choosen providers. 2004-05-22 16:17:57 +00:00
Pawel Jakub Dawidek a22dd9cfec Be more precise. 2004-05-22 10:53:06 +00:00
Pawel Jakub Dawidek 925830e6dd - More clear example description.
- Fix copy&paste bug.
2004-05-21 22:35:18 +00:00
Pawel Jakub Dawidek 1796be69b5 Add manual pages for gconcat(8), gstripe(8) and gnop(8) utilities.
Supported by:	Wheel - Open Technologies - http://www.wheel.pl
2004-05-21 22:12:24 +00:00
Pawel Jakub Dawidek 02692c510d - Change command name from 'config' to 'configure'.
- Bump version number.
2004-05-21 15:23:48 +00:00
Pawel Jakub Dawidek f7f65c0ed2 Various style.Makefile(5) improvements.
Inspired by:	ru
2004-05-20 20:12:17 +00:00
Pawel Jakub Dawidek bf3aa3662d Fix supposed compilation problem, using LIBDIR here can confuse core/
compilation.
2004-05-20 14:59:41 +00:00
Pawel Jakub Dawidek a158e237fc Introduce geom(8)-specific shared libraries for CONCAT, STRIPE and NOP
GEOM classes. CONCAT should be 100% compatible with existing gconcat(8)
utility, which is going to be removed.

Supported by:	Wheel - Open Technologies - http://www.wheel.pl
2004-05-20 10:24:23 +00:00
Pawel Jakub Dawidek 05c9107607 Bring in geom(8) utility. It is an universal utility for operating on
GEOM classes. It works by loading a shared library via dlopen(3) mechanism
with class-specific code, it is also responsible for communicating with
GEOM via libgeom(3).
Per-class shared libraries are going to be stored in /lib/geom/ directory.
It provides also few standard commands like 'list', 'load' and 'unload'
for existing classes which aren't aware of geom(8).
More info will be send on freebsd-current@ mailing list.

Supported by:	Wheel - Open Technologies - http://www.wheel.pl
2004-05-20 10:09:56 +00:00