Commit Graph

250 Commits

Author SHA1 Message Date
Daniel Gerzo
c419baec28 - grammar and language fixes
- hard sentence breaks
- trim EXIT STATUS section and move it to DIAGNOSTICS as well as use .Er
  macro
- sort SEE ALSO

MFC after:	7 days
2009-01-04 15:41:01 +00:00
Ivan Voras
2b67c28a09 Several significant updates:
* Better wording of sections dealing with physical storage
* A new section on assumptions gvirstor has on its consumer devices
  (components) and its interaction  with file systems
* Improved markup (by hrs@)

Reviewed by:	hrs
Approved by:	gnn (mentor)
2009-01-04 11:31:03 +00:00
Ulf Lilleengen
db2bf4b016 - Back out r186038. Rather than changing the intent of the caller, the problem
should be handled internally in gvinum.

Suggested by:	pjd
2008-12-27 14:24:24 +00:00
Ulf Lilleengen
a468c003ef - When writing metadata to a geom provider, open the it as read-write since it
might do subsequent reads from other providers. This stopped geli (and
  probably other classes using g_metadata_store as well) from being put on top
  of gvinum raid5 volumes.

Note:
The reason it fails in the gvinum raid5 case is that gvinum will read back the
old parity stripe before calculating the new parity stripe to be written out
again.  The write will then fail because the underlying disk to be read is
opened write only.

MFC after:	1 week
2008-12-13 14:14:56 +00:00
Marcel Moolenaar
08b6360ca3 Print error messages as-is, when they don't conform to
<errno> [<parameter> 'value']
These are error messages from (lib)geom itself.
2008-11-30 23:46:31 +00:00
Marcel Moolenaar
e419ba879f Call gctl_free() after we processed the error string.
It's being freed as part of the request.
2008-11-30 23:38:44 +00:00
Marcel Moolenaar
39bd58723a Parse the error string returned by the kernel. The format is:
<errno> [<parameter> <value>]
So, rather than printing the error:
	gpart: 22 scheme 'gpt'
gpart(8) now prints:
	gpart: scheme 'gpt': invalid argument
2008-11-29 21:20:07 +00:00
Xin LI
b652d3a3dc Grammar improvements.
Submitted by:	kensmith
2008-11-18 20:38:07 +00:00
Marcel Moolenaar
7f792cd758 Use humanize_number(), rather than a home-grown algorithm for
formatting a number in a human-friendly way.

Note that with this commit a megabyte changed from 1000000 to
1048576 and a 80G disk is now printed as being 75G in size.
This is deliberate. It's consistent with the core of geom(8).
However, the original choice for a megabyte being 1000000 was
on purpose and matches what disk vendors put on the box. The
consistency is considered more important.

Submitted by:	delphij
2008-11-18 04:04:01 +00:00
Marcel Moolenaar
567bc443e8 Sort includes
Submitted by:	delphij
2008-11-18 03:43:02 +00:00
Marcel Moolenaar
0a4acb2e3d Pad the bootcode we write to the partition to a multiple of the
sector size.

Submitted by:	Alexey Shuvaev <shuvaev@physik.uni-wuerzburg.de>
Prompted by: 	delphij
MFC after:	3 days
2008-11-18 00:03:30 +00:00
Marcel Moolenaar
1eecfda454 Add support for multiple attributes. This is required for the
PC98 scheme.
2008-10-20 05:12:50 +00:00
Xin LI
30223a3203 Add some examples to demostrate gpart(8).
--此行及以下内容将会被忽略--
2008-10-09 06:23:04 +00:00
Pawel Jakub Dawidek
ba196edbd2 By default backup geli metadata to a file. It is quite critical 512 bytes,
once it is lost, all data is gone.

Option '-B none' can by used to prevent backup. Option '-B path' can be
used to backup metadata to a different file than the default, which is
/var/backups/<prov>.eli.

The 'geli init' command also prints backup file location and gives short
procedure how to restore metadata.

The 'geli setkey' command now warns that even after passphrase change or keys
update there could be version of the master key encrypted with old
keys/passphrase in the backup file.

Add regression tests to verify that new functionality works as expected.

Update other regression tests so they don't create backup files.

Reviewed by:	keramida, rink
Dedicated to:	a friend who lost 400GB of his live by accidentally overwritting geli metadata
MFC after:	2 weeks
2008-08-29 18:10:18 +00:00
Pawel Jakub Dawidek
785c7ba6a1 - Give algorithms recommendation.
- Keep options in alphabetical order.
2008-08-29 17:13:07 +00:00
Pawel Jakub Dawidek
4c5739d8f7 geli onetime command can take only one GEOM provider at a time. 2008-08-12 19:42:03 +00:00
Ivan Voras
970a8ddc44 Clean up of dead code and possible unassigned variable usage.
Found by:	LLVM/Clang Static Checker
Approved by:	gnn (mentor)
2008-08-09 16:47:30 +00:00
Marcel Moolenaar
b1b657e6b5 Add NO_MAN for the static variant of geom(8). Both the RESCUE and the
RELEASE_CRUNCH builds use NO_MAN anyway, so this change is primarily
to avoid that developers have to set NO_MAN manually when they build
the static variant.
2008-07-03 19:40:59 +00:00
Marcel Moolenaar
7a4a5cc0f4 Implement the set and unset verbs. While here, have the manpage
catch up with various changes.
2008-06-18 01:46:32 +00:00
Marcel Moolenaar
5a96f8396d Implement the -l and -r options for gpart show.
The -l option changes the output to show the partition label, if applicable
and when present. The -r option changes the output to show the raw (i.e.
scheme-specific) partition types.
2008-06-13 00:04:10 +00:00
Marcel Moolenaar
c0b5f33d45 Document the new -p and -i options for writing bootstrap code into
a partition. Make it clear that the -b option embeds boot code in
the meta-data.
2008-06-07 00:14:06 +00:00
Marcel Moolenaar
3022de951b Enhance the bootcode command to also allow bootcode to be written
to a partition. This avoids that users need to use dd(1) to install
boot code (as is needed for VTOC8 and booting GPT on PCs).
2008-06-06 23:58:29 +00:00
Marcel Moolenaar
59458baf2b Add two support functions:
o  gctl_delete_param() -- intended for parameters that are consumed
   by geom(8) itself and which should not be passed to the kernel.
o  gctl_has_param() -- intended to check if optional parameters are
   present.

Both are needed by gpart(8) to process the optional parameter for
writing bootcode to a partition (as part of the bootcode verb).
However, the kernel is itself not involved in this matter and the
parameter needs to be removed from the request destined for the
kernel.
2008-06-06 22:44:03 +00:00
Marcel Moolenaar
8c39fe86af Update the manpage to reflect reality:
o  The BSD, PC98 and VTOC8 schemes are supported.
o  The bootcode command was added to allow installing bootstrap code
   into the scheme's metadata.
2008-06-06 05:14:16 +00:00
Marcel Moolenaar
db300278f8 Allow building a static geom(8) for release related crunched
binaries. In particular, this allows geom to be added to the
boot_crunch binary on ia64.
2008-06-05 15:24:10 +00:00
Marcel Moolenaar
14bf405be4 Replace checks for RESCUE in sources with checks for STATIC_GEOM_CLASSES
and define STATIC_GEOM_CLASSES when building the rescue binary. This way
geom can more easily be part of other crunched binaries, as it requires
only a Makefile change.
2008-06-04 20:07:59 +00:00
Marcel Moolenaar
4d32fcb42b Add the bootcode verb for installing boot code. Boot code
is supported for the MBR, GPT and PC98 schemes, where GPT
installs boot code into the PMBR.
2008-04-13 19:54:54 +00:00
Remko Lodder
afa09cae88 I keep taking timemachines to get back in time. Update the
year to 2008.

Noticed by:	ceri
2008-04-13 11:05:59 +00:00
Remko Lodder
722bb56802 Add missing device in tunefs entry.
PR:		docs/122702
Submitted by:	Yoshihiro Ota <ota@j.email.ne.jp>
MFC After:	3 days
2008-04-13 07:48:05 +00:00
Christian Brueffer
51b6df2d16 - Use an uppercase provider name in the example, to make the name change
after labeling the provider more obvious. (1)
- Correct nomenclature usage

PR:		121487 (1)
Submitted by:	Anatoly Borodin <anatoly.borodin@gmail.com>
MFC after:	3 days
2008-03-13 15:37:02 +00:00
Christian Brueffer
058ddc3099 Fix typos.
PR:		121486
Submitted by:	Anatoly Borodin <anatoly.borodin@gmail.com>
MFC after:	3 days
2008-03-08 12:13:00 +00:00
Xin LI
bc69d66f2f Make it possible to build glabel into rescue geom(8) utility.
Ok'ed by:	marcel
No objection:	-current@
2008-03-05 23:31:49 +00:00
Pawel Jakub Dawidek
081632cffb Add info about few missing GEOM classes that use geom(8). 2008-03-05 11:51:13 +00:00
Ulf Lilleengen
9d19384836 - Update geom(8) to explain that GEOM_LIBRARY_PATH can take a comma-separated
list of paths.

Approved by:	pjd (mentor)
MFC after:	2 days
2008-02-05 14:02:55 +00:00
Ulf Lilleengen
2591e96ce2 - Make geom commands handle multiple library paths in the GEOM_LIBRARY_PATH
environment variable using ':' as a separator.

Approved by:	pjd (mentor)
MFC after:	3 days
2008-02-04 12:17:02 +00:00
Christian Brueffer
a4b1fac3d2 Minor language cleanup.
MFC after:	3 days
2007-11-24 09:32:45 +00:00
John Birrell
ea07ab3fd9 Fix signed/unsigned comparison compiler warning. 2007-11-18 03:17:56 +00:00
Ruslan Ermilov
f86f9eeaef Briefly document what the -c option of the "label" command does.
MFC after:	3 days
2007-11-15 06:31:18 +00:00
Ruslan Ermilov
5419612785 Revise the markup and apply some wordsmithing.
Reviewed by:	pjd
MFC after:	3 days
2007-11-15 06:23:33 +00:00
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