Home | History | Annotate | only in /src/sbin/raidctl
History log of /src/sbin/raidctl
RevisionDateAuthorComments
 1.18 03-Jun-2023  lukem bsd.own.mk: rename GCC_NO_* to CC_WNO_*

Rename compiler-warning-disable variables from
GCC_NO_warning
to
CC_WNO_warning
where warning is the full warning name as used by the compiler.

GCC_NO_IMPLICIT_FALLTHRU is CC_WNO_IMPLICIT_FALLTHROUGH

Using the convention CC_compilerflag, where compilerflag
is based on the full compiler flag name.
 1.17 13-Oct-2019  mrg introduce some common variables for use in GCC warning disables:

GCC_NO_FORMAT_TRUNCATION -Wno-format-truncation (GCC 7/8)
GCC_NO_STRINGOP_TRUNCATION -Wno-stringop-truncation (GCC 8)
GCC_NO_STRINGOP_OVERFLOW -Wno-stringop-overflow (GCC 8)
GCC_NO_CAST_FUNCTION_TYPE -Wno-cast-function-type (GCC 8)

use these to turn off warnings for most GCC-8 complaints. many
of these are false positives, most of the real bugs are already
commited, or are yet to come.


we plan to introduce versions of (some?) of these that use the
"-Wno-error=" form, which still displays the warnings but does
not make it an error, and all of the above will be re-considered
as either being "fix me" (warning still displayed) or "warning
is wrong."
 1.16 15-Dec-2010  pooka branches: 1.16.46;
Use RUMPPRG.

ok Greg Oster
 1.15 08-Nov-2010  pooka Update RUMP_ACTION to use rumpclient.

The server must of course have some disks configured. Let's say
we have this simple server with disks as a few sparse host files:

main()
{
rump_init();
rump_pub_etfs_register("/disk1", "./disk1.img", RUMP_ETFS_BLK);
rump_pub_etfs_register("/disk2", "./disk2.img", RUMP_ETFS_BLK);
rump_pub_etfs_register("/disk3", "./disk3.img", RUMP_ETFS_BLK);
rump_pub_etfs_register("/disk4", "./disk4.img", RUMP_ETFS_BLK);
pause();
}

And we run the server:

mainbus0 (root)
Kernelized RAIDframe activated
/disk1: hostpath ./disk1.img (97 GB)
/disk2: hostpath ./disk2.img (97 GB)
/disk3: hostpath ./disk3.img (97 GB)
/disk4: hostpath ./disk4.img (97 GB)

We can then configure the raid against the server:

> ./raidctl -c theraid.conf raid0

And lo, we have evidence of a level1 raid in the server dmesg:

raid0: RAID Level 1
raid0: Components: /disk1 /disk2 /disk3 /disk4
raid0: Total Sectors: 409599744 (199999 MB)

yea, i initialized it already in a previous run:

> ./raidctl -S raid0
Reconstruction is 100% complete.
Parity Re-write is 100% complete.
Copyback is 100% complete.
 1.14 11-Oct-2009  pooka close rump kernel file descriptors properly
 1.13 11-Oct-2009  pooka Support RUMP_ACTION, i.e. compile-time switch to make this execute
rump syscalls to configure raidframe in a rump kernel.
 1.12 27-Jun-2005  christos Move WARNS=3 to the Makefile.inc, and add a little const to the remaining
programs that did not compile before.
 1.11 09-Feb-2005  xtraeme Kill __P(), use ANSI function declarations; WARNS=3.
 1.10 20-Jan-2005  xtraeme WARNS=2 is the default defined in sbin/Makefile.inc. (thanks wiz)
 1.9 04-Oct-2001  oster Remove cruft. We no longer need to look into sys/dev/raidframe to
find the needed include files.
 1.8 27-Jan-2001  oster Move parts of a RAID type mapping table from rf_layout.c to rf_configure.c.
This means we don't need to compile or link with rf_layout.c here.
 1.7 23-May-2000  thorpej Build with WARNS=2.
 1.6 07-Aug-1999  oster Move two functions from rf_strutils.c into rf_configure.c, removing
the need for rf_strutils.c.
 1.5 26-Mar-1999  oster Move COPTS to CPPFLAGS. Nuke some no-longer needed compile options.
 1.4 04-Feb-1999  oster Add missing NetBSD RCS ID's! Thanks to SAITOH Masanobu (msaitoh@netbsd.org)
for pointing this out.
 1.3 18-Jan-1999  lukem no need for CWARNFLAGS; ../Makefile.inc sets WARNS=1
 1.2 17-Jan-1999  matt Allow CFLAGS to be set in /etc/mk.conf
 1.1 13-Nov-1998  oster RAIDframe, version 1.1, from the Parallel Data Laboratory at
Carnegie Mellon University. Full RAID implementation, including
levels 0, 1, 4, 5, 6, parity logging, and a few other goodies.
Ported to NetBSD by Greg Oster.

raidctl is our userland configuration tool for RAIDframe.
 1.16.46.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2 09-Feb-2011  pooka Exterminate a bug I created in 2009.
 1.1 15-Dec-2010  pooka branches: 1.1.2;
Use RUMPPRG.

ok Greg Oster
 1.1.2.1 17-Feb-2011  bouyer Sync with HEAD
 1.82 25-Sep-2023  oster We no longer need the deprecated copyback functionality now that
incorporating a used spare is automatic.

Copyback has always been an issue, as to do a copyback all IO to
the array had to be suspended, and so was very, very unlikely to
have been used in anything resembling a production system.
 1.81 21-Sep-2023  oster Implement command-line configuration of simple RAID sets with raidctl
based on the usage pattern:

raidctl <device> create <level> <component1> <component2> ...

For example,

raidctl raid0 create mirror absent /dev/wd1e

will create a RAID level 1 (mirror) set with an absent first component
and /dev/wd1e as the second component. The resulting RAID device will
be marked as auto-configurable, will have a serial number set (based
on the current time), and parity will be initialized. Reasonable
performance values are automatically used by default for other parameters
normally specified in the configuration file.

Also: Only print out Autoconfig status if being verbose.
 1.80 17-Sep-2023  oster Implement hot removal of spares and components. From manu@.

Implement a long desired feature of automatically incorporating
a used spare into the array after a reconstruct.

Given the configuration:
Components:
/dev/wd0e: failed
/dev/wd1e: optimal
/dev/wd2e: optimal
Spares:
/dev/wd3e: spare

Running 'raidctl -F /dev/wd0e raid0' will now result in the
following configuration after a successful rebuild:
Components:
/dev/wd3e: optimal
/dev/wd1e: optimal
/dev/wd2e: optimal
No spares.

Thanks to manu@ for the development of the initial set of changes
which allowed the changes to automatically incorporate a used spare
to come to fruition. Thanks also to manu@ for useful discussions
about and additional testing of these changes.
 1.79 14-Jun-2022  kre branches: 1.79.2;
Implement "raidctl -t config-file"

This does the same config file parse that -c/-C do, but only
that (hence no raidframe device is needed, or accepted).

Any syntax errors in the config file will be reported, nothing
else happens.
 1.78 02-Aug-2021  oster Support on-demand re-scanning all devices to look for
autoconfig RAID sets. raidctl now supports looking
for autoconfig RAID sets with a new '-L' flag.
 1.77 27-May-2021  wiz Avoid using Pq.

In this case, the parentheses were wrong when a line was extended.
 1.76 27-May-2021  mrg move the basic history i wrote from raidctl(8) to raid(4), and
fix the x86 (thanks simonb) and sparc bootable dates, a couple
of spelling errors.
 1.75 26-May-2021  mrg update the list of platforms supporting loading kernels from raid.
expand the HISTORY section to include notable RF moments in netbsd.
bump date.
 1.74 18-Jan-2018  mrg branches: 1.74.10;
implement 32-bit compat support for raidframe.

convert several raidframe ioctls to be bitsize idempotent so that
they work the same in 32 and 64 bit worlds, allowing netbsd32 to
configure and query raid properly. remove useless 'row' in a few
places. add COMPAT_80 and put the old ioctls there.

raidframeio.h:
RAIDFRAME_TEST_ACC
- remove, unused
RAIDFRAME_GET_COMPONENT_LABEL
- convert to label not pointer to label
RAIDFRAME_CHECK_RECON_STATUS_EXT
RAIDFRAME_CHECK_PARITYREWRITE_STATUS_EXT
RAIDFRAME_CHECK_COPYBACK_STATUS_EXT
- convert to progress info not pointer to info
RAIDFRAME_GET_INFO
- version entirely.
raidframevar.h:
- rf_recon_req{} has row, flags and raidPtr removed (they're
not a useful part of this interface.)
- RF_Config_s{} and RF_DeviceConfig_s{} have numRow/rows removed.
- RF_RaidDisk_s{} is re-ordered slightly to fix alignment
padding - the actual data was already OK.
- InstallSpareTable() loses row argument

rf_compat32.c has code for RF_Config_s{} in 32 bit mode, used
by RAIDFRAME_CONFIGURE and RAIDFRAME_GET_INFO32.

rf_compat80.c has code for rf_recon_req{}, RF_RaidDisk_s{} and
RF_DeviceConfig_s{} to handle RAIDFRAME_FAIL_DISK,
RAIDFRAME_GET_COMPONENT_LABEL, RAIDFRAME_CHECK_RECON_STATUS_EXT,
RAIDFRAME_CHECK_PARITYREWRITE_STATUS_EXT,
RAIDFRAME_CHECK_COPYBACK_STATUS_EXT, RAIDFRAME_GET_INFO.

move several of the per-ioctl code blocks into separate functions.

add rf_recon_req_internal{} to replace old usage of global
rf_recon_req{} that had unused void * in the structure, ruining
it's 32/64 bit ABI.

add missing case for RAIDFRAME_GET_INFO50.

adjust raid tests to use the new .conf format, and add a case to
test the old method as well.

raidctl:
deal with lack of 'row' members in a couple of places.
fail request no longer takes row.
handle "START array" sections with just "numCol numSpare", ie
no "numRow" specified. for now, generate old-style configuration
but update raidctl.8 to specify the new style (keeping reference
to the old style.)

note that: RF_ComponentLabel_s::{row,num_rows} and
RF_SingleComponent_s::row are obsolete but not removed yet.
 1.73 20-Nov-2017  kardel support NAME=<wedge name> syntax for disks and spares
 1.72 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.71 06-Jan-2016  wiz branches: 1.71.8;
Use standard sort order for options.

Add -U to usage.
 1.70 06-Jan-2016  christos Access to the SET_LAST_UNIT ioctl.
 1.69 30-Jun-2015  wiz Bump date for previous. Add whitespace.
Fix some mandoc warnings.
 1.68 30-Jun-2015  sborrill Clarify that what was previously known as -A root is now -A forceroot, not
-A softroot and that -A root can still be used for historical reasons.
 1.67 03-Apr-2014  christos branches: 1.67.4;
Add the ability to "softroot" mount (i.e. mount root only when the raid
set contains the boot device), as opposed to "hardroot" (the previous
default which forces the raid to be root no matter what).
 1.66 07-Oct-2013  jdc Belatedly note root on RAIDframe support for sandpoint.
 1.65 20-Sep-2013  tron Note that NetBSD/amd64 can boot of RAID volumes.
 1.64 23-Mar-2012  njoly branches: 1.64.2;
Remove unexpected newline between Em macro and text.
 1.63 02-Aug-2011  wiz branches: 1.63.2; 1.63.4; 1.63.8; 1.63.10;
New sentence, new line.
 1.62 28-Jul-2011  buhrow Document the need for zeroing out the first 64 blocks of a replacement
component in a failed RAID set in order to avoid potentially configuring
RAId 1 sets with erroneous values taken from random extent data in the
replacement component partitions.
 1.61 27-Jan-2010  wiz + Fatal errors due to uninitialized components are ignored.
for -C. For dillo@
 1.60 27-Jan-2010  wiz Consistently use "START disks" in examples. Bump date.
 1.59 17-Nov-2009  wiz Remove trailing whitespace.
 1.58 17-Nov-2009  jld Bump date; also fix typo pointed out by snj@.
 1.57 17-Nov-2009  jld Finally commit the RAIDframe parity map Summer Of Code project.

Drastically reduces the amount of time spent rewriting parity after an
unclean shutdown by keeping better track of which regions might have had
outstanding writes. Enabled by default; can be disabled on a per-set
basis, or tuned, with the new raidctl(8) commands.

Discussed on tech-kern@ to a general air of approval; exhortations to
commit from mrg@, christos@, and others.

Thanks to Google for their sponsorship, oster@ for mentoring the
project, assorted developers for trying very hard to break it, and
probably more I'm forgetting.
 1.56 28-Aug-2008  wiz branches: 1.56.2; 1.56.8;
Drop trailing whitespace.
 1.55 26-Aug-2008  oster Bump date (before wizd).
 1.54 26-Aug-2008  oster Add description of some of the things 'raidctl -u' doesn't do.
 1.53 19-Aug-2008  oster We have the notion of an 'absent' disk, so use that in another example.
 1.52 02-May-2008  martin branches: 1.52.2;
Move TNF licenses to 2 clause form
 1.51 14-Dec-2007  explorer branches: 1.51.4; 1.51.6;
Fix a minor typo: wd0h was repeated, change second instance to wd1h as is likely intended.
 1.50 06-Aug-2007  oster branches: 1.50.2; 1.50.4; 1.50.8;
Talk a bit more about how the size of a RAID set is determined, and
of RF_PROTECTED_SECTORS. Requested by (and with comments from and
thanks to) Christoph (bad@).
 1.49 28-Feb-2005  wiz Bump date for previous.
 1.48 28-Feb-2005  oster Add a few more lines about the 'Parity status:' output of 'raidctl -s'.
This should address PR#29540.
 1.47 01-Feb-2005  wiz Give Dd the full month names as argument.
 1.46 31-Jan-2005  fredb Greg Oster just reminded me, I left out "vax".
 1.45 31-Jan-2005  fredb Sync with raid(4) regarding the architectures that support booting directly
from RAID 1, using language supplied by Anders Dinson in PR bin/29158, with
some additions by myself.
 1.44 24-May-2004  wiz Use Dq instead of quotes; bump date for previous.
 1.43 22-May-2004  oster Update docs to reflect the support for the word "absent" in the "disks"
section of RAID config files.
 1.42 16-May-2004  wiz Add commas in enumeration; bump date for previous.
 1.41 15-May-2004  dsl Add i386 to the list of systems that support booting from raid1.
RAID(4) also needs changing - if someone knows where the source is....
 1.40 11-Apr-2004  snj Bump date for last.
 1.39 11-Apr-2004  oster Swapping to RAID 5 is happy now. Remove indications to the contrary.
 1.38 29-Feb-2004  oster branches: 1.38.2;
Note in the description of hot-adding components that a component label is
not required for the component. Thanks to David Maxwell for the
documentation suggestion.
 1.37 02-Nov-2003  wiz Bump date for previous.
 1.36 02-Nov-2003  oster Add a couple little warnings about swapping to RAID 5 sets.
(it currently doesn't work.)
 1.35 25-Feb-2003  wiz .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
 1.34 16-Nov-2002  wiz Remove trailing space.
 1.33 16-Nov-2002  oster Catch up on some documentation stuff:
- add a note about adding 'swapoff=YES' to /etc/rc.conf
- add a note about not using raid0[cd] for a filesystem.
- filesystems -> file systems
 1.32 01-Oct-2002  wiz Use more markup.
 1.31 01-Oct-2002  wiz New sentence, new line. By Robert Elz with minimal fixes.
 1.30 11-Jul-2002  wiz Remove duplicate 'to'. From Ryo HAYASAKA in bin/17562.
 1.29 08-Feb-2002  ross branches: 1.29.2;
Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.28 21-Jan-2002  wiz Drop trailing whitespace.
 1.27 20-Jan-2002  oster Add a description of how to possibly recover a RAID set in the
event of a multiple disk failure.
 1.26 16-Nov-2001  wiz Don't abuse -unfilled for -literal; sort sections, sort SEE ALSO, drop
lots of unnecessary .Pps.
 1.25 16-Nov-2001  wiz Whitespace nits
 1.24 10-Jul-2001  lukem * add -G, which lists the configuration of the given raid set in the
same configuration format that -c and -C use.
this is useful if you're using autoconfig and you've misplaced the
/etc/raidXXX.conf files
* "filesystem" -> "file system", and other man page cleanups.
 1.23 05-Jun-2001  wiz Drop arguments of .Os.
 1.22 27-Oct-2000  oster - cleanup wording and add additional comments on such things as
"component1" and "raidctl -A yes"
- add a note about how to build a RAID set with a limited number of disks
(thanks to Simon Burge for suggestions)
- improve layout of 'raidctl -i' discussion (thanks to Hubert Feyrer)
- add a (small) section on Performance Tuning
 1.21 10-Aug-2000  oster Clarify a few things about parity. Add more documentation about RAID on RAID,
and root on RAID.
 1.20 05-Jul-2000  oster Add a .Sq for single quotes, instead of doing it by hand.
Fixes a formatting problem noted by Hubert Feyrer (Thanks Hubert!).
 1.19 02-Jun-2000  oster branches: 1.19.2;
Slight wording improvement on the 'raidctl -R' case.
 1.18 29-May-2000  oster Fix up some single quotes that messed up a line. (Thanks Wiz!)
 1.17 26-Feb-2000  oster branches: 1.17.2;
Update for 'options RAID_AUTOCONFIG'.
 1.16 26-Feb-2000  oster Add a few more examples, and a summary.
 1.15 25-Feb-2000  oster More updates, spelling fixes, etc.
 1.14 25-Feb-2000  oster First revamp of the docs. This is still work-in-progress. More to come
shortly.
 1.13 24-Feb-2000  oster Document the new autoconfiguration switches, and update the Usage: line.
More doc changes expected soon.
 1.12 22-Jan-2000  wiz it's -> its
 1.11 05-Jan-2000  oster - add '-v' (Verbose) option, which, most notably, provides
a spiffy lukemftp-inspired progress bar for parity re-writing,
reconstructs, copybacks, et al.

- make 'raidctl -P' wait until the parity has been updated before exiting
(it waited previously, but only because the parity re-write ioctl wouldn't
exit until the parity was successfully re-written)
 1.10 19-Nov-1999  kristerw Typos (from OpenBSD)
 1.9 10-Aug-1999  oster branches: 1.9.4;
Add two more options to raidctl:
-p check (and return) the status of the parity
-P check the status of the parity, and rebuild if necessary

Addresses PR#7494
 1.8 24-Mar-1999  mycroft Remove blank lines.
 1.7 06-Mar-1999  mycroft Fix minor formatting error.
 1.6 06-Mar-1999  mycroft Fix minor formatting error.
 1.5 02-Mar-1999  oster Update for recent changes: component labels, clean bits, adding hot
spares, and rebuilding components in-place. Re-arrange the
letters/options to make more sense (and make better use of the alphabet).
 1.4 18-Feb-1999  msaitoh fix typo
 1.3 04-Feb-1999  oster Add missing NetBSD RCS ID's! Thanks to SAITOH Masanobu (msaitoh@netbsd.org)
for pointing this out.
 1.2 10-Jan-1999  simonb Fix tpyo.
 1.1 13-Nov-1998  oster Oops. Forgot the man-page for 'raidctl' when the rest of 'raidctl' went in.
 1.9.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.17.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.19.2.3 30-Oct-2000  tv Pullup 1.22 [oster]:
- cleanup wording and add additional comments on such things as
"component1" and "raidctl -A yes"
- add a note about how to build a RAID set with a limited number of disks
(thanks to Simon Burge for suggestions)
- improve layout of 'raidctl -i' discussion (thanks to Hubert Feyrer)
- add a (small) section on Performance Tuning
 1.19.2.2 10-Aug-2000  oster Pullup of 1.20->1.21 (approved by thorpej)
Clarify a few things about parity. Add more documentation about RAID on RAID,
and root on RAID.
 1.19.2.1 05-Jul-2000  oster Add a .Sq for single quotes, instead of doing it by hand.
Fixes a formatting problem.

Approved by: thorpej
 1.29.2.1 09-Apr-2004  jmc Pullup patch (requested by oster in ticket #1555)

Add a couple little warnings about swapping to RAID 5 sets.
 1.38.2.2 23-May-2004  tron branches: 1.38.2.2.2;
Pull up revision 1.43 (requested by oster in ticket #378):
Update docs to reflect the support for the word "absent" in the "disks"
section of RAID config files.
 1.38.2.1 12-Apr-2004  grant Pull up revisions 1.39-1.40 (requested by oster in ticket #130):

Swapping to RAID 5 is happy now. Remove indications to the contrary.
 1.38.2.2.2.1 05-May-2005  riz Pull up revision 1.41-1.42, 1.44-1.46 (requested by fredb in ticket #1151):
Sync raidctl(8) with raid(4) regarding booting from RAID 1.
 1.50.8.2 06-Aug-2007  oster Talk a bit more about how the size of a RAID set is determined, and
of RF_PROTECTED_SECTORS. Requested by (and with comments from and
thanks to) Christoph (bad@).
 1.50.8.1 06-Aug-2007  oster file raidctl.8 was added on branch matt-mips64 on 2007-08-06 19:44:17 +0000
 1.50.4.1 27-Dec-2007  mjf Sync with HEAD.
 1.50.2.1 09-Jan-2008  matt sync with HEAD
 1.51.6.1 18-May-2008  yamt sync with head.
 1.51.4.2 28-Sep-2008  mjf Sync with HEAD.
 1.51.4.1 02-Jun-2008  mjf Sync with HEAD.
 1.52.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.56.8.1 21-Apr-2010  matt sync to netbsd-5
 1.56.2.2 20-Sep-2013  riz Pull up following revision(s) (requested by tron in ticket #1879):
sbin/raidctl/raidctl.8: revision 1.65
Note that NetBSD/amd64 can boot off RAID volumes.
 1.56.2.1 10-Dec-2009  snj branches: 1.56.2.1.2; 1.56.2.1.6;
Pull up following revision(s) (requested by tron in ticket #1187):
sbin/raidctl/raidctl.8: revisions 1.57-1.59 via patch
sbin/raidctl/raidctl.c: revision 1.42 via patch
sys/dev/raidframe/files.raidframe: revision 1.8 via patch
sys/dev/raidframe/rf_copyback.c: revision 1.42 via patch
sys/dev/raidframe/rf_disks.c: revision 1.72 via patch
sys/dev/raidframe/rf_driver.c: revision 1.122 via patch
sys/dev/raidframe/rf_engine.c: revision 1.40 via patch
sys/dev/raidframe/rf_kintf.h: revision 1.21 via patch
sys/dev/raidframe/rf_netbsdkintf.c: revision 1.269 via patch
sys/dev/raidframe/rf_paritymap.c: revisions 1.1-1.3 via patch
sys/dev/raidframe/rf_paritymap.h: revision 1.1 via patch
sys/dev/raidframe/rf_parityscan.c: revision 1.33 via patch
sys/dev/raidframe/rf_parityscan.h: revision 1.8 via patch
sys/dev/raidframe/rf_raid.h: revision 1.38 via patch
sys/dev/raidframe/rf_reconstruct.c: revision 1.108 via patch
sys/dev/raidframe/rf_states.c: revision 1.44 via patch
sys/dev/raidframe/raidframeio.h: revision 1.6 via patch
sys/dev/raidframe/raidframevar.h: revision 1.13 via patch
Pull up the RAIDframe parity map Summer Of Code project.
Drastically reduces the amount of time spent rewriting parity after an
unclean shutdown by keeping better track of which regions might have had
outstanding writes. Enabled by default; can be disabled on a per-set
basis, or tuned, with the new raidctl(8) commands.
 1.56.2.1.6.1 20-Sep-2013  riz Pull up following revision(s) (requested by tron in ticket #1879):
sbin/raidctl/raidctl.8: revision 1.65
Note that NetBSD/amd64 can boot off RAID volumes.
 1.56.2.1.2.1 20-Sep-2013  riz Pull up following revision(s) (requested by tron in ticket #1879):
sbin/raidctl/raidctl.8: revision 1.65
Note that NetBSD/amd64 can boot off RAID volumes.
 1.63.10.1 20-Sep-2013  riz Pull up following revision(s) (requested by tron in ticket #948):
sbin/raidctl/raidctl.8: revision 1.65
Note that NetBSD/amd64 can boot off RAID volumes.
 1.63.8.1 20-Sep-2013  riz Pull up following revision(s) (requested by tron in ticket #948):
sbin/raidctl/raidctl.8: revision 1.65
Note that NetBSD/amd64 can boot off RAID volumes.
 1.63.4.1 20-Sep-2013  riz Pull up following revision(s) (requested by tron in ticket #948):
sbin/raidctl/raidctl.8: revision 1.65
Note that NetBSD/amd64 can boot off RAID volumes.
 1.63.2.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.63.2.1 17-Apr-2012  yamt sync with head
 1.64.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.67.4.2 14-Jul-2017  martin Pull up following revision(s) (requested by christos in ticket #1457):
sbin/raidctl/raidctl.c: revision 1.64
sbin/raidctl/raidctl.8: revision 1.70
sys/dev/raidframe/rf_netbsdkintf.c: revision 1.341
sys/dev/raidframe/raidframeio.h: revision 1.7
Add a SET_LAST_UNIT ioctl.
Access to the SET_LAST_UNIT ioctl.
 1.67.4.1 05-Jul-2015  snj Pull up following revision(s) (requested by sborrill in ticket #863):
sbin/raidctl/raidctl.8: revisions 1.68, 1.69
Clarify that what was previously known as -A root is now -A forceroot, not
-A softroot and that -A root can still be used for historical reasons.
--
Bump date for previous. Add whitespace.
Fix some mandoc warnings.
 1.71.8.1 10-Sep-2018  martin Pull up following revision(s) (requested by nakayama in ticket #1019):

sbin/raidctl/rf_configure.h: revision 1.2
sbin/raidctl/rf_configure.c: revision 1.27
sbin/raidctl/rf_configure.c: revision 1.28
sbin/raidctl/rf_configure.c: revision 1.29
sbin/raidctl/raidctl.8: revision 1.73
sbin/raidctl/rf_configure.c: revision 1.30
sbin/raidctl/rf_configure.c: revision 1.31
sbin/raidctl/rf_configure.c: revision 1.32

support NAME=<wedge name> syntax for disks and spares

-

stop using magic constants
wrap long lines
use warn{,x}
make static
knf

-

White space and comment formatting. NFC.

-

With char bug[SIZE] using sizeof(bug[0]) is kind of boring, use
sizeof(bug) instead...

-

Avoid needless pointer calisthenics: &foo[0] -> foo

-

Several more cleanups:
1. Don't force use of "for" when "while" works better.
2. No need to check c != '\0' when we also check (c == ' ' || c == '\t')
3. Use the size of the buffer we're using, rather than a different one
(not really a concern, they're the same size)
4. Don't use fscanf() to read file data, use fgets() & sscanf().
5. After using a pointer as a char *, validate alignment before switching
to int * (can only fail if kernel #define gets set stupidly) Or #6...
6. Validate sparemap file name isn't too long for assigned space.
7. recognise that strlen() returns size_t - don't shove it into an int.
8. On out of mem, be more clear which allocation failed in warning msg.

ATF tests all pass. But I don't think they use sparemap files.
 1.74.10.1 31-May-2021  cjep sync with head
 1.79.2.2 28-Apr-2024  martin Pull up following revision(s) (requested by oster in ticket #675):

sbin/raidctl/raidctl.8: revision 1.81
sbin/raidctl/raidctl.c: revision 1.80

Implement command-line configuration of simple RAID sets with raidctl
based on the usage pattern:

raidctl <device> create <level> <component1> <component2> ...

For example,

raidctl raid0 create mirror absent /dev/wd1e

will create a RAID level 1 (mirror) set with an absent first component
and /dev/wd1e as the second component. The resulting RAID device will
be marked as auto-configurable, will have a serial number set (based
on the current time), and parity will be initialized. Reasonable
performance values are automatically used by default for other parameters
normally specified in the configuration file.

Also: Only print out Autoconfig status if being verbose.
 1.79.2.1 28-Apr-2024  martin Pull up following revision(s) (requested by oster in ticket #674):

sys/dev/raidframe/rf_raid.h: revision 1.52
sbin/raidctl/raidctl.8: revision 1.80
sys/dev/raidframe/rf_driver.c: revision 1.141
sys/dev/raidframe/rf_disks.c: revision 1.94
sys/dev/raidframe/rf_diskqueue.c: revision 1.64
sys/dev/raidframe/rf_diskqueue.h: revision 1.30
sys/dev/raidframe/rf_disks.h: revision 1.15
sys/dev/raidframe/rf_netbsdkintf.c: revision 1.414
sys/dev/raidframe/rf_reconstruct.c: revision 1.129
sys/dev/raidframe/raidframeio.h: revision 1.12
sbin/raidctl/raidctl.c: revision 1.79

Implement hot removal of spares and components. From manu@.

Implement a long desired feature of automatically incorporating
a used spare into the array after a reconstruct.

Given the configuration:

Components:
/dev/wd0e: failed
/dev/wd1e: optimal
/dev/wd2e: optimal
Spares:
/dev/wd3e: spare

Running 'raidctl -F /dev/wd0e raid0' will now result in the
following configuration after a successful rebuild:

Components:
/dev/wd3e: optimal
/dev/wd1e: optimal
/dev/wd2e: optimal
No spares.

Thanks to manu@ for the development of the initial set of changes
which allowed the changes to automatically incorporate a used spare
to come to fruition. Thanks also to manu@ for useful discussions
about and additional testing of these changes.
 1.86 05-Nov-2024  rillig raidctl: fix <ctype.h> usage, remove redundant break statements
 1.85 05-Nov-2024  rillig raidctl: trim trailing whitespace
 1.84 05-Nov-2024  rillig raidctl: remove unused and undocumented option '-B'
 1.83 10-Feb-2024  andvar branches: 1.83.2;
fix various typos in comments and log messages.
 1.82 25-Sep-2023  oster We no longer need the deprecated copyback functionality now that
incorporating a used spare is automatic.

Copyback has always been an issue, as to do a copyback all IO to
the array had to be suspended, and so was very, very unlikely to
have been used in anything resembling a production system.
 1.81 21-Sep-2023  oster Remove a couple of unneeded comments.
 1.80 21-Sep-2023  oster Implement command-line configuration of simple RAID sets with raidctl
based on the usage pattern:

raidctl <device> create <level> <component1> <component2> ...

For example,

raidctl raid0 create mirror absent /dev/wd1e

will create a RAID level 1 (mirror) set with an absent first component
and /dev/wd1e as the second component. The resulting RAID device will
be marked as auto-configurable, will have a serial number set (based
on the current time), and parity will be initialized. Reasonable
performance values are automatically used by default for other parameters
normally specified in the configuration file.

Also: Only print out Autoconfig status if being verbose.
 1.79 17-Sep-2023  oster Implement hot removal of spares and components. From manu@.

Implement a long desired feature of automatically incorporating
a used spare into the array after a reconstruct.

Given the configuration:
Components:
/dev/wd0e: failed
/dev/wd1e: optimal
/dev/wd2e: optimal
Spares:
/dev/wd3e: spare

Running 'raidctl -F /dev/wd0e raid0' will now result in the
following configuration after a successful rebuild:
Components:
/dev/wd3e: optimal
/dev/wd1e: optimal
/dev/wd2e: optimal
No spares.

Thanks to manu@ for the development of the initial set of changes
which allowed the changes to automatically incorporate a used spare
to come to fruition. Thanks also to manu@ for useful discussions
about and additional testing of these changes.
 1.78 14-Jun-2022  kre branches: 1.78.2;
Implement "raidctl -t config-file"

This does the same config file parse that -c/-C do, but only
that (hence no raidframe device is needed, or accepted).

Any syntax errors in the config file will be reported, nothing
else happens.
 1.77 14-Jun-2022  kre In the previous (and some earlier) version(s) of raidctl.c
the following comment appeared:

/*
* After NetBSD 9, convert this to not output the numRow's value,
* which is no longer required or ever used.
*/

We are after NetBSD 9 (well after). The change requested in that
comment is made here, and the comment is thus removed.

A couple of places in rf_configure.c where a value for the "rows"
parameter was output in an error message (always simply as the
constant 0) have also been updated (those messages will no longer
include "row 0", which they always said previously). One of them
was also slightly reworded to be clearer what problem it was
experiencing (when it said 'unable to get device file' it meant
it was unable to locate the name for the device in the config file,
not that it was found, and there was some other problem with it).
 1.76 14-Jun-2022  kre Reorder the getopts() switch () (slightly) to sort the options. NFCI.
 1.75 14-Jun-2022  kre KNF (whitespace & 80 column limits) - NFCI.

This is the first of a series of 5 commits in this
directory, all coming within minutes or now.
 1.74 02-Aug-2021  oster Support on-demand re-scanning all devices to look for
autoconfig RAID sets. raidctl now supports looking
for autoconfig RAID sets with a new '-L' flag.
 1.73 01-Aug-2021  oster Move case 'l' to be in sorted order. No functional change.
 1.72 13-Sep-2020  mlelstv Allow components to be specified by wedge name.
 1.71 26-Sep-2019  mlelstv Need MIN in userland. Also some more signed/unsigned clashes.
 1.70 26-Sep-2019  mlelstv nspares is now unsigned. Validate and use as positive integer.
 1.69 06-Feb-2019  oster Correct printed IOCTL name that was incorrect since rev 1.5.
 1.68 04-Feb-2019  mrg - add the string length as an explicit parameter to get_time_string()
- remove casts when the same type is used on both sides
- expand hours_buffer[] to fit the range of hours in an 'int'
- add a work around for the sprintf() truncation checker that fails
to detect that 'minutes' and 'seconds' have a small range
 1.67 24-Mar-2018  nakayama branches: 1.67.2;
Follow the ioctl arg changes of RAIDFRAME_GET_COMPONENT_LABEL and
RAIDFRAME_CHECK_*_STATUS_EXT.

This should fix strange raidctl -s outputs reported in
current-users ML.
 1.66 18-Jan-2018  mrg branches: 1.66.2;
implement 32-bit compat support for raidframe.

convert several raidframe ioctls to be bitsize idempotent so that
they work the same in 32 and 64 bit worlds, allowing netbsd32 to
configure and query raid properly. remove useless 'row' in a few
places. add COMPAT_80 and put the old ioctls there.

raidframeio.h:
RAIDFRAME_TEST_ACC
- remove, unused
RAIDFRAME_GET_COMPONENT_LABEL
- convert to label not pointer to label
RAIDFRAME_CHECK_RECON_STATUS_EXT
RAIDFRAME_CHECK_PARITYREWRITE_STATUS_EXT
RAIDFRAME_CHECK_COPYBACK_STATUS_EXT
- convert to progress info not pointer to info
RAIDFRAME_GET_INFO
- version entirely.
raidframevar.h:
- rf_recon_req{} has row, flags and raidPtr removed (they're
not a useful part of this interface.)
- RF_Config_s{} and RF_DeviceConfig_s{} have numRow/rows removed.
- RF_RaidDisk_s{} is re-ordered slightly to fix alignment
padding - the actual data was already OK.
- InstallSpareTable() loses row argument

rf_compat32.c has code for RF_Config_s{} in 32 bit mode, used
by RAIDFRAME_CONFIGURE and RAIDFRAME_GET_INFO32.

rf_compat80.c has code for rf_recon_req{}, RF_RaidDisk_s{} and
RF_DeviceConfig_s{} to handle RAIDFRAME_FAIL_DISK,
RAIDFRAME_GET_COMPONENT_LABEL, RAIDFRAME_CHECK_RECON_STATUS_EXT,
RAIDFRAME_CHECK_PARITYREWRITE_STATUS_EXT,
RAIDFRAME_CHECK_COPYBACK_STATUS_EXT, RAIDFRAME_GET_INFO.

move several of the per-ioctl code blocks into separate functions.

add rf_recon_req_internal{} to replace old usage of global
rf_recon_req{} that had unused void * in the structure, ruining
it's 32/64 bit ABI.

add missing case for RAIDFRAME_GET_INFO50.

adjust raid tests to use the new .conf format, and add a case to
test the old method as well.

raidctl:
deal with lack of 'row' members in a couple of places.
fail request no longer takes row.
handle "START array" sections with just "numCol numSpare", ie
no "numRow" specified. for now, generate old-style configuration
but update raidctl.8 to specify the new style (keeping reference
to the old style.)

note that: RF_ComponentLabel_s::{row,num_rows} and
RF_SingleComponent_s::row are obsolete but not removed yet.
 1.65 06-Jan-2016  wiz Use standard sort order for options.

Add -U to usage.
 1.64 06-Jan-2016  christos Access to the SET_LAST_UNIT ioctl.
 1.63 08-Sep-2015  bad Rename argument of rf_output_devname() from devname to name to avoid a
warning about shadowing a global symbol when compiled by buildrump.sh.
Discussed with mrg.
 1.62 21-Jul-2015  mrg convert "component*" into "absent" for "START disks" part of the
output from "raidctl -G". now this actually works when fed back
into raidctl -[cC].
 1.61 30-Jun-2015  sborrill Compare correct length string for force option to -A
 1.60 26-Jun-2015  pooka &stars[offset] -> stars+offset. It's shorter!

Coincidentally, the change also works around a gcc 5.1 bug which causes
a segmentation fault when trying to compile the longer version (guess
the compiler got exhausted, or something).
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66345
 1.59 27-May-2015  christos use strtou
 1.58 27-May-2015  manu Better sanity check numbers given to raidctl(8)

Replace atoi(3) by strtol(3), and check that numbers are valid,
positive, and in int32_t range. The previous lack of check could
silently lead to the same serial being set to all RAID volumes
for instance because given numbers were bigger than INT_MAX. The
consequence is in an awful mess when RAIDframe would mix volumes...
 1.57 03-Apr-2014  christos branches: 1.57.4;
Add the ability to "softroot" mount (i.e. mount root only when the raid
set contains the boot device), as opposed to "hardroot" (the previous
default which forces the raid to be root no matter what).
 1.56 19-Oct-2013  christos fix unused variable warnings.
 1.55 12-Oct-2011  christos branches: 1.55.2; 1.55.4; 1.55.8;
PR/45456: Tetsuya Isaki: Don't mix stdio and write.
 1.54 28-Sep-2011  mrg print the serial number as an unsigned number.
 1.53 29-Aug-2011  joerg Use __dead
 1.52 19-Feb-2011  enami Define accessors for number of blocks and partition size in the
component label and use them where appropriate. Disscussed on tech-kern.
 1.51 09-Feb-2011  pooka Exterminate a bug I created in 2009.
 1.50 15-Dec-2010  pooka branches: 1.50.2;
Use RUMPPRG.

ok Greg Oster
 1.49 08-Nov-2010  pooka Update RUMP_ACTION to use rumpclient.

The server must of course have some disks configured. Let's say
we have this simple server with disks as a few sparse host files:

main()
{
rump_init();
rump_pub_etfs_register("/disk1", "./disk1.img", RUMP_ETFS_BLK);
rump_pub_etfs_register("/disk2", "./disk2.img", RUMP_ETFS_BLK);
rump_pub_etfs_register("/disk3", "./disk3.img", RUMP_ETFS_BLK);
rump_pub_etfs_register("/disk4", "./disk4.img", RUMP_ETFS_BLK);
pause();
}

And we run the server:

mainbus0 (root)
Kernelized RAIDframe activated
/disk1: hostpath ./disk1.img (97 GB)
/disk2: hostpath ./disk2.img (97 GB)
/disk3: hostpath ./disk3.img (97 GB)
/disk4: hostpath ./disk4.img (97 GB)

We can then configure the raid against the server:

> ./raidctl -c theraid.conf raid0

And lo, we have evidence of a level1 raid in the server dmesg:

raid0: RAID Level 1
raid0: Components: /disk1 /disk2 /disk3 /disk4
raid0: Total Sectors: 409599744 (199999 MB)

yea, i initialized it already in a previous run:

> ./raidctl -S raid0
Reconstruction is 100% complete.
Parity Re-write is 100% complete.
Copyback is 100% complete.
 1.48 16-Mar-2010  jld Give a more polite message for `raidctl -m` on a non-parity RAID set.
 1.47 13-Mar-2010  plunky fix sign-compare issue
 1.46 13-Mar-2010  jld Exclude parity map regions that don't actually exist from the dirty region count
in `raidctl -m`. Makes for less confusing output during `raidctl -i`.
 1.45 27-Jan-2010  christos use warn/err appropriately.
 1.44 27-Jan-2010  pooka error message: \n\n -> \n
 1.43 10-Dec-2009  jld Slight change to the wording of the parity map info: the parity is
"marked clean" after however much inactivity; it is *actually* clean
as soon as the component disks all do their thing (on the order of ms,
usually), just the same as before.

The bikeshed is now less of a taupe and more of an ecru.
 1.42 17-Nov-2009  jld Finally commit the RAIDframe parity map Summer Of Code project.

Drastically reduces the amount of time spent rewriting parity after an
unclean shutdown by keeping better track of which regions might have had
outstanding writes. Enabled by default; can be disabled on a per-set
basis, or tuned, with the new raidctl(8) commands.

Discussed on tech-kern@ to a general air of approval; exhortations to
commit from mrg@, christos@, and others.

Thanks to Google for their sponsorship, oster@ for mentoring the
project, assorted developers for trying very hard to break it, and
probably more I'm forgetting.
 1.41 11-Oct-2009  pooka Support RUMP_ACTION, i.e. compile-time switch to make this execute
rump syscalls to configure raidframe in a rump kernel.
 1.40 26-Jan-2009  tron Use correct format to print the "numBlocks" element in a RAIDframe
component label. raidctl(8) should now print the correct number of
blocks for RAID sets larger than 1TB.

Patch supplied by Bernhard Moellemann in PR bin/40479.
 1.39 28-Apr-2008  martin branches: 1.39.4;
Remove clause 3 and 4 from TNF licenses
 1.38 02-Jun-2005  lukem branches: 1.38.4; 1.38.16; 1.38.20; 1.38.22;
appease gcc -Wuninitialized
 1.37 01-May-2005  oster Cleanup the meter code a bit -- a bunch of stuff wasn't even being used.
Fix a few overflow issues. (Thanks to beefy and pooka, among others)
 1.36 09-Feb-2005  xtraeme branches: 1.36.2;
Kill __P(), use ANSI function declarations; WARNS=3.
 1.35 29-Feb-2004  oster As suggested by Paul Ripke, have raidctl use raw devices by default.
 1.34 21-Oct-2003  fvdl Don't compare argc to NULL.
 1.33 23-Jun-2003  agc Add NetBSD RCS Ids.
 1.32 15-Apr-2003  itojun correct questionable use of strncpy().
 1.31 16-Nov-2002  oster Cleanup and update usage().
 1.30 21-Mar-2002  simonb Open the raid device read-only for the commands that don't need
write access. With the default set up this allows users in group
operator to query the status of the raid devices.

Fixes PR admin/15840.
 1.29 04-Oct-2001  oster rf_configure.c
- remove dependence on stuff in sys/dev/raidframe
- now rely on <dev/raidframe/*>
- bring in some needed prototypes for local functions
- nuke RF_ASSERT's.
- drag in some needed RF_ERRORMSG's

raidctl.c
- rely on <dev/raidframe/*>
- welcome to the New Way of doing RAIDframe #includes.

(No functional changes.)
 1.28 26-Sep-2001  oster Since this is the only place it's used, nuke RF_DEV2RAIDID and
replace it with DISKUNIT.
 1.27 10-Jul-2001  lukem * add -G, which lists the configuration of the given raid set in the
same configuration format that -c and -C use.
this is useful if you're using autoconfig and you've misplaced the
/etc/raidXXX.conf files
* "filesystem" -> "file system", and other man page cleanups.
 1.26 19-Feb-2001  cgd convert to use getprogname()
 1.25 31-Oct-2000  lukem - use opendisk(3) instead of homegrown solution
- separate items in -s output with commas; much easier to read
- add maxOutstanding (aka queue len) to -s output
- sort #includes (per knf)
 1.24 19-Aug-2000  oster It is impolite to poll in a tight loop. (Thanks to Christos for noting
the problem.)
 1.23 03-Jun-2000  oster branches: 1.23.2;
In certain cases (e.g. where it makes sense) read/display the
component label for spare disks too.
 1.22 31-May-2000  oster Make sure we handle the 'no progress' case properly.
Thanks to Manuel Bouyer for noting the problem (and supplying a patch!).
 1.21 28-May-2000  oster Obtaining component labels from spares is not supported yet, but add
some code that makes some progress in that direction.
 1.20 28-May-2000  oster Cleanup ETA calculation stuff.
 1.19 28-May-2000  oster Have raidctl use the fine-grained progress info. ETA calculation stuff
needs to be cleaned up.
 1.18 23-May-2000  thorpej branches: 1.18.2;
Build with WARNS=2.
 1.17 23-May-2000  thorpej ioctl(2) commands are u_long, so do_meter() must take the same.
 1.16 14-Apr-2000  simonb Don't declare 'extern opt*' getopt variables.
 1.15 23-Mar-2000  oster When displaying component labels, indicate whether or not the set is
marked as being the one that should be used for the root partition.
 1.14 25-Feb-2000  oster Reorganize a few things. Make the general status ('-s') a bit more verbose
by including component labels, and less verbose by removing some other stuff.
 1.13 24-Feb-2000  oster Document the new autoconfiguration switches, and update the Usage: line.
More doc changes expected soon.
 1.12 13-Feb-2000  oster - support for autoconfig setup and / on RAID setup
- new parts are still work-in-progress (no docs yet either)
 1.11 09-Jan-2000  oster Nuke a debugging printf that I forgot to remove before last commit.
 1.10 05-Jan-2000  oster - add '-v' (Verbose) option, which, most notably, provides
a spiffy lukemftp-inspired progress bar for parity re-writing,
reconstructs, copybacks, et al.

- make 'raidctl -P' wait until the parity has been updated before exiting
(it waited previously, but only because the parity re-write ioctl wouldn't
exit until the parity was successfully re-written)
 1.9 15-Aug-1999  oster rf_MakeConfig succeeds only if it returns 0, not if it returns
values 0 or greater.
 1.8 15-Aug-1999  oster Display the parity status as part of the status ('-s') display.
 1.7 10-Aug-1999  oster Add two more options to raidctl:
-p check (and return) the status of the parity
-P check the status of the parity, and rebuild if necessary

Addresses PR#7494
 1.6 02-Mar-1999  oster Update for recent changes: component labels, clean bits, adding hot
spares, and rebuilding components in-place. Re-arrange the
letters/options to make more sense (and make better use of the alphabet).
 1.5 24-Feb-1999  oster Clean things up a bit. Teach raidctl a little about component labels
and hot-adding of spares. New code is there, but not enabled (yet).
 1.4 04-Feb-1999  oster Add missing NetBSD RCS ID's! Thanks to SAITOH Masanobu (msaitoh@netbsd.org)
for pointing this out.
 1.3 26-Jan-1999  oster Take care of a few minor things due to the major RAIDframe cleanup.

Again, no functionality changes.
 1.2 12-Jan-1999  mjacob recover from errno.h changes
 1.1 13-Nov-1998  oster RAIDframe, version 1.1, from the Parallel Data Laboratory at
Carnegie Mellon University. Full RAID implementation, including
levels 0, 1, 4, 5, 6, parity logging, and a few other goodies.
Ported to NetBSD by Greg Oster.

raidctl is our userland configuration tool for RAIDframe.
 1.18.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.23.2.1 19-Aug-2000  oster Pullup 1.23->1.24. Approved by thorpej.
It is impolite to poll in a tight loop. (Thanks to Christos for noting
the problem.)
 1.36.2.2 31-Jan-2009  bouyer Pull up following revision(s) (requested by tron in ticket #1989):
sbin/raidctl/raidctl.c: revision 1.40
Use correct format to print the "numBlocks" element in a RAIDframe
component label. raidctl(8) should now print the correct number of
blocks for RAID sets larger than 1TB.
Patch supplied by Bernhard Moellemann in PR bin/40479.
 1.36.2.1 28-May-2005  tron branches: 1.36.2.1.2; 1.36.2.1.4;
Pull up revision 1.37 (requested by oster in ticket #347):
Cleanup the meter code a bit -- a bunch of stuff wasn't even being used.
Fix a few overflow issues. (Thanks to beefy and pooka, among others)
 1.36.2.1.4.1 31-Jan-2009  bouyer Pull up following revision(s) (requested by tron in ticket #1989):
sbin/raidctl/raidctl.c: revision 1.40
Use correct format to print the "numBlocks" element in a RAIDframe
component label. raidctl(8) should now print the correct number of
blocks for RAID sets larger than 1TB.
Patch supplied by Bernhard Moellemann in PR bin/40479.
 1.36.2.1.2.1 31-Jan-2009  bouyer Pull up following revision(s) (requested by tron in ticket #1989):
sbin/raidctl/raidctl.c: revision 1.40
Use correct format to print the "numBlocks" element in a RAIDframe
component label. raidctl(8) should now print the correct number of
blocks for RAID sets larger than 1TB.
Patch supplied by Bernhard Moellemann in PR bin/40479.
 1.38.22.1 18-May-2008  yamt sync with head.
 1.38.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.38.16.1 31-Jan-2009  bouyer Pull up following revision(s) (requested by tron in ticket #1270):
sbin/raidctl/raidctl.c: revision 1.40
Use correct format to print the "numBlocks" element in a RAIDframe
component label. raidctl(8) should now print the correct number of
blocks for RAID sets larger than 1TB.
Patch supplied by Bernhard Moellemann in PR bin/40479.
 1.38.4.1 31-Jan-2009  bouyer Pull up following revision(s) (requested by tron in ticket #1270):
sbin/raidctl/raidctl.c: revision 1.40
Use correct format to print the "numBlocks" element in a RAIDframe
component label. raidctl(8) should now print the correct number of
blocks for RAID sets larger than 1TB.
Patch supplied by Bernhard Moellemann in PR bin/40479.
 1.39.4.4 13-Jun-2012  sborrill Pull up the following revisions(s) (requested by mrg in ticket #1774):
sbin/raidctl/raidctl.c: revision 1.52
sys/dev/raidframe/raidframevar.h: revision 1.15
sys/dev/raidframe/rf_copyback.c: revision 1.45
sys/dev/raidframe/rf_disks.c: revision 1.78
sys/dev/raidframe/rf_netbsdkintf.c: revision 1.282,1.284
sys/dev/raidframe/rf_reconstruct.c: revision 1.111

Fix garbage values in partitionSizeHi with RAID array > 2TB. Stops the check against
rf_component_label_partitionsize() failing and stopping auto-configure.
 1.39.4.3 11-Dec-2009  sborrill Pull up the following revisions(s) (requested by tron in ticket #1191):
sbin/raidctl/raidctl.c: revision 1.43

Slight change to the wording of the parity map info: the parity is
"marked clean" after however much inactivity; it is *actually* clean
as soon as the component disks all do their thing (on the order of ms,
usually), just the same as before.
 1.39.4.2 10-Dec-2009  snj Pull up following revision(s) (requested by tron in ticket #1187):
sbin/raidctl/raidctl.8: revisions 1.57-1.59 via patch
sbin/raidctl/raidctl.c: revision 1.42 via patch
sys/dev/raidframe/files.raidframe: revision 1.8 via patch
sys/dev/raidframe/rf_copyback.c: revision 1.42 via patch
sys/dev/raidframe/rf_disks.c: revision 1.72 via patch
sys/dev/raidframe/rf_driver.c: revision 1.122 via patch
sys/dev/raidframe/rf_engine.c: revision 1.40 via patch
sys/dev/raidframe/rf_kintf.h: revision 1.21 via patch
sys/dev/raidframe/rf_netbsdkintf.c: revision 1.269 via patch
sys/dev/raidframe/rf_paritymap.c: revisions 1.1-1.3 via patch
sys/dev/raidframe/rf_paritymap.h: revision 1.1 via patch
sys/dev/raidframe/rf_parityscan.c: revision 1.33 via patch
sys/dev/raidframe/rf_parityscan.h: revision 1.8 via patch
sys/dev/raidframe/rf_raid.h: revision 1.38 via patch
sys/dev/raidframe/rf_reconstruct.c: revision 1.108 via patch
sys/dev/raidframe/rf_states.c: revision 1.44 via patch
sys/dev/raidframe/raidframeio.h: revision 1.6 via patch
sys/dev/raidframe/raidframevar.h: revision 1.13 via patch
Pull up the RAIDframe parity map Summer Of Code project.
Drastically reduces the amount of time spent rewriting parity after an
unclean shutdown by keeping better track of which regions might have had
outstanding writes. Enabled by default; can be disabled on a per-set
basis, or tuned, with the new raidctl(8) commands.
 1.39.4.1 01-Feb-2009  snj branches: 1.39.4.1.4;
Pull up following revision(s) (requested by tron in ticket #323):
sbin/raidctl/raidctl.c: revision 1.40
Use correct format to print the "numBlocks" element in a RAIDframe
component label. raidctl(8) should now print the correct number of
blocks for RAID sets larger than 1TB.
Patch supplied by Bernhard Moellemann in PR bin/40479.
 1.39.4.1.4.1 21-Apr-2010  matt sync to netbsd-5
 1.50.2.2 05-Mar-2011  bouyer Sync with HEAD
 1.50.2.1 17-Feb-2011  bouyer Sync with HEAD
 1.55.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.55.4.1 15-Nov-2015  bouyer Pull up following revision(s) (requested by manu in ticket #1304):
sbin/raidctl/raidctl.c: revision 1.58
Better sanity check numbers given to raidctl(8)
Replace atoi(3) by strtol(3), and check that numbers are valid,
positive, and in int32_t range. The previous lack of check could
silently lead to the same serial being set to all RAID volumes
for instance because given numbers were bigger than INT_MAX. The
consequence is in an awful mess when RAIDframe would mix volumes...
 1.55.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.57.4.4 14-Jul-2017  martin Pull up following revision(s) (requested by christos in ticket #1457):
sbin/raidctl/raidctl.c: revision 1.64
sbin/raidctl/raidctl.8: revision 1.70
sys/dev/raidframe/rf_netbsdkintf.c: revision 1.341
sys/dev/raidframe/raidframeio.h: revision 1.7
Add a SET_LAST_UNIT ioctl.
Access to the SET_LAST_UNIT ioctl.
 1.57.4.3 05-Jul-2015  snj Pull up following revision(s) (requested by sborrill in ticket #862):
sbin/raidctl/raidctl.c: revision 1.61
Compare correct length string for force option to -A
 1.57.4.2 09-Jun-2015  snj Pull up following revision(s) (requested by martin in ticket #827):
sbin/raidctl/raidctl.c: revision 1.59
use strtou
 1.57.4.1 08-Jun-2015  snj Pull up following revision(s) (requested by manu in ticket #827):
sbin/raidctl/raidctl.c: revision 1.58
Better sanity check numbers given to raidctl(8)
Replace atoi(3) by strtol(3), and check that numbers are valid,
positive, and in int32_t range. The previous lack of check could
silently lead to the same serial being set to all RAID volumes
for instance because given numbers were bigger than INT_MAX. The
consequence is in an awful mess when RAIDframe would mix volumes...
 1.66.2.1 30-Mar-2018  pgoyette Resolve conflicts between branch and HEAD
 1.67.2.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.67.2.1 10-Jun-2019  christos Sync with HEAD
 1.78.2.2 28-Apr-2024  martin Pull up following revision(s) (requested by oster in ticket #675):

sbin/raidctl/raidctl.8: revision 1.81
sbin/raidctl/raidctl.c: revision 1.80

Implement command-line configuration of simple RAID sets with raidctl
based on the usage pattern:

raidctl <device> create <level> <component1> <component2> ...

For example,

raidctl raid0 create mirror absent /dev/wd1e

will create a RAID level 1 (mirror) set with an absent first component
and /dev/wd1e as the second component. The resulting RAID device will
be marked as auto-configurable, will have a serial number set (based
on the current time), and parity will be initialized. Reasonable
performance values are automatically used by default for other parameters
normally specified in the configuration file.

Also: Only print out Autoconfig status if being verbose.
 1.78.2.1 28-Apr-2024  martin Pull up following revision(s) (requested by oster in ticket #674):

sys/dev/raidframe/rf_raid.h: revision 1.52
sbin/raidctl/raidctl.8: revision 1.80
sys/dev/raidframe/rf_driver.c: revision 1.141
sys/dev/raidframe/rf_disks.c: revision 1.94
sys/dev/raidframe/rf_diskqueue.c: revision 1.64
sys/dev/raidframe/rf_diskqueue.h: revision 1.30
sys/dev/raidframe/rf_disks.h: revision 1.15
sys/dev/raidframe/rf_netbsdkintf.c: revision 1.414
sys/dev/raidframe/rf_reconstruct.c: revision 1.129
sys/dev/raidframe/raidframeio.h: revision 1.12
sbin/raidctl/raidctl.c: revision 1.79

Implement hot removal of spares and components. From manu@.

Implement a long desired feature of automatically incorporating
a used spare into the array after a reconstruct.

Given the configuration:

Components:
/dev/wd0e: failed
/dev/wd1e: optimal
/dev/wd2e: optimal
Spares:
/dev/wd3e: spare

Running 'raidctl -F /dev/wd0e raid0' will now result in the
following configuration after a successful rebuild:

Components:
/dev/wd3e: optimal
/dev/wd1e: optimal
/dev/wd2e: optimal
No spares.

Thanks to manu@ for the development of the initial set of changes
which allowed the changes to automatically incorporate a used spare
to come to fruition. Thanks also to manu@ for useful discussions
about and additional testing of these changes.
 1.83.2.1 02-Aug-2025  perseant Sync with HEAD
 1.3 10-Jan-2017  christos need <sys/stat.h> for fstat()
 1.2 09-Feb-2011  pooka branches: 1.2.26;
Exterminate a bug I created in 2009.
 1.1 15-Dec-2010  pooka branches: 1.1.2;
Use RUMPPRG.

ok Greg Oster
 1.1.2.1 17-Feb-2011  bouyer Sync with HEAD
 1.2.26.1 20-Mar-2017  pgoyette Sync with HEAD
 1.2 09-Feb-2011  pooka Exterminate a bug I created in 2009.
 1.1 15-Dec-2010  pooka branches: 1.1.2;
Use RUMPPRG.

ok Greg Oster
 1.1.2.1 17-Feb-2011  bouyer Sync with HEAD
 1.37 21-Jul-2022  kre PR bin/56917

If getfsspecname() fails that will usually mean that a NAME=wedge or
ROOT.x partition is unabailable. raidframe specified unavailable
partitions as "absent" so in this case, pass "absent" rather than the
unaltered NAME= or ROOT.x string, which the kernel has no clue what
do do with, and doesn't configure the raid at all.
 1.36 14-Jun-2022  kre Fix some config file parsing.

First, and what got me started on this set of cleanups, the queue
length in the "queue" section (START queue) is limited to what will
fit in a char without losing accuracy (I tried setting it to 200,
rather than the more common (universal?) 100 and found that the
value configured into the array was -56 instead.

Why the value needs to be passed through a char variable I have no
idea (it is an int in the filesystem raidframe headers) - but that's
the way it is done, and changing it would be an ABI change I believe
(and so need versioning to alter) and that isn't worth it for this
(or not now, IMO).

Instead check that the value in the char is the same value as was
read from the config file, and complain if not. Those of you with
unsigned chars will be able to have queue lengths up to 255, the
rest of us are limited to 127.

While looking at that, I noticed some code that obviously fails to
understand that scanf("%s") will never return a string containing
spaces, and proceeded to attempt to remove trailing spaces from the
result ... amusingly, after having used the result for its intended
purpose (non existent trailing spaces unremoved), after which that
buffer was never used again. That code is now gone (but for now,
just #if 0'd rather than actually deleted - it should be cleaned up
sometime).

Then I saw some other issues with how the config was parsed - a
simple (unbounded) scanf("%s") into a buffer, which hypothetically
might not be large enough (not a security issue really, raidctl has
no special privs, and it isn't likely that root could easily be
tricked into running it on a bogus config file - or not without
looking first anyway, and a huge long string would rather stand
out). Bound the string length to something reasonable, and
assert() that the buffer is big enough to contain it.

Lastly, in the event of one particular detected error in the
config file, the code would write a warning, but then just go
ahead and use the bad data (or nothing perhaps) anyway - a
failure of logic flow (unlikely to have ever happened, everyone
seems to simply copy the sample config from the man page, and
make minor adjustments as needed).

If any of these changes make any difference to anyone (except
me with my attempt to make longer queues - for no particularly
well thought out reason), I'd be very surprised.
 1.35 14-Jun-2022  kre In the previous (and some earlier) version(s) of raidctl.c
the following comment appeared:

/*
* After NetBSD 9, convert this to not output the numRow's value,
* which is no longer required or ever used.
*/

We are after NetBSD 9 (well after). The change requested in that
comment is made here, and the comment is thus removed.

A couple of places in rf_configure.c where a value for the "rows"
parameter was output in an error message (always simply as the
constant 0) have also been updated (those messages will no longer
include "row 0", which they always said previously). One of them
was also slightly reworded to be clearer what problem it was
experiencing (when it said 'unable to get device file' it meant
it was unable to locate the name for the device in the config file,
not that it was found, and there was some other problem with it).
 1.34 06-Sep-2020  mrg avoid trying to printf() a NULL as %s. fixes likely bug.
 1.33 18-Jan-2018  mrg implement 32-bit compat support for raidframe.

convert several raidframe ioctls to be bitsize idempotent so that
they work the same in 32 and 64 bit worlds, allowing netbsd32 to
configure and query raid properly. remove useless 'row' in a few
places. add COMPAT_80 and put the old ioctls there.

raidframeio.h:
RAIDFRAME_TEST_ACC
- remove, unused
RAIDFRAME_GET_COMPONENT_LABEL
- convert to label not pointer to label
RAIDFRAME_CHECK_RECON_STATUS_EXT
RAIDFRAME_CHECK_PARITYREWRITE_STATUS_EXT
RAIDFRAME_CHECK_COPYBACK_STATUS_EXT
- convert to progress info not pointer to info
RAIDFRAME_GET_INFO
- version entirely.
raidframevar.h:
- rf_recon_req{} has row, flags and raidPtr removed (they're
not a useful part of this interface.)
- RF_Config_s{} and RF_DeviceConfig_s{} have numRow/rows removed.
- RF_RaidDisk_s{} is re-ordered slightly to fix alignment
padding - the actual data was already OK.
- InstallSpareTable() loses row argument

rf_compat32.c has code for RF_Config_s{} in 32 bit mode, used
by RAIDFRAME_CONFIGURE and RAIDFRAME_GET_INFO32.

rf_compat80.c has code for rf_recon_req{}, RF_RaidDisk_s{} and
RF_DeviceConfig_s{} to handle RAIDFRAME_FAIL_DISK,
RAIDFRAME_GET_COMPONENT_LABEL, RAIDFRAME_CHECK_RECON_STATUS_EXT,
RAIDFRAME_CHECK_PARITYREWRITE_STATUS_EXT,
RAIDFRAME_CHECK_COPYBACK_STATUS_EXT, RAIDFRAME_GET_INFO.

move several of the per-ioctl code blocks into separate functions.

add rf_recon_req_internal{} to replace old usage of global
rf_recon_req{} that had unused void * in the structure, ruining
it's 32/64 bit ABI.

add missing case for RAIDFRAME_GET_INFO50.

adjust raid tests to use the new .conf format, and add a case to
test the old method as well.

raidctl:
deal with lack of 'row' members in a couple of places.
fail request no longer takes row.
handle "START array" sections with just "numCol numSpare", ie
no "numRow" specified. for now, generate old-style configuration
but update raidctl.8 to specify the new style (keeping reference
to the old style.)

note that: RF_ComponentLabel_s::{row,num_rows} and
RF_SingleComponent_s::row are obsolete but not removed yet.
 1.32 22-Nov-2017  kre Several more cleanups:
1. Don't force use of "for" when "while" works better.
2. No need to check c != '\0' when we also check (c == ' ' || c == '\t')
3. Use the size of the buffer we're using, rather than a different one
(not really a concern, they're the same size)
4. Don't use fscanf() to read file data, use fgets() & sscanf().
5. After using a pointer as a char *, validate alignment before switching
to int * (can only fail if kernel #define gets set stupidly) Or #6...
6. Validate sparemap file name isn't too long for assigned space.
7. recognise that strlen() returns size_t - don't shove it into an int.
8. On out of mem, be more clear which allocation failed in warning msg.

ATF tests all pass. But I don't think they use sparemap files.
 1.31 21-Nov-2017  christos Avoid needless pointer calisthenics: &foo[0] -> foo
 1.30 21-Nov-2017  kre With char bug[SIZE] using sizeof(bug[0]) is kind of boring, use
sizeof(bug) instead...
 1.29 20-Nov-2017  kre White space and comment formatting. NFC.
 1.28 20-Nov-2017  christos stop using magic constants
wrap long lines
use warn{,x}
make static
knf
 1.27 20-Nov-2017  kardel support NAME=<wedge name> syntax for disks and spares
 1.26 09-Mar-2016  christos branches: 1.26.8;
PR/50921: David Binderman: Fix memory leak
 1.25 27-Jan-2010  christos use warn/err appropriately.
 1.24 06-Apr-2009  lukem fix sign-compare issue
 1.23 19-Mar-2006  dan branches: 1.23.30;
close fp in several error paths, closing Coverity CIDs 1690, 1692.

"go" by go.
 1.22 09-Feb-2005  xtraeme Kill __P(), use ANSI function declarations; WARNS=3.
 1.21 26-Oct-2004  oster Cleanup a bit by nuking RF_Malloc macro, and add in some error
checking for the case where we can't allocate memory. (Not like
anyone uses this part of the code anyway.)
 1.20 26-Oct-2004  oster Strip off trailing \n's and spaces from configuration file lines.
Makes RAIDframe more forgiving if you accidentally add a space after
things like device names. Fixed at long last after a reminder over
the weekend.
 1.19 26-Oct-2004  oster How about we use the 'len' parameter to rf_get_next_nonblank_line()
instead of assuming all buffers are 256 bytes.
 1.18 13-Jul-2003  itojun use bouded string ops
 1.17 23-Jun-2003  agc Add NetBSD RCS Ids.
 1.16 17-May-2003  itojun sscanf overrun
 1.15 04-Oct-2001  oster rf_configure.c
- remove dependence on stuff in sys/dev/raidframe
- now rely on <dev/raidframe/*>
- bring in some needed prototypes for local functions
- nuke RF_ASSERT's.
- drag in some needed RF_ERRORMSG's

raidctl.c
- rely on <dev/raidframe/*>
- welcome to the New Way of doing RAIDframe #includes.

(No functional changes.)
 1.14 04-Feb-2001  christos remove redundant prototypes.
 1.13 27-Jan-2001  oster Move parts of a RAID type mapping table from rf_layout.c to rf_configure.c.
This means we don't need to compile or link with rf_layout.c here.
 1.12 31-Dec-2000  wiz Check return value of fgets. Approved by Greg Oster.
 1.11 10-Oct-2000  is Format string cleanups by Bill Sommerfeld.
 1.10 23-May-2000  thorpej branches: 1.10.4;
Apply indent.
 1.9 23-May-2000  thorpej Build with WARNS=2.
 1.8 13-Aug-1999  oster No need to include rf_sys.h.
 1.7 07-Aug-1999  oster Move two functions from rf_strutils.c into rf_configure.c, removing
the need for rf_strutils.c.
 1.6 26-Mar-1999  oster branches: 1.6.2;
Nuke unused code.
 1.5 04-Feb-1999  oster Add missing NetBSD RCS ID's! Thanks to SAITOH Masanobu (msaitoh@netbsd.org)
for pointing this out.
 1.4 26-Jan-1999  oster Take care of a few minor things due to the major RAIDframe cleanup.

Again, no functionality changes.
 1.3 12-Jan-1999  mjacob recover from errno.h changes
 1.2 23-Nov-1998  mrg fix compile errors on the alpha.
 1.1 13-Nov-1998  oster RAIDframe, version 1.1, from the Parallel Data Laboratory at
Carnegie Mellon University. Full RAID implementation, including
levels 0, 1, 4, 5, 6, parity logging, and a few other goodies.
Ported to NetBSD by Greg Oster.

raidctl is our userland configuration tool for RAIDframe.
 1.6.2.1 10-Oct-2000  he Pull up revision 1.11 (via patch, requested by is):
Format string cleanup.
 1.10.4.1 18-Oct-2000  tv Pullup sbin string format fixes [is].
See "cvs log" for explicit revision numbers per file, from sommerfeld.
 1.23.30.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.26.8.1 10-Sep-2018  martin Pull up following revision(s) (requested by nakayama in ticket #1019):

sbin/raidctl/rf_configure.h: revision 1.2
sbin/raidctl/rf_configure.c: revision 1.27
sbin/raidctl/rf_configure.c: revision 1.28
sbin/raidctl/rf_configure.c: revision 1.29
sbin/raidctl/raidctl.8: revision 1.73
sbin/raidctl/rf_configure.c: revision 1.30
sbin/raidctl/rf_configure.c: revision 1.31
sbin/raidctl/rf_configure.c: revision 1.32

support NAME=<wedge name> syntax for disks and spares

-

stop using magic constants
wrap long lines
use warn{,x}
make static
knf

-

White space and comment formatting. NFC.

-

With char bug[SIZE] using sizeof(bug[0]) is kind of boring, use
sizeof(bug) instead...

-

Avoid needless pointer calisthenics: &foo[0] -> foo

-

Several more cleanups:
1. Don't force use of "for" when "while" works better.
2. No need to check c != '\0' when we also check (c == ' ' || c == '\t')
3. Use the size of the buffer we're using, rather than a different one
(not really a concern, they're the same size)
4. Don't use fscanf() to read file data, use fgets() & sscanf().
5. After using a pointer as a char *, validate alignment before switching
to int * (can only fail if kernel #define gets set stupidly) Or #6...
6. Validate sparemap file name isn't too long for assigned space.
7. recognise that strlen() returns size_t - don't shove it into an int.
8. On out of mem, be more clear which allocation failed in warning msg.

ATF tests all pass. But I don't think they use sparemap files.
 1.2 20-Nov-2017  christos stop using magic constants
wrap long lines
use warn{,x}
make static
knf
 1.1 04-Oct-2001  oster branches: 1.1.92;
Add a pruned-down version of rf_configure.h. First step at disentangling
raidctl files from the hairy .h file mess.
 1.1.92.1 10-Sep-2018  martin Pull up following revision(s) (requested by nakayama in ticket #1019):

sbin/raidctl/rf_configure.h: revision 1.2
sbin/raidctl/rf_configure.c: revision 1.27
sbin/raidctl/rf_configure.c: revision 1.28
sbin/raidctl/rf_configure.c: revision 1.29
sbin/raidctl/raidctl.8: revision 1.73
sbin/raidctl/rf_configure.c: revision 1.30
sbin/raidctl/rf_configure.c: revision 1.31
sbin/raidctl/rf_configure.c: revision 1.32

support NAME=<wedge name> syntax for disks and spares

-

stop using magic constants
wrap long lines
use warn{,x}
make static
knf

-

White space and comment formatting. NFC.

-

With char bug[SIZE] using sizeof(bug[0]) is kind of boring, use
sizeof(bug) instead...

-

Avoid needless pointer calisthenics: &foo[0] -> foo

-

Several more cleanups:
1. Don't force use of "for" when "while" works better.
2. No need to check c != '\0' when we also check (c == ' ' || c == '\t')
3. Use the size of the buffer we're using, rather than a different one
(not really a concern, they're the same size)
4. Don't use fscanf() to read file data, use fgets() & sscanf().
5. After using a pointer as a char *, validate alignment before switching
to int * (can only fail if kernel #define gets set stupidly) Or #6...
6. Validate sparemap file name isn't too long for assigned space.
7. recognise that strlen() returns size_t - don't shove it into an int.
8. On out of mem, be more clear which allocation failed in warning msg.

ATF tests all pass. But I don't think they use sparemap files.
 1.2 26-Jan-1999  oster Never used, and certainly no longer needed.
 1.1 13-Nov-1998  oster RAIDframe, version 1.1, from the Parallel Data Laboratory at
Carnegie Mellon University. Full RAID implementation, including
levels 0, 1, 4, 5, 6, parity logging, and a few other goodies.
Ported to NetBSD by Greg Oster.

raidctl is our userland configuration tool for RAIDframe.
 1.2 26-Jan-1999  oster Never used, and certainly no longer needed.
 1.1 13-Nov-1998  oster RAIDframe, version 1.1, from the Parallel Data Laboratory at
Carnegie Mellon University. Full RAID implementation, including
levels 0, 1, 4, 5, 6, parity logging, and a few other goodies.
Ported to NetBSD by Greg Oster.

raidctl is our userland configuration tool for RAIDframe.

RSS XML Feed