Home | History | Annotate | Download | only in raidctl
History log of /src/sbin/raidctl/raidctl.c
RevisionDateAuthorComments
 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 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.

RSS XML Feed