History log of /freebsd-10.0-release/sbin/geom/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
259065 07-Dec-2013 gjb

- Copy stable/10 (r259064) to releng/10.0 as part of the
10.0-RELEASE cycle.
- Update __FreeBSD_version [1]
- Set branch name to -RC1

[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so
start releng/10.0 at '100' so the branch is started with
a value ending in zero.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


255977 01-Oct-2013 pluknet

Sweep man pages replacing ad -> ada.

Approved by: re (blackend)
MFC after: 1 week
X-MFC note: stable/9 only


253957 05-Aug-2013 crees

Note NULL encryption method for GELI

PR: docs/180551
Submitted by: r4721@tormail.org
Approved by: gjb (mentor)


252492 01-Jul-2013 wblock

Add a new gptboot(8) man page. Factor out the redundant information
in gpart(8) and boot(8), adding references to gptboot(8) in both.

Reviewed by: jhb, ae, pjd, Paul Schenkeveld <bsdcan@psconsult.nl>, david_a_bright@dell.com (portions), gjb
MFC after: 1 week


251588 09-Jun-2013 marcel

Change the set and unset ctlreqs by making the index argument optional.
This allows setting attributes on tables. One simply does not provide
an index in that case. Otherwise the entry corresponding the index has
the attribute set or unset.

Use this change to fix a relatively longstanding bug in our GPT scheme
that's the result of rev 198097 (relatively harmless) followed by rev
237057 (damaging). The damaging part being that our GPT scheme always
has the active flag set on the PMBR slice. This is in violation with
EFI. Existing EFI implementions for both x86 and ia64 reject the GPT.
As such, GPT disks created by us aren't usable under EFI because of
that.

After this change, GPT disks never have the active flag set on the PMBR
slice. In order to make the GPT disk bootable under some x86 BIOSes,
the reason of rev 198097, one must now set the active attribute on the
gpt table. The kernel will apply this to the PMBR slice For (S)ATA:
gpart set -a active ada0

To fix an existing GPT disk that has the active flag set in the PMBR,
and that does not need the flag, use (again for (S)ATA):
gpart unset -a active ada0

The EBR, MBR & PC98 schemes, which also impement at least 1 attribute,
now check to make sure the entry passed is valid. They do not have
attributes that apply to the table.


249768 22-Apr-2013 joel

Minor clarificiation.

PR: 177455


249657 19-Apr-2013 ed

Add the Clang specific -Wmissing-variable-declarations to WARNS=6.

This compiler flag enforces that that people either mark variables
static or use an external declarations for the variable, similar to how
-Wmissing-prototypes works for functions.

Due to the fact that Yacc/Lex generate code that cannot trivially be
changed to not warn because of this (lots of yy* variables), add a
NO_WMISSING_VARIABLE_DECLARATIONS that can be used to turn off this
specific compiler warning.

Announced on: toolchain@


249477 14-Apr-2013 jmg

update information about debugging sysctl...

MFC after: 1 week


249371 11-Apr-2013 joel

Remove kernel options from the SYNOPSIS. They are already documented in the
geom(4) manual page SYNOPSIS.


249092 04-Apr-2013 joel

Minor rewording.

Discussed with: mav


249087 04-Apr-2013 joel

Remove references to ataraid(4) and atacontrol(8).


248700 25-Mar-2013 maxim

o Typo: IEE -> IEEE.

PR: docs/173069
Submitted by: Bjorn Heidotting
MFC after: 1 week


248475 18-Mar-2013 pjd

Reduce stack usage.


248385 16-Mar-2013 joel

Cross-reference gvinum(8) instead of vinum(8).


248068 08-Mar-2013 sbruno

Add legacy support to geom raid to create a /dev/arX device for support
of upgrading older machines using ataraid(4) to newer releases.

This optional parameter is controlled via kern.geom.raid.legacy_aliases
and will create a /dev/ar0 device that will point at /dev/raid/r0 for
example.

Tested on Dell SC 1425 DDF-1 format software raid controllers installing from
stable/7 and upgrading to stable/9 without having to adjust /etc/fstab

Reviewed by: mav
Obtained from: Yahoo!
MFC after: 2 Weeks


247370 27-Feb-2013 benno

Fix typo in EFI GPT GUID.


246622 10-Feb-2013 pjd

Fix minor memory leak.


246621 10-Feb-2013 pjd

Assert that if we are not dealing with keyfile we are dealing with passfile.


246620 10-Feb-2013 pjd

Use arc4random_buf(3) instead of reimplementing it.


245910 25-Jan-2013 wblock

Expand description of how gptboot and gptzfsboot choose a partition for
booting.

Reviewed by: ae
MFC after: 1 week


245522 17-Jan-2013 mav

For Promise/AMD metadata add support for disks with capacity above 2TiB
and for volumes with sector size above 512 bytes.


245456 15-Jan-2013 mav

Allow to insert new component to geom_raid3 without specifying number.

PR: kern/160562
MFC after: 2 weeks


245074 05-Jan-2013 kib

Use tabs for indentation.

MFC after: 2 weeks


245072 05-Jan-2013 kib

Do not round up the size of the UFS filesystem to the fragment size
when comparing its size with the size of the media, to determine if
the last disk block is unused.

Submitted by: Andreas Longwitz <longwitz@incore.de>
Reviewed by: pjd
MFC after: 2 weeks


245012 03-Jan-2013 wblock

Document the output of the show command. Modified version of patch
provided by Bas Smeelen <b.smeelen@ose.nl>. Use of 'gpart list'
suggested by by Andrey V. Elsukov <ae@FreeBSD.org>.

PR: docs/174270
Submitted by: Ronald F.Guilmette <rfg@tristatelogic.com>
Reviewed by: ae (block sizes)
MFC after: 1 week


241737 19-Oct-2012 ed

More -Wmissing-variable-declarations fixes.

In addition to adding `static' where possible:

- bin/date: Move `retval' into extern.h to make it visible to date.c.
- bin/ed: Move globally used variables into ed.h.
- sbin/camcontrol: Move `verbose' into camcontrol.h and fix shadow warnings.
- usr.bin/calendar: Remove unneeded variables.
- usr.bin/chat: Make `line' local instead of global.
- usr.bin/elfdump: Comment out unneeded function.
- usr.bin/rlogin: Use _Noreturn instead of __dead2.
- usr.bin/tset: Pull `Ospeed' into extern.h.
- usr.sbin/mfiutil: Put global variables in mfiutil.h.
- usr.sbin/pkg: Remove unused `os_corres'.
- usr.sbin/quotaon, usr.sbin/repquota: Remove unused `qfname'.


240465 13-Sep-2012 mav

Add global and per-module sysctls/tunables to enable/disable metadata taste.
That should help to handle some cases when disk has some RAID metadata that
should be ignored, especially during boot.

MFC after: 3 days


239836 29-Aug-2012 des

Change the gptboot example so the boot partition is aligned on a 4 kB
boundary.

MFC after: 3 days


239022 03-Aug-2012 jimharris

Document "destroy" as an alias for "stop".


239012 03-Aug-2012 thomas

New command "gmultipath prefer" to force selection of a specified
provider in an Active/Passive configuration.

Reviewed by: mav
MFC after: 4 weeks


238899 30-Jul-2012 joel

Remove trailing whitespace.


238813 26-Jul-2012 issyl0

The ad(4) driver no longer exists in FreeBSD CURRENT or 9, so change the
references to it in gsched(8) to the existing ada(4) driver.

PR: docs/170085
Submitted by: olgeni
Approved by: gavin
MFC after: 5 days


238117 04-Jul-2012 pjd

Improve description of various key used by GELI.

PR: docs/169089
Submitted by: John W. O'Brien <john@saltant.com>
MFC after: 3 days


237620 27-Jun-2012 wblock

Use possessive "its", no apostrophe.

MFC after: 1 day


235873 24-May-2012 wblock

Fixes to man8 groff mandoc style, usage mistakes, or typos.

PR: 168016
Submitted by: Nobuyuki Koganemaru
Approved by: gjb
MFC after: 3 days


235201 09-May-2012 eadler

Clarify error that geli generates
when it finds corrupt data.

PR: kern/165695
Submitted by: Robert Simmons <rsimmons0@gmail.com>
Reviewed by: pjd
Approved by: cperciva
MFC after: 1 week


235076 06-May-2012 mav

Add support for RAID5R. Slightly improve support for RAIDMDF.


235071 06-May-2012 mav

Add description for GEOM RAID tunables/sysctls.

MFC after: 1 week


235033 04-May-2012 ae

Don't ignore start offset value when user specifies it together
with alignment.

PR: bin/167567
Tested by: Warren Block
MFC after: 1 week


234993 04-May-2012 mav

Implement read-only support for volumes in optimal state (without using
redundancy) for the following RAID levels: RAID4/5E/5EE/6/MDF.


234940 03-May-2012 mav

Add optional -o argument to the `graid label ` to specify some metadata
format options. Use it for specifying byte order for the DDF metadata:
big-endian defined by specification and little-endian used by Adaptec.


234848 30-Apr-2012 mav

Add to GEOM RAID class module, supporting the DDF metadata format, as
defined by the SNIA Common RAID Disk Data Format Specification v2.0.

Supports multiple volumes per array and multiple partitions per disk.
Supports standard big-endian and Adaptec's little-endian byte ordering.
Supports all single-layer RAID levels. Dual-layer RAID levels except
RAID10 are not supported now because of GEOM RAID design limitations.

Some work is still to be done, but the present code already manages basic
interoperation with RAID BIOS of the Adaptec 1430SA SATA RAID controller.

MFC after: 1 month
Sponsored by: iXsystems, Inc.


234770 28-Apr-2012 gjb

As of r226840, GELI starts one thread per CPU.

PR: 167382
Submitted by: John W. O'Brien (john%saltant.com)
X-Needs-MFC: r226840


234458 19-Apr-2012 mav

Add to GEOM RAID class module for reading non-degraded RAID5 volumes and
some environment to differentiate 4 possible RAID5 on-disk layouts.

Tested with Intel and AMD RAID BIOSes.

MFC after: 2 weeks


234415 18-Apr-2012 mav

Some improvements to GEOM MULTIPATH:
- Implement "configure" command to allow switching operation mode of
running device on-fly without destroying and recreation.
- Implement Active/Read mode as hybrid of Active/Active and Active/Passive.
In this mode all paths not marked FAIL may handle reads same time,
but unlike Active/Active only one path handles write requests at any
point in time. It allows to closer follow original write request order
if above layers need it for data consistency (not waiting for requisite
write completion before sending dependent write).
- Hide duplicate messages about device status change.
- Remove periodic thread wake up with 10Hz rate.

MFC after: 2 weeks
Sponsored by: iXsystems, Inc.


233458 25-Mar-2012 joel

Remove superfluous paragraph macro.


233179 19-Mar-2012 ae

Document GEOM_PART_LDM scheme and partition types.

MFC after: 1 month


232502 04-Mar-2012 eadler

Fix a variety of grammar issues and style nits.

PR: docs/165668
Submitted by: Robert Simmons <rsimmons0@gmail.com>
Reviewed by: kaduk@mit.edu
Approved by: cperciva
MFC after: 1 week


231992 22-Feb-2012 eadler

Remove reference to gsched_as module, which doesn't
actually exist.

PR: docs/163043
Submitted by: olgeni
Approved by: brd
MFC after: 3 days


230059 13-Jan-2012 des

Provide a better explanation for the sizing of the boot partition, and
reduce the size of the partition in the example from 128 blocks to 94
blocks so it will end on a 128-block boundary. Also remove the -b
option from the next example.

MFC after: 3 weeks


229916 10-Jan-2012 eadler

Fix warning when compiling with gcc46:
error: variable 'secsz' set but not used

Reviewed by: ae
Approved by: dim
MFC after: 3 days


229886 09-Jan-2012 jimharris

Add support for >2TB disks in GEOM RAID for Intel metadata format.

Reviewed by: mav
Approved by: scottl
MFC after: 1 week


229847 09-Jan-2012 wblock

Whitespace-only fix. Translators, please feel free to ignore.

Approved by: gjb (mentor)
MFC after: 3 days
X-MFC-with: r227774, r227777, r227800


229838 09-Jan-2012 wblock

Clarity improvements.

Approved by: gjb (mentor)
MFC after: 3 days


227800 21-Nov-2011 wblock

Correct and expand BSD partitioning scheme description.
Correct GUID to GPT in RECOVERING section.

Reviewed by: ae
Approved by: gjb (mentor)
MFC after: 1 week


227777 21-Nov-2011 wblock

Fix date.

Approved by: gjb (mentor)
MFC after: 1 week


227774 21-Nov-2011 wblock

Add a section that explicitly describes partitioning schemes. Modify
existing sections to refer to the new one. Rearrange partitioning scheme
list so MBR and EBR types are together. Also add several corrections for
grammar, clarity, and consistency.

Approved by: gjb (mentor)
MFC after: 1 week


227473 12-Nov-2011 mav

Fix build on some archs after r227464.


227471 12-Nov-2011 dim

Fix buildworld breakage due after r227464.

Pointy hat to: mav


227464 12-Nov-2011 mav

Major GEOM MULTIPATH class rewrite:
- Improved locking and destruction process to fix crashes.
- Improved "automatic" configuration method to make it consistent and safe
by reading metadata back from all specified paths after writing to one.
- Added provider size check to reduce chance of ordering conflict with
other GEOM classes.
- Added "manual" configuration method without using on-disk metadata.
- Added "add" and "remove" commands to allow manage paths manually.
- Failed paths are no longer dropped from geom, but only marked as FAIL
and excluded from I/O operations.
- Automatically restore failed paths when all others paths are marked
as failed, for example, because of device-caused (not transport) errors.
- Added "fail" and "restore" commands to manually control FAIL flag.
- geom is now destroyed on last path disconnection.
- Added optional Active/Active mode support. Unlike Active/Passive
mode, load evenly distributed between all working paths. If supported by
the device, it allows to significantly improve performance, utilizing
bandwidth of all paths. It is controlled by -A option during creation.
Disabled by default now.
- Improved `status` and `list` commands output.

Sponsored by: iXsystems, inc.
MFC after: 1 month


226816 26-Oct-2011 mav

Clarify disks/volumes above 2TiB support in geom_raid:
- add support for volumes above 2TiB with Promise metadata format;
- enforse and document other limitations:
- Intel and Promise metadata formats do not support disks above 2TiB;
- NVIDIA metadata format does not support volumes above 2TiB.

Sponsored by: iXsystems, Inc.
MFC after: 2 weeks


226733 25-Oct-2011 pjd

Add support for creating GELI devices with older metadata version for use
with older FreeBSD versions:
- Add -V option to 'geli init' to specify version number. If no -V is given
the most recent version is used.
- If -V is given don't allow to use features not supported by this version.
- Print version in 'geli list' output.
- Update manual page and add table describing which GELI version is
supported by which FreeBSD version, so one can use it when preparing GELI
device for older FreeBSD version.

Inspired by: Garrett Cooper <yanegomi@gmail.com>
MFC after: 3 days


226723 25-Oct-2011 pjd

Add 'geli version' subcommand, which will print GELI metadata version of each
given GEOM provider or if not providers are given it will print versions
supported by userland geli(8) utility and by ELI GEOM class.

MFC after: 3 days


226722 25-Oct-2011 pjd

When we detect GELI metadata version that is newer than the highest we
support, inform the user about that instead of 'MD5 hash mismatch'.

Suggested by: Garrett Cooper <yanegomi@gmail.com>
MFC after: 3 days


226720 25-Oct-2011 pjd

Simplify eli_resize() function.

MFC after: 3 days


226719 25-Oct-2011 pjd

Simplify eli_dump() function and allow to dump metadata stored in backup file.

MFC after: 3 days


226718 25-Oct-2011 pjd

If 'req' is NULL, print error on stderr.

MFC after: 3 days


226717 25-Oct-2011 pjd

Simplify eli_is_attached() function and make it return boot instead of int.

MFC after: 3 days


226716 25-Oct-2011 pjd

Simplify eli_backup_create() and eli_backup_restore() functions.
As a side-effect it is now possible to backup unsupported (newer)
GELI metadata versions.

MFC after: 3 days


226715 25-Oct-2011 pjd

Sort includes.

MFC after: 3 days


226436 16-Oct-2011 eadler

- change "is is" to "is" or "it is"
- change "the the" to "the"

Approved by: lstewart
Approved by: sahil (mentor)
MFC after: 3 days


225445 08-Sep-2011 ae

Don't use the whole free space when resizing partition to a larger size
on a disk with non zero stripesize (e.g. disks with 4k sector size)[1].
Also do not use automatic alignment when size is exactly specified, but
an alignment is not. Use automatic alignment only for case when user
omits both "-s" and "-a" options.

Reported by: Mikael Fridh <frimik at gmail> [1]
Approved by: re (kib)
MFC after: 1 week


225023 20-Aug-2011 ae

o Fix mdoc formatting for the '.Fx' macro. [1]
o Add information about APM scheme and fix typos. [2]

Submitted by: gjb [1], nwhitehorn [2]
Approved by: re (kib)
MFC after: 1 week


225003 19-Aug-2011 ae

Add new section "BOOTSTRAPPING" to the gpart(8), that describes
bootstrap code images used to boot from MBR, GPT, BSD and VTOC8
schemes.

Reviewed by: marius (previous version)
Approved by: re (kib)
MFC after: 1 week


223364 21-Jun-2011 ae

When user specifies the bootcode with size smaller than VTOC_BOOTCODE,
gpart_write_partcode_vtoc8 does access out of range of allocated memory.
Check size of bootcode before writing it.

Pointed out by: ru
MFC after: 1 week


223356 21-Jun-2011 delphij

Mod the offset padding by alignment. Without this change we may
pad too much when underlying GEOM object have a zero stripesize.

MFC after: 1 month


223355 21-Jun-2011 ae

The "size" param needs no adjusting to stripeoffset.

Reported by: Kris Moore


223158 16-Jun-2011 ae

Add "alignment" param to the request before calling gpart_autofill().


222819 07-Jun-2011 ae

Do not use LCM from stripesize and user specified alignment value.
When user wants have specific alignment - do what user wants.
Use stripesize as alignment value in case, when some of gpart's
arguments are ommitted for automatic calculation.

Suggested by: mav


222778 06-Jun-2011 gavin

Rework parts of this man page to improve grammar.

Inspired by, and parts submitted by...
PR: docs/157467
Submitted by: Ben Kaduk <kaduk mit.edu>
MFC after: 2 weeks


222772 06-Jun-2011 ed

Remove redundant assignments to WARNS.

For these directories, WARNS is already implied to be 6.


222646 03-Jun-2011 ru

Generally clean up markup.


222631 02-Jun-2011 ae

Always use LCM when stripesize > 0.


222630 02-Jun-2011 ae

Use stripesize and stripeoffset in the automatic calculation of
partition offsets. If user requests specific alignment and
provider's stripesize is not zero, then use a least common multiple
from the stripesize and user specified value.
Also fix "gpart resize" implementation: do not try to align the partition
size, because the start offset may be not aligned. Instead align the
end offset and then calculate size. Also use stripesize and stripeoffset
for "gpart resize" command.


222599 02-Jun-2011 uqs

mdoc: fix markup


222495 30-May-2011 ae

Document kern.geom.part.check_integrity sysctl variable.


222359 27-May-2011 ae

Add example how to create MBR and BSD schemes and install boot code.


222357 27-May-2011 ae

Synchronize manpage's synopsis with program's usage. Since -l and -r
keys are mutually exclusive for the `gpart show` command, then mark
them so.

Requested by: ru


222264 24-May-2011 ae

Simplify ALIGNDOWN macro.


222263 24-May-2011 ae

Fix calculation of alignment for odd values. Also do not change value
when it is already aligned.


221967 15-May-2011 ae

Some partitioning schemes want to have partitions that are aligned
with geometry. And they do recalculation of user specified parameters.
MBR, PC98, VTOC8, EBR schemes are doing that. For these schemes an
auto alignment feature (ie. gpart add -a alignment) would not work.
But it can work for GPT and BSD schemes. BSD scheme usualy is created
inside MBR, so we can use knowledge about offset of MBR partition to
calculate aligned values for BSD partitions.

Use "offset" attribute of the parent provider for better alignment.

MFC after: 2 weeks


221952 15-May-2011 ae

Simplify the code a bit. For own providers GEOM_PART always provides
"start" and "end" config attributes.

MFC after: 1 week


221633 08-May-2011 pjd

Document the following sysctls:

kern.geom.eli.version
kern.geom.eli.key_cache_limit
kern.geom.eli.key_cache_hits
kern.geom.eli.key_cache_misses

MFC after: 1 week


221363 03-May-2011 ae

Add "-a alignment" option to gpart(8). When it specified gpart(8)
tries to align partition start offset and size to be multiple of
alignment value.

MFC after: 2 weeks


219974 24-Mar-2011 mav

MFgraid/head:
Add new RAID GEOM class, that is going to replace ataraid(4) in supporting
various BIOS-based software RAIDs. Unlike ataraid(4) this implementation
does not depend on legacy ata(4) subsystem and can be used with any disk
drivers, including new CAM-based ones (ahci(4), siis(4), mvs(4), ata(4)
with `options ATA_CAM`). To make code more readable and extensible, this
implementation follows modular design, including core part and two sets
of modules, implementing support for different metadata formats and RAID
levels.

Support for such popular metadata formats is now implemented:
Intel, JMicron, NVIDIA, Promise (also used by AMD/ATI) and SiliconImage.

Such RAID levels are now supported:
RAID0, RAID1, RAID1E, RAID10, SINGLE, CONCAT.

For any all of these RAID levels and metadata formats this class supports
full cycle of volume operations: reading, writing, creation, deletion,
disk removal and insertion, rebuilding, dirty shutdown detection
and resynchronization, bad sector recovery, faulty disks tracking,
hot-spare disks. For Intel and Promise formats there is support multiple
volumes per disk set.

Look graid(8) manual page for additional details.

Co-authored by: imp
Sponsored by: Cisco Systems, Inc. and iXsystems, Inc.


219969 24-Mar-2011 mav

MFgraid/head r217014:
Make `geom XXX list` and `geom XXX status` outputs more consistent:
Add -a options to print all geoms, not only ones with providers.
Add -g option for `status` to report geom's names, not provider's.
Make `status` by default report provider's status (if present), not geom's.
Make `status` report consumer's statuses, not only "synchronized" field.


219581 12-Mar-2011 ae

Fix grammar.

Pointed out: Ben Kaduk
MFC after: 2 weeks


219573 12-Mar-2011 ae

Document GEOM_PART_EBR_COMPAT option.

MFC after: 2 weeks


219424 09-Mar-2011 pjd

Change example to not be controversial.
I'm sorry to anyone who felt offended by this.

PR: docs/155385
Reported by: maga_lena <mirto@riseup.net>
MFC after: 1 week


219416 08-Mar-2011 ae

It is better to sometimes have not aligned columns than
often have wrapped lines.

MFC after: 2 weeks


219415 08-Mar-2011 ae

Add -p option to `gpart show` command to show provider's names of
partitions instead of partition's indexes. This may be useful with
GPT partitioning scheme or EBR without GEOM_PART_EBR_COMPAT option.

MFC after: 2 weeks


218015 28-Jan-2011 ae

Document the "bios-boot" partition type.

MFC after: 2 weeks


217780 24-Jan-2011 ivoras

Added a blurb about thin provisioning, fixed some formatting.


217344 13-Jan-2011 maxim

o Somehow I revert Dd macro in the previous commit.
Re-revert it.


217343 13-Jan-2011 maxim

o Start each sentence on a new line. No content changes.

Suggested by: jhb
MFC after: 1 week


217342 13-Jan-2011 maxim

o Typo fixes.

PR: docs/153933
Submitted by: jpaetzel@, Warren Block
MFC after: 1 week


217334 12-Jan-2011 brucec

Fix formatting of cross-references.


217327 12-Jan-2011 brucec

Fix sorting of cross-references.


217316 12-Jan-2011 brucec

Fix cross-reference to gvinum(8).


217314 12-Jan-2011 ae

Fix up the grammar.

PR: docs/153933
MFC after: 3 days


217305 12-Jan-2011 ae

Sector size can not be greater than MAXPHYS. Since GRAID3 calculates
sector size from user-specified block size, report to user about
big blocksize.

PR: kern/147851
MFC after: 1 week


216619 21-Dec-2010 ae

Check number of arguments before trying to read arg0. This prevents access
to arg0 and dumping core when `gpart bootcode` called without arguments.


216493 16-Dec-2010 obrien

Revert r216473.
WARNS=6 causes "warning: cast increases required alignment of target type"
on arm, ia64, mips, and sparc64.


216473 16-Dec-2010 obrien

Bump WARNS to 6.


216472 16-Dec-2010 obrien

GEOM virstor .so does not need libmd.


216470 15-Dec-2010 obrien

Rename the generic "CLASS" to the more specific "GEOM_CLASS".
While I'm here remove redundancy and inconsistencies.

Obtained from: Juniper Networks


216468 15-Dec-2010 obrien

Rename the generic "CLASS" to the more specific "GEOM_CLASS".
While I'm here remove redundancy and inconsistencies.

Obtained from: Juniper Networks


216147 03-Dec-2010 delphij

* Recommend a overwrite of whole geli provider before use.
* Correct a typo while I'm there.

Reviewed by: pjd
MFC after: 2 weeks


215704 22-Nov-2010 brucec

Fix some more warnings found by clang.


215672 22-Nov-2010 ae

Add SIGINT handler to `gpart restore` action.

MFC after: 1 week


215671 22-Nov-2010 ae

Always dump partition labels with `gpart backup`, but `gpart restore`
does restore them only when -l option is specified [1]. Make number of
entries field in backup format optional. Document -l and -r options of
`gpart show` action.

Suggested by: pjd [1]
MFC after: 1 week


215570 20-Nov-2010 ae

Add to gpart(8) an ability to backup partition table and
restore it from given backup.

Discussed with: geom@
Approved by: kib (mentor)
MFC after: 1 week


214404 26-Oct-2010 pjd

Use fprintf(stderr) instead of gctl_error() to print a warning about too
big sector size. When gctl error is set gctl_has_param() always returns
'false', which prevents geli(8) from finding some arguments and also masks
an error, which is generates in such case.

MFC after: 3 days


214352 25-Oct-2010 ae

Reimplemented "gpart destroy -F". Now it does all work in kernel.
This was needed for recover implementation.

Implement the recover command for GPT. Now GPT will marked as
corrupt when any of three types of corruption will be detected:
1. Damaged primary GPT header or table
2. Damaged secondary GPT header or table
3. Secondary header is not located in the last LBA
Marked GPT becomes read-only. Any changes with corrupt table
are prohibited. Only "destroy" and "recover" commands are allowed.

Discussed with: geom@ (mostly silence)
Tested by: Ilya A. Arhipov
Approved by: mav (mentor)
MFC after: 2 weeks


214118 20-Oct-2010 pjd

Bring in geli suspend/resume functionality (finally).

Before this change if you wanted to suspend your laptop and be sure that your
encryption keys are safe, you had to stop all processes that use file system
stored on encrypted device, unmount the file system and detach geli provider.

This isn't very handy. If you are a lucky user of a laptop where suspend/resume
actually works with FreeBSD (I'm not!) you most likely want to suspend your
laptop, because you don't want to start everything over again when you turn
your laptop back on.

And this is where geli suspend/resume steps in. When you execute:

# geli suspend -a

geli will wait for all in-flight I/O requests, suspend new I/O requests, remove
all geli sensitive data from the kernel memory (like encryption keys) and will
wait for either 'geli resume' or 'geli detach'.

Now with no keys in memory you can suspend your laptop without stopping any
processes or unmounting any file systems.

When you resume your laptop you have to resume geli devices using 'geli resume'
command. You need to provide your passphrase, etc. again so the keys can be
restored and suspended I/O requests released.

Of course you need to remember that 'geli suspend' won't clear file system
cache and other places where data from your geli-encrypted file system might be
present. But to get rid of those stopping processes and unmounting file system
won't help either - you have to turn your laptop off. Be warned.

Also note, that suspending geli device which contains file system with geli
utility (or anything used by 'geli resume') is not very good idea, as you won't
be able to resume it - when you execute geli(8), the kernel will try to read it
and this read I/O request will be suspended.


213662 09-Oct-2010 ae

Replace strlen(_PATH_DEV) with sizeof(_PATH_DEV) - 1.

Suggested by: kib
Approved by: kib (mentor)
MFC after: 5 days


213573 08-Oct-2010 uqs

mdoc: drop redundant .Pp and .LP calls

They have no effect when coming in pairs, or before .Bl/.Bd


213245 28-Sep-2010 pjd

Document recently added GPT attributes (bootme, bootonce, bootfailed) and
list other schemes attributes.

Reviewed by: simon, rpaulo
MFC after: 2 weeks


213187 26-Sep-2010 ae

Remove superfluous word from "gpart bootcode" usage message.

Approved by: kib (mentor)


213172 25-Sep-2010 pjd

- Add support for loading passphrase from a file (-J and -j options).
This is especially useful for things like installers, where regular
geli prompt can't be used.
- Add support for specifing multiple -K or -k options, so there is no
need to cat all keyfiles and read them from standard input.

Requested by: Kris Moore <kris@pcbsd.org>, thompsa
MFC after: 2 weeks


213097 24-Sep-2010 ae

Implement "force" (-F) option for gpart destroy verb.
This option doesn't passed to kernel and handled in user-space.
With -F option gpart creates new "delete" request for each
partition in table. Each request has flags="X" that disables
auto-commit feature. Last request is the original "destroy" request.
It has own flags and can have disabled or enabled auto-commit feature.
If error is occurred when deleting partitions, then new "undo" request
is created and all changes will be rolled back.

Approved by: kib (mentor)


213074 23-Sep-2010 pjd

- Simplify code by using g_*() API.
- Don't use u_char and u_int in userland.
- Change 'unsigned' to 'unsigned int'.
- Update copyright years.

MFC after: 1 week


213073 23-Sep-2010 pjd

Update copyright years.

MFC after: 1 week


213071 23-Sep-2010 pjd

Document AES-XTS.

MFC after: 1 week


213060 23-Sep-2010 pjd

- When trashing metadata, repeat overwrite kern.geom.eli.overwrites times.
- Flush write cache after each write.

MFC after: 1 week


213059 23-Sep-2010 pjd

- Use g_*() API when doing backups.
- fsync() created filed.

MFC after: 1 week


213058 23-Sep-2010 pjd

Because we first write metadata into new place and then trash old place we
don't want situation where old size is equal to new size, as we will trash
newly written metadata.

MFC after: 1 week


213057 23-Sep-2010 pjd

- Make use of g_*() API.
- Flush cache after writing metadata.

MFC after: 1 week


213056 23-Sep-2010 pjd

Simplify code a bit by using g_*() API from libgeom.

MFC after: 1 week


212934 20-Sep-2010 brian

Add a geli resize subcommand to resize encrypted filesystems prior
to growing the filesystem.

Refuse to attach providers where the metadata provider size is
wrong. This makes post-boot attaches behave consistently with
pre-boot attaches. Also refuse to restore metadata to a provider
of the wrong size without the new -f switch. The new -f switch
forces the metadata restoration despite the provider size, and
updates the provider size in the restored metadata to the correct
value.

Helped by: pjd
Reviewed by: pjd


212846 19-Sep-2010 pjd

Fix indent.


212708 15-Sep-2010 pjd

GPART_PARAM_INDEX is now G_TYPE_NUMBER.


212622 14-Sep-2010 pjd

Remove dead code.


212615 14-Sep-2010 pjd

Remove now unused G_TYPE_ASCNUM.


212614 14-Sep-2010 pjd

- Change all places where G_TYPE_ASCNUM is used to G_TYPE_NUMBER.
It turns out the new type wasn't really needed.
- Reorganize code a little bit.


212613 14-Sep-2010 pjd

Update two last places where "arg0" should be used instead of "geom".


212608 14-Sep-2010 pjd

All gpart(8) subcommands apart from the 'bootcode' subcommand handle
given geom/provider names with and without /dev/ prefix. Teach the
'bootcode' subcommand to handle /dev/<foo> names as well.


212607 14-Sep-2010 pjd

Remove dot which shouldn't be here, as err(3) will attach error message
at the end of the string.


212606 14-Sep-2010 pjd

Introduce special G_VAL_OPTIONAL define, which when given in value field
tells geom(8) to ignore it when it is not given and don't try to obtain
default value.


212555 13-Sep-2010 pjd

Add G_TYPE_MULTI flag, which when set for the given option, will
allow the option to be specified multiple times. This will help to
implement things like passing multiple keyfiles to geli(8) instead of
cat(1)ing them all into stdin and reading from there using one '-k -'
option.


212554 13-Sep-2010 pjd

- Remove gc_argname field. It was introduced for gpart(8), but if I
understand everything correctly, we don't really need it.
- Provide default numeric value as strings. This allows to simplify
a lot of code.
- Bump version number.


212547 13-Sep-2010 pjd

- Allow to specify value as const pointers.
- Make optional string values always an empty string.


212084 01-Sep-2010 maxim

o List MOUNTVER and SCHED classes. X-ref gsched(8). Bump Dd.

PR: docs/149925
Submitted by: arundel


211962 29-Aug-2010 uqs

gsched(8): fix example usage, mdoc nits

- ad0 was referred to as da0
- wrong parameter -s instead of -a in example
- use double quotes consistently

PR: docs/150082
Submitted by: N.J. Mann <njm@njm.me.uk>
MFC after: 2 weeks


211500 19-Aug-2010 des

expand_number(3) takes a uint64_t * now; intmax_t was never correct
except by accident.

MFC after: 3 weeks


211397 16-Aug-2010 joel

Fix typos, spelling, formatting and mdoc mistakes found by Nobuyuki while
translating these manual pages. Minor corrections by me.

Submitted by: Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp>


211282 13-Aug-2010 mjacob

Avoid a memory leak.

Submitted by: Dmitry Luhtionov via Alexander Motin
MFC after: 1 week


210933 06-Aug-2010 joel

Fix typos and spelling mistakes.


210645 30-Jul-2010 uqs

gsched(8) was first released with FreeBSD 8.1

MFC after: 3 days


210544 27-Jul-2010 bcr

Small typo fix: s/ommited/omitted

PR: docs/148977
Submitted by: Warren Block (wblock at wonkity dot com)
MFC after: 4 days


210408 23-Jul-2010 ae

Document that SI unit suffixes are supported for -b and -s options
of add verb. Mention about maximum size limit for "freebsd-boot"
partition. It should be smaller than 545 KB (hardcoded in pmbr).
Show usage of SI unit suffixes in example.

Approved by: mav (mentor)
MFC after: 1 week


210058 14-Jul-2010 mav

Do not bzero() NULL pointer on malloc() error.

Submitted by: Dmitry Luhtionov


209704 04-Jul-2010 mjacob

Fix the clear function which has been broken for a bit.

MFC after: 1 week


209392 21-Jun-2010 ae

Check for overflow before it occurs. Also add check for
negative numbers.

Suggested by: ache
Approved by: kib (mentor)


209388 21-Jun-2010 ae

Remove G_TYPE_ASCLBA type and replace it with G_TYPE_STRING in gpart.
Move code that converts params from humanized numbers to sectors count
to subr.c and adjust comment.
Add post-processing for "size" and "start offset" params in gpart,
now they are properly converted to sectors count with known sector size
that can be greater that 512 bytes.
Also replace "unsigned long long" type to "off_t" for unify code since
it used for medium size in libgeom(3) and DIOCGMEDIASIZE ioctl.

PR: bin/146277
Reviewed by: marcel (previous version)
Approved by: kib (mentor)
MFC after: 1 month


209350 19-Jun-2010 uqs

mdoc nitpicking for gsched.8
- remove stray argument [1]
- remove stray whitespace
- use canonical wording for the HISTORY section

PR: docs/147119 [1]
Submitted by: Alexander Best <alexbestms@wwu.de> [1]
MFC after: 1 week


208886 07-Jun-2010 ae

bgeom(3) does strdup of param name.
Don't leak memory when deleting param from gctl_req.

Reviewed by: marcel
Approved by: mav (mentor)
MFC after: 2 weeks


208778 03-Jun-2010 marius

- Mention that VTOC8 labels are found in Fujitsu SPARC64 machines as well.
- Add information regarding VTOC8 bootrstrap code and how it's handled with
r208777 in place.
- Document the mapping of partition types to VTOC8 tags.
- Add examples for VTOC8 to the respective section.
- Eliminated hard sentence breaks.

Reviewed by: marcel (slightly buggy version)
MFC after: 3 days


208777 03-Jun-2010 marius

- In gpart_bootfile_read() fix an off-by-one error preventing the bootstrap
file to be of maximum size.
- Add special handling required for SMI/VTOC8 disklabel partcode, i.e. avoid
overwriting the label when writing the bootstrap code to the partition
starting at 0 and install it to all partitions when the -i option is omitted
just like geom_sunlabel(4) and sunlabel(8) do by default.
- Add missing prototypes.
- Add const where applicable.

Reviewed by: marcel
MFC after: 3 days


208173 16-May-2010 nwhitehorn

Teach gpart about bootcode on APM.


207096 23-Apr-2010 marcel

Add and describe GEOM_PART_EBR.


207095 23-Apr-2010 marcel

Implement the resize command for resizing partitions. Without new
size, the partition in question is resized to fill all available
space. Quality work by Andrey!

Submitted by: "Andrey V. Elsukov" <bu7cher@yandex.ru>


206666 15-Apr-2010 pjd

Flush disk write cache after storing and clearing metadata.


206552 13-Apr-2010 luigi

fix copyright format, as requested by Joel Dahl


206550 13-Apr-2010 luigi

use correct .PATH, remove unused CFLAGS


206497 12-Apr-2010 luigi

Bring in geom_sched, support for scheduling disk I/O requests
in a device independent manner. Also include an example anticipatory
scheduler, gsched_rr, which gives very nice performance improvements
in presence of competing random access patterns.

This is joint work with Fabio Checconi, developed last year
and presented at BSDCan 2009. You can find details in the
README file or at

http://info.iet.unipi.it/~luigi/geom_sched/


205847 29-Mar-2010 mjacob

Change how multipath labels are created and managed. This makes it easier
to support various storage boxes which really aren't active-active.

We only write the label on the *first* provider. For all other providers
we just "add" the disk. This also allows for an "add" verb.

A usage implication is that you should specificy the currently active
storage path as the first provider.

Note that this does not add RDAC-like functionality, but better allows for
autovolumefailover configurations (additional checkins elsewhere will support
this).

Sponsored by: Panasas
MFC after: 1 month


205412 21-Mar-2010 mjacob

Add 'rotate' and 'getactive' verbs to provide some control and information
about what the currently active path is.

Sponsored by: Panasas
MFC after: 1 month


204725 04-Mar-2010 joel

Use our standard license text. No more voices in the authors head. :-)

Approved by: trasz


204329 25-Feb-2010 ru

Fixed dependencies (make checkdpadd).


203505 04-Feb-2010 mjacob

Add the long missing "destroy" option.

MFC after: 2 weeks


202586 18-Jan-2010 delphij

Also output stripeoffset for consumer even if stripesize is zero, while
stripeoffset is non-zero.

Pointed out by: mav


202519 17-Jan-2010 brueffer

Small fixes.


202457 17-Jan-2010 delphij

Stripe offset may be usable even without stripe size known,
so give the output when either is non-zero.

Suggested by: mav


202454 17-Jan-2010 delphij

Expose stripe offset and stripe size through libgeom and geom(8) userland
utilities.

Reviewed by: pjd, mav (earlier version)


202437 16-Jan-2010 trasz

Add gmountver, disk mount verification GEOM class.

Note that due to e.g. write throttling ('wdrain'), it can stall all the disk
I/O instead of just the device it's configured for. Using it for removable
media is therefore not a good idea.

Reviewed by: pjd (earlier version)


201658 06-Jan-2010 mav

Increase default block size from 4K to 64K. It was reduces 6 yeard ago,
when trees were big and FAST mode was enabled by default.

So small block size doesn't benefits linear I/O operations in FAST and
significantly slowdowns in ECONOMIC (default) mode. For single stream random
I/Os so small block doesn't give much benefits, as access time is usually
bigger then transfer time there. Same time it requires all heads to seek
together for every single request, reducing performance on parallel load.


201578 05-Jan-2010 mav

For completeness, add -s argument, manually specifying array block size.


201432 03-Jan-2010 trasz

Add manual page for gcache(8).


200290 09-Dec-2009 ru

The default balance algorithm has changed from "split" to
(the improved version of) "load".


200282 08-Dec-2009 mav

Change gmirror default balance algorithm from "split" to "load".
"split" is very ineffective for devices with rotating media as HDDs.
To be effective, it needs that transfer time reduction due to block
splitting was bigger then access time increase due to non-sequential
access. For modern HDDs I was able to reproduce it only with read sizes
of 2MB and above, which is almost not applicable in real life.
"load" algorithm same time is more universal and effective now.

Reviewed by: pjd


198478 26-Oct-2009 lulf

- Initialize variable in order to avoid GCC warning and enable WARNS=6.

PR: bin/139970
Submitted by: Ulrich Spörlein <uqs -at- spoerlein.net>


198236 19-Oct-2009 ru

Switch the default WARNS level for sbin/ to 6.

Submitted by: Ulrich Spörlein


198235 19-Oct-2009 ru

Clean up markup (mainly).


197274 17-Sep-2009 brueffer

Fix the example, -w is the right switch for write failure probability.

PR: 136219
Submitted by: Kouki Hashimoto <hsmtkk@gmail.com>
Patch by: gavin
MFC after: 3 days


197044 09-Sep-2009 pjd

Actually component with the greatest priority is used by the prefer balance
algorithm.


196879 06-Sep-2009 pjd

Add support for changing providers priority.

Submitted by: Mel Flynn


196878 06-Sep-2009 pjd

Update copyright years.


196877 06-Sep-2009 pjd

For any given subcommand allow to specify multi-line usage (separated by \n).

Submitted by: Mel Flynn


196476 23-Aug-2009 ivoras

Remove (c) line.

Requested by: pjd
Approved by: gnn (mentor)
MFC after: 1 month


196278 16-Aug-2009 marcel

Emit a proper error message instead of dumping core when 1)
GEOM_PART does not exist in the kernel, and 2) the GEOM in
question does not exist.
Additionally abort in case of programming errors that result
in neither the class nor geom not being present in the gctl
request.

Submitted by: "Andrey V. Elsukov" <bu7cher@yandex.ru>
Approved by: re (kib)


194092 13-Jun-2009 ivoras

Add support for labels derived from GPT metadata.

Approved by: gnn (mentor)
Reviewed by: pjd
PR: 128398
Submitted by: Marius Nuennerich < marius at nuenneri.ch >


193728 08-Jun-2009 jhb

Change the printf format string to match the variable type to quiet
warnings.


193673 08-Jun-2009 marcel

Make the size (-s) and start (-b) parameters of the add verb optional.
The missing parameter(s) are automatically filled-in.


193648 07-Jun-2009 marcel

Allow humanized numbers for LBAs, as well as partition indices for
gpart(8). LBAs in particular are ugly. The ganularity is a sector,
but users expect byte granularity when specifying the size or offset
with a SI unit. Handle LBAs specially to deal with this.


192747 25-May-2009 maxim

o Fix typo in the example.

PR: docs/134930
Submitted by: Alex Keda
MFC after: 1 week


192376 19-May-2009 trasz

Add links to libgeom(3) where appropriate.


191656 29-Apr-2009 trasz

Slightly improve gjournal documentation.

Reviewed by: pjd


190424 25-Mar-2009 ivoras

Man page accompanying r190423 - introduce UFS ID labels.

Actually-by: pjd
Approved by: gnn (mentor)


188919 22-Feb-2009 pjd

- Punctuation fixes.
- New sentence - new line.

Reported by: Ben Kaduk <minimarmot@gmail.com>

- No more than 80 chars per line.


188729 17-Feb-2009 pjd

Correct the year.

Reported by: Florian Smeets <flo@kasimir.com>


188728 17-Feb-2009 pjd

Document kern.geom.journal.* sysctls.

PR: docs/130548
Submitted by: Hywel Mallett <hywel@hmallett.co.uk>
MFC after: 1 week


188330 08-Feb-2009 marcel

Prefer the start and end attributes over the offset and size
attributes. The start and end more accurately describe the
space taken by a partition. The offset and size are used to
describe the effective (usable) storage of that partition.


188017 02-Feb-2009 lulf

- Use a separate pointer to the allocated memory for freeing, as strsep may
modify the pointer argument passed to it. This triggered an assert in malloc
when a geom command being run under the livefs environment.

PR: bin/130632
Submitted by: Dimitry Andric <dimitry -at- andric.com>
Pointy hat to: me
MFC after: 2 days


186737 04-Jan-2009 danger

- 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


186735 04-Jan-2009 ivoras

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)


186516 27-Dec-2008 lulf

- Back out r186038. Rather than changing the intent of the caller, the problem
should be handled internally in gvinum.

Suggested by: pjd


186038 13-Dec-2008 lulf

- 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


185496 30-Nov-2008 marcel

Print error messages as-is, when they don't conform to
<errno> [<parameter> 'value']
These are error messages from (lib)geom itself.


185495 30-Nov-2008 marcel

Call gctl_free() after we processed the error string.
It's being freed as part of the request.


185454 29-Nov-2008 marcel

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


185057 18-Nov-2008 delphij

Grammar improvements.

Submitted by: kensmith


185046 18-Nov-2008 marcel

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


185044 18-Nov-2008 marcel

Sort includes

Submitted by: delphij


185038 18-Nov-2008 marcel

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


184070 20-Oct-2008 marcel

Add support for multiple attributes. This is required for the
PC98 scheme.


183718 09-Oct-2008 delphij

Add some examples to demostrate gpart(8).
--此行及以下内容将会被忽略--
> Description of fields to fill in above: 76 columns --|
> PR: If a GNATS PR is affected by the change.
> Submitted by: If someone else sent in the change.
> Reviewed by: If someone else reviewed your modification.
> Approved by: If you needed approval for this commit.
> Obtained from: If the change is from a third party.
> MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email.
> Security: Vulnerability reference (one per line) or description.
> Empty fields above will be automatically removed.

M gpart.8


182452 29-Aug-2008 pjd

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


182451 29-Aug-2008 pjd

- Give algorithms recommendation.
- Keep options in alphabetical order.


181639 12-Aug-2008 pjd

geli onetime command can take only one GEOM provider at a time.


181471 09-Aug-2008 ivoras

Clean up of dead code and possible unassigned variable usage.

Found by: LLVM/Clang Static Checker
Approved by: gnn (mentor)


180228 03-Jul-2008 marcel

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.


179854 18-Jun-2008 marcel

Implement the set and unset verbs. While here, have the manpage
catch up with various changes.


179769 13-Jun-2008 marcel

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.


179630 07-Jun-2008 marcel

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.


179629 07-Jun-2008 marcel

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).


179628 06-Jun-2008 marcel

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.


179596 06-Jun-2008 marcel

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.


179562 05-Jun-2008 marcel

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.


179550 04-Jun-2008 marcel

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.


178180 13-Apr-2008 marcel

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.


178177 13-Apr-2008 remko

I keep taking timemachines to get back in time. Update the
year to 2008.

Noticed by: ceri


178174 13-Apr-2008 remko

Add missing device in tunefs entry.

PR: docs/122702
Submitted by: Yoshihiro Ota <ota@j.email.ne.jp>
MFC After: 3 days


177150 13-Mar-2008 brueffer

- 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


176932 08-Mar-2008 brueffer

Fix typos.

PR: 121486
Submitted by: Anatoly Borodin <anatoly.borodin@gmail.com>
MFC after: 3 days


176852 05-Mar-2008 delphij

Make it possible to build glabel into rescue geom(8) utility.

Ok'ed by: marcel
No objection: -current@


176828 05-Mar-2008 pjd

Add info about few missing GEOM classes that use geom(8).


175985 05-Feb-2008 lulf

- 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


175967 04-Feb-2008 lulf

- 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


173879 24-Nov-2007 brueffer

Minor language cleanup.

MFC after: 3 days


173721 18-Nov-2007 jb

Fix signed/unsigned comparison compiler warning.


173624 15-Nov-2007 ru

Briefly document what the -c option of the "label" command does.

MFC after: 3 days


173623 15-Nov-2007 ru

Revise the markup and apply some wordsmithing.

Reviewed by: pjd
MFC after: 3 days


173313 04-Nov-2007 marcel

Allow building of a special rescue version of geom that
has a subset of the classes compiled-in.


172856 21-Oct-2007 marcel

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...


172837 21-Oct-2007 marcel

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.


172302 23-Sep-2007 pjd

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)


172273 21-Sep-2007 pjd

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)


172272 21-Sep-2007 pjd

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)


172031 01-Sep-2007 pjd

Add support for Camellia encryption algorithm.

PR: kern/113790
Submitted by: Yoshisato YANAGISAWA <yanagisawa@csg.is.titech.ac.jp>
Approved by: re (bmah)


169930 24-May-2007 ru

Fix the online usage for the "dump" command.


169659 17-May-2007 marcel

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@


169631 16-May-2007 marcel

Bump G_LIB_VERSION to reflect the ABI change.

Pointed out by: pjd@


169586 15-May-2007 marcel

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.


169312 06-May-2007 pjd

Correct some typos.


169297 06-May-2007 pjd

Fix mdoc warnings.


169193 01-May-2007 pjd

Do some cleanups (like freeing memory and closing file descriptors) before
leaving the functions.


168304 03-Apr-2007 pjd

- 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.


167842 23-Mar-2007 pjd

Exit status should be 1 on error.

PR: bin/110705
Reported by: Tom Judge
MFC after: 2 weeks


167229 05-Mar-2007 pjd

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


167227 05-Mar-2007 pjd

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


167060 27-Feb-2007 ale

Call the multipath device with its real name.


167058 27-Feb-2007 brueffer

First cleanup pass: new sentence -> new line, typos fixed, some markup
errors fixed.


167056 27-Feb-2007 mjacob

Add a man page.


167050 27-Feb-2007 mjacob

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


166892 22-Feb-2007 pjd

Correct typo.

Spotted by: Tomasz Dudzisz


166626 10-Feb-2007 pjd

Forgot to hook up gjournal manual page to the build.

Reminded by: simon, piso


166337 29-Jan-2007 pjd

Add gjournal(8) manual page. Documentation of kern.geom.journal.* sysctls
is still missing, ehh.

Reviewed by: trhodes


166216 25-Jan-2007 pjd

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


166215 25-Jan-2007 pjd

Implement gctl_change_param() function, which changes value of existing
parameter.

MFC after: 1 week


165444 21-Dec-2006 ceri

Remove duplicate "clear" subcommand.

PR: docs/106947
Submitted by: TAOKA Fumiyoshi


163908 02-Nov-2006 ceri

Bump .Dd for -f|-F.


163888 01-Nov-2006 pjd

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.


163887 01-Nov-2006 pjd

G_TYPE_NONE was replaced with G_TYPE_BOOL.


163864 01-Nov-2006 pjd

Fix powerpc build.

Reported by: Peter Grehan <grehan@freebsd.org>


163851 31-Oct-2006 pjd

Hook up gjournal bits to the build.

Sponsored by: home.pl


163838 31-Oct-2006 pjd

Add userland control utility for gjournal GEOM class.

Sponsored by: home.pl


163205 10-Oct-2006 pjd

Be sure to not create devices with (mediasize % sectorsize) != 0.

Reported by: xride
MFC after: 1 week


163204 10-Oct-2006 pjd

Be sure to not create device which


163048 06-Oct-2006 ru

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.


162868 30-Sep-2006 pjd

MFp4: G_TYPE_BOOL sounds much better than G_TYPE_NONE.

Changes: 98722


162867 30-Sep-2006 pjd

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


162866 30-Sep-2006 pjd

Add __printflike() attribute to various functions.


162395 18-Sep-2006 ru

Markup fixes.


162371 17-Sep-2006 brueffer

Remove a contraction and add a missing article.


162356 16-Sep-2006 pjd

Fix copy&paste mistake.

Submitted by: Matthias Lederhofer <matled@gmx.net>


162353 16-Sep-2006 pjd

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


162348 16-Sep-2006 pjd

Note that we don't destroy keys on read-only attached providers.

MFC after: 1 week


162347 16-Sep-2006 pjd

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


162142 08-Sep-2006 pjd

- 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


161142 10-Aug-2006 maxim

o Spell.

Submitted by: ru


161133 09-Aug-2006 maxim

o Strip eol whitespaces.


161130 09-Aug-2006 maxim

o New sentence, new line.
o Touch Dd for -r.


161127 09-Aug-2006 pjd

Allow geli to operate on read-only providers.

Initial patch from: vd
MFC after: 2 weeks


161052 07-Aug-2006 pjd

Add missing #.


159361 06-Jun-2006 pjd

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.


159354 06-Jun-2006 brueffer

Clarify and merge two sentences.

Discussed with: pjd


159342 06-Jun-2006 brueffer

Mdoc cleanup and some wording improvements.


159329 06-Jun-2006 pjd

Remove section committed by mistake. It is not yet ready.


159310 05-Jun-2006 pjd

Document geli(8) data authentication.

Supported by: Wheel Sp. z o.o. (http://www.wheel.pl)


159308 05-Jun-2006 pjd

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)


158214 01-May-2006 pjd

Correct error messages.

MFC after: 2 weeks


157580 07-Apr-2006 pjd

Allocate memory for NUL-termination as well.

MFC after: 2 days


156813 17-Mar-2006 ru

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)


156422 08-Mar-2006 pjd

Add some notes how to properly dump kernel onto gmirror provider.

Reviewed and corrected by: brueffer
MFC after: 3 days


156257 03-Mar-2006 wkoszek

Print "clear" and "dump" only once.

Reviewed by: pjd
Approved by: cognet (mentor)
MFC after: 3 days


155538 11-Feb-2006 pjd

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


155536 11-Feb-2006 pjd

- 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


155183 01-Feb-2006 pjd

Deny init/attach/setkey subcommands when no key components are given.

MFC after: 3 days
Tested with: prove /usr/src/tools/regression/geom_eli


155181 01-Feb-2006 joel

Expand contractions.


155175 01-Feb-2006 pjd

Remove trailing spaces.


155101 31-Jan-2006 pjd

Remove unused argument.

MFC after: 3 days


155071 30-Jan-2006 pjd

Allow to specify only one disk. This is helpful when we want to extend
our concatenated device later.

MFC after: 1 week


154966 29-Jan-2006 pjd

Add a reference to geli(8).

MFC after: 3 days


153250 08-Dec-2005 pjd

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.


153190 07-Dec-2005 pjd

- 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


152755 24-Nov-2005 joel

s/5.5/6.0/ in HISTORY section.

Discussed with: ru


151651 25-Oct-2005 ceri

gmirror.8:
Note the default balancing algorithm and stripe size.

geom_mirror.c:
Slightly friendlier error message.

Reviewed by: pjd


150704 29-Sep-2005 pjd

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


149928 10-Sep-2005 pjd

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


149534 27-Aug-2005 marius

As with NO_CRYPT, don't try to compile geli(8) when NO_OPENSSL is defined
either.

MFC after: 1 week


149493 26-Aug-2005 takawata

Update Document.


149353 21-Aug-2005 pjd

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


149304 19-Aug-2005 pjd

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


149302 19-Aug-2005 pjd

Move function for calculating number of bits into more central place.
I want to use it so more.

MFC after: 3 days


149194 17-Aug-2005 pjd

Update manual page (now dedicated kernel thread is always started).

MFC after: 3 days


149059 14-Aug-2005 pjd

Unfortunately dlerror(3) returns string, so there is no clean way to
ignore "no such file" errors only, which I wanted to do.
Because of this I ignored all other errors on dlopen(3) failure as well,
which isn't good.
Fix this situation by calling access(2) on library file first and ignore
only ENOENT error. This allows to report all the rest of dlopen(3) errors.

MFC after: 3 days


149047 14-Aug-2005 pjd

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


148982 12-Aug-2005 pjd

GELI doesn't need cryptodev.

MFC after: 2 days


148978 12-Aug-2005 pjd

Add code for Ext2FS and ReiserFS labels recognition.

Submitted by: Stanislav Sedov <stas@310.ru>
PR: kern/84638
MFC after: 1 week


148649 02-Aug-2005 ru

Add missing check for the NO_CRYPT build option.

Reported by: Alexander Polakov


148569 30-Jul-2005 brueffer

Misc cleanup (spelling, grammar, mdoc, style, cut >80 char lines).


148507 29-Jul-2005 pjd

I actually do need libmd.


148464 27-Jul-2005 pjd

I think I found the problem, reconnect geli to the build.


148463 27-Jul-2005 pjd

- 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


148462 27-Jul-2005 pjd

Disconnect geli from the build for now.
I need to find out first what is the cause of sha2.c compilation problem
on alpha.


148457 27-Jul-2005 pjd

Connect GEOM_ELI class to the build.

MFC after: 1 week


148456 27-Jul-2005 pjd

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


147947 13-Jul-2005 pjd

Don't forget to initialize 'id' field.

MFC after: 3 days


145662 29-Apr-2005 pjd

Remove trailing spaces.


145543 26-Apr-2005 pjd

Fix stripe size in example.

Found by: kris
MFC after: 3 days


145445 23-Apr-2005 pjd

Remove duplicated description of 'clear' subcommand.

Pointed out by: marck
X-MFC-after: few seconds


145130 15-Apr-2005 pjd

Document 'clear' and 'dump' subcommands.

MFC after: 1 week


144747 07-Apr-2005 pjd

Allow classes to specify local source files.

MFC after: 3 weeks


144737 07-Apr-2005 pjd

Empty error buffer is not an error.

MFC after: 3 weeks


143998 22-Mar-2005 pjd

Fix use of uninitialized buf[0].

Reported by: stefanf
MFC after: 3 days


143589 14-Mar-2005 pjd

Be sure that class name storaed in 'class_name' is lower case.

MFC after: 1 week


143586 14-Mar-2005 pjd

Define subcommands' usage inside g_command structure.

MFC after: 1 week


143585 14-Mar-2005 pjd

- Add gc_usage field to g_command structure. This will allow to define
usage for a subcommand, so no 'usage' function has to be implemented
in class library.
- Bump version number as it breaks ABI, but don't provide backward
compatibility, because there are probably no external consumers of this
geom(8).
This allows to print more precise usage for standard commands and simplify
class libraries a bit.

MFC after: 1 week


143576 14-Mar-2005 pjd

Instead of documenting every standard subcommand's argument everywhere,
just leave reference to geom(8).

MFC after: 1 week


143575 14-Mar-2005 pjd

Document subcommands' arguments.

MFC after: 1 week


143573 14-Mar-2005 pjd

Document '-s' option of 'status' subcommand.

MFC after: 1 week


143572 14-Mar-2005 pjd

Add '-s' option to 'status' subcommand. It produces script-friendly output:

# gmirror status
Name Status Components
mirror/root COMPLETE ad0s1a
ad2s1a
mirror/data DEGRADED da0
da1 (76%)
da2
# gmirror status -s
Name Status Components
mirror/root COMPLETE ad0s1a
mirror/root COMPLETE ad2s1a
mirror/data DEGRADED da0
mirror/data DEGRADED da1 (76%)
mirror/data DEGRADED da2

MFC after: 1 week


143558 14-Mar-2005 pjd

Use int instead of size_t (%*s needs int).

MFC after: 1 week


143549 14-Mar-2005 delphij

printf(3) expects that %*s having an int parameter, which generates
warning on 64-bit platforms. Explicitly cast these values to int
to work around this issue, as these values are tend to be small.

Spotted by: ia64 tinderbox


143535 13-Mar-2005 pjd

- Document 'status' subcommand.
- Update copyrights.

MFC after: 1 week


143534 13-Mar-2005 pjd

Add 'status' command which prints general information about devices.
For example:

# gmirror status
Name Status Components
mirror/root COMPLETE ad0s1a
ad2s1a
mirror/data DEGRADED da0
da1 (76%)
da2

MFC after: 1 week


143533 13-Mar-2005 pjd

Update copyrights.


143532 13-Mar-2005 pjd

Change function names related to 'list' command from 'show_one_*' to
'list_one_*'.

MFC after: 1 week


143522 13-Mar-2005 pjd

When listing all devices (geoms) from the given class, skip geoms without
providers.
This prevents from listing geoms like <name>.sync which can be confusing.
It still allows to show details about it by giving its name when listing.

MFC after: 1 week


142739 28-Feb-2005 brueffer

Typos and grammar fixes, wordsmithing


142727 27-Feb-2005 pjd

- 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


142691 27-Feb-2005 pjd

- Add GEOM_LIBRARY_PATH environment variable which allows to specify an
alternative to /lib/geom/ path where shared libraries are stored.
- Improve debugging.

MFC after: 3 days


142671 27-Feb-2005 pjd

Add SHSEC class to the list of geom(8)-aware classes.

MFC after: 3 days


142483 25-Feb-2005 pjd

Add a missing comma.


142351 24-Feb-2005 trhodes

Fix a couple of grammar nits.

PR: 77437
Submitted by: Paul A. Hoadley <paulh@logicsquad.net> (original version)


141995 16-Feb-2005 pjd

Fix year in copyrights.


140415 18-Jan-2005 ru

Sort sections.


140368 17-Jan-2005 ru

Added the EXIT STATUS section where appropriate.


140298 15-Jan-2005 pjd

Fix arguments syntax.

Manual pages fixes by: ru
MFC after: 3 days


140282 15-Jan-2005 ru

Markup fixes.


140075 11-Jan-2005 pjd

Connect SHSEC GEOM class to the build.


140074 11-Jan-2005 pjd

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


139987 10-Jan-2005 ru

Scheduled mdoc(7) sweep.


139377 28-Dec-2004 pjd

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


139295 25-Dec-2004 pjd

- 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.


139213 22-Dec-2004 pjd

- 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.


139209 22-Dec-2004 pjd

'forget' command takes device names, not provider names.


139112 21-Dec-2004 ru

NOSHARED -> NO_SHARED


138623 09-Dec-2004 pjd

- Turn off 'fast' mode by default and increase maximum memory to consume
when this mode is used.
- Manual page update.


137280 05-Nov-2004 pjd

Note that sysctls documentation is missing.


137221 04-Nov-2004 ceri

Grammatical and spelling improvements.

Reviewed by: pjd


137161 03-Nov-2004 pjd

Remove extra 's'.

Submitted by: ceri


137160 03-Nov-2004 pjd

Be more correct.

Submitted by: ceri


137158 03-Nov-2004 pjd

Remove one more redundant 'not'.


137107 01-Nov-2004 pjd

Remove redundant 'not'.


135826 26-Sep-2004 obrien

Embellish the man page after trying to migrate to gstripe from ccd(4).


135825 26-Sep-2004 pjd

Don't allow to specify wrong stripe size.

Reported by: obrien


135437 18-Sep-2004 pjd

Document '-p' flag for 'insert' command correct.


135370 17-Sep-2004 pjd

Do not exit after printing usage, give geom(8) a chance to show standard
commands.


135369 17-Sep-2004 pjd

- 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.


134539 30-Aug-2004 pjd

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


134422 28-Aug-2004 pjd

Warn the user if we are not going to use the whole provider's space.


134420 28-Aug-2004 pjd

Warn the user if we are not going to use whole provider space.

Requested by: Michael Handler <handler@grendel.net>


134419 28-Aug-2004 pjd

- If error string begins with "warning: ", don't exit, treat it as a warning
only.
- Use getprogname() function when informing about versions problem.


134196 23-Aug-2004 pjd

Add missing GEOM classes, which are aware of geom(8).

Submitted by: kuriyama


134169 22-Aug-2004 pjd

Fix sysctl name.


134168 22-Aug-2004 pjd

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


134124 21-Aug-2004 pjd

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
[...]


133978 18-Aug-2004 pjd

- Add a manual page for graid3(8) utility.
- Connect it to the build.
- Inform geom(8) about it.


133967 18-Aug-2004 pjd

Add a line to BUGS section about the need of implementation description.


133962 18-Aug-2004 pjd

Add some missing empty lines.


133961 18-Aug-2004 pjd

Fix typo.


133960 18-Aug-2004 pjd

Actually one can specify more than one device to stop.


133959 18-Aug-2004 pjd

Ok, let's try again:
Add manual page for gmirror(8) utility.


133958 18-Aug-2004 pjd

- Add a manual page for gmirror(8) utility.
- Connect it to the build.
- Inform geom(8) manual page about it.

Reviewed by: trhodes


133812 16-Aug-2004 pjd

Connect RAID3 GEOM class to the build.


133808 16-Aug-2004 pjd

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


133570 12-Aug-2004 pjd

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.


133447 10-Aug-2004 pjd

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.


133373 09-Aug-2004 pjd

- 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.


133205 06-Aug-2004 pjd

Add and document kern.geom.stripe.fast_failed sysctl, which shows how
many times "fast" mode failed.


133005 02-Aug-2004 pjd

Don't use version number in library name. The library version is checked
after dlopen() anyway, so we should be safe.

Suggested by: ru


132982 01-Aug-2004 pjd

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.


132920 31-Jul-2004 pjd

Use SHLIBDIR instead of LIBDIR. This should fix buildworld breakage.

Reported by: des


132909 31-Jul-2004 pjd

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.


132905 30-Jul-2004 pjd

Connect GEOM_MIRROR class to the build.


132904 30-Jul-2004 pjd

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


132877 30-Jul-2004 pjd

- 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).


132872 30-Jul-2004 pjd

Fix typo.


132665 26-Jul-2004 pjd

Improve geom(8)'s 'list' command to show geoms and their providers and
consumers. Teach STRIPE, CONCAT and NOP classes about this improvement.


132664 26-Jul-2004 pjd

Change naming scheme from /dev/<name>.stripe to /dev/stripe/<name>.


132663 26-Jul-2004 pjd

Change naming scheme from /dev/<name>.concat to /dev/concat/<name>.


132381 19-Jul-2004 pjd

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


132344 18-Jul-2004 pjd

MFp4: Add 'dump' command to gconcat(8), glabel(8) and gstripe(8) which allow
to dump metadata from given components.


132153 14-Jul-2004 pjd

Add a reference to glabel(8).


132100 13-Jul-2004 pjd

Document sysctl variables.

Based on: simon's patch


132099 13-Jul-2004 pjd

Those sysctl are used to control GEOM class, not a userland utility.

Reviewed by: simon


132096 13-Jul-2004 pjd

Document sysctls variables used by GEOM_STRIPE class.

Submitted by: simon


131879 09-Jul-2004 pjd

Decrease default stripe size to 4k, as we have "FAST" mode turned on by
default.


131763 07-Jul-2004 ru

Slight markup and grammar fixes.


131721 06-Jul-2004 pjd

Fix copy&paste bug.


131649 05-Jul-2004 pjd

- Add 'stop' command, which works just like 'destroy' command, but sounds
less dangerous.
- Update manual pages and extend examples.
- Bump versions.


131603 05-Jul-2004 pjd

MFp4: gmirror(8) is coming soon, and we need g_metadata_read() there.


131520 03-Jul-2004 pjd

Grammar nits.

Submitted by: David Magda <dmagda@ee.ryerson.ca>


131476 02-Jul-2004 pjd

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!


130625 17-Jun-2004 pjd

Add missing newlines.


130591 16-Jun-2004 pjd

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.


130535 15-Jun-2004 pjd

Connect geom(8) to the build.

Reminded by: des


129875 30-May-2004 le

Fix typo.


129754 26-May-2004 pjd

Fix order.


129745 26-May-2004 pjd

Print provider's size in human-readable form as well.


129682 24-May-2004 pjd

- Add a cross-reference to geom(8).
- Add missing 'a'.


129681 24-May-2004 pjd

Add manual page for geom(8) utility.

Supported by: Wheel - Open Technologies - http://www.wheel.pl


129591 22-May-2004 pjd

Add standard command "help" to print usage.


129586 22-May-2004 pjd

Actually we are also able to list only choosen providers.


129577 22-May-2004 pjd

Be more precise.


129563 21-May-2004 pjd

- More clear example description.
- Fix copy&paste bug.


129561 21-May-2004 pjd

Add manual pages for gconcat(8), gstripe(8) and gnop(8) utilities.

Supported by: Wheel - Open Technologies - http://www.wheel.pl


129548 21-May-2004 pjd

- Change command name from 'config' to 'configure'.
- Bump version number.


129512 20-May-2004 pjd

Various style.Makefile(5) improvements.

Inspired by: ru


129494 20-May-2004 pjd

Fix supposed compilation problem, using LIBDIR here can confuse core/
compilation.


129474 20-May-2004 pjd

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


129470 20-May-2004 pjd

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