Commit Graph

153 Commits

Author SHA1 Message Date
christos
cc8b3fb098 need <sys/stat.h> for fstat() 2017-01-10 20:47:05 +00:00
christos
c5f07454d1 PR/50921: David Binderman: Fix memory leak 2016-03-09 19:53:32 +00:00
wiz
704ad63c75 Use standard sort order for options.
Add -U to usage.
2016-01-06 22:57:44 +00:00
christos
c4e0e8f498 Access to the SET_LAST_UNIT ioctl. 2016-01-06 17:41:36 +00:00
bad
6c69384dad 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.
2015-09-08 08:59:09 +00:00
mrg
ec5f69b6a6 convert "component*" into "absent" for "START disks" part of the
output from "raidctl -G".  now this actually works when fed back
into raidctl -[cC].
2015-07-21 05:54:44 +00:00
wiz
e485731cb1 Bump date for previous. Add whitespace.
Fix some mandoc warnings.
2015-06-30 22:16:12 +00:00
sborrill
9a9013c60c 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.
2015-06-30 17:18:13 +00:00
sborrill
06ac39463d Compare correct length string for force option to -A 2015-06-30 17:02:14 +00:00
pooka
8da4f44455 &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
2015-06-26 01:16:54 +00:00
christos
e304a25c5b use strtou 2015-05-27 17:55:23 +00:00
manu
05c0668e69 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...
2015-05-27 15:31:15 +00:00
christos
52334fd887 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).
2014-04-03 18:54:10 +00:00
christos
3e4993b396 fix unused variable warnings. 2013-10-19 01:09:58 +00:00
jdc
6dc8fb4754 Belatedly note root on RAIDframe support for sandpoint. 2013-10-07 10:50:37 +00:00
tron
b0eb4d7e9b Note that NetBSD/amd64 can boot of RAID volumes. 2013-09-20 06:43:57 +00:00
njoly
af97374da1 Remove unexpected newline between Em macro and text. 2012-03-23 18:28:13 +00:00
christos
f42bf26590 PR/45456: Tetsuya Isaki: Don't mix stdio and write. 2011-10-12 16:45:37 +00:00
mrg
1ca3e5d8c0 print the serial number as an unsigned number. 2011-09-28 10:29:41 +00:00
joerg
baa8e84b6f Use __dead 2011-08-29 14:34:58 +00:00
wiz
1bd615d150 New sentence, new line. 2011-08-02 10:28:00 +00:00
buhrow
3dd51f1b7e 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.
2011-07-28 18:25:22 +00:00
enami
ec02ea412c Define accessors for number of blocks and partition size in the
component label and use them where appropriate.  Disscussed on tech-kern.
2011-02-19 07:11:09 +00:00
pooka
a804f47907 Exterminate a bug I created in 2009. 2011-02-09 11:22:49 +00:00
pooka
db818c53ab Use RUMPPRG.
ok Greg Oster
2010-12-15 18:37:55 +00:00
pooka
f1d4214202 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.
2010-11-08 12:42:35 +00:00
jld
9abd7e4959 Give a more polite message for raidctl -m on a non-parity RAID set. 2010-03-16 03:23:47 +00:00
plunky
858911baa2 fix sign-compare issue 2010-03-13 13:45:05 +00:00
jld
8ccd0f67a6 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`.
2010-03-13 07:21:37 +00:00
christos
13a5940614 use warn/err appropriately. 2010-01-27 18:34:02 +00:00
pooka
03fdf6b025 error message: \n\n -> \n 2010-01-27 17:02:06 +00:00
wiz
e08d841a54 + Fatal errors due to uninitialized components are ignored.
for -C. For dillo@
2010-01-27 09:26:16 +00:00
wiz
4421a69224 Consistently use "START disks" in examples. Bump date. 2010-01-27 08:56:08 +00:00
jld
9bd6e2661a 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.
2009-12-10 20:20:59 +00:00
wiz
feb9cdd5a3 Remove trailing whitespace. 2009-11-17 19:35:48 +00:00
jld
9e2ba7b416 Bump date; also fix typo pointed out by snj@. 2009-11-17 19:09:38 +00:00
jld
f1a1ad338d 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.
2009-11-17 18:54:26 +00:00
pooka
2ff8677b99 close rump kernel file descriptors properly 2009-10-11 12:51:58 +00:00
pooka
4f5a394d32 Support RUMP_ACTION, i.e. compile-time switch to make this execute
rump syscalls to configure raidframe in a rump kernel.
2009-10-11 12:14:05 +00:00
lukem
d4ab6626c0 fix sign-compare issue 2009-04-06 12:47:20 +00:00
tron
0c5d87d569 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.
2009-01-26 11:34:12 +00:00
wiz
133e2f4217 Drop trailing whitespace. 2008-08-28 21:24:30 +00:00
oster
6fe654d47f Bump date (before wizd). 2008-08-26 21:08:08 +00:00
oster
a252344f99 Add description of some of the things 'raidctl -u' doesn't do. 2008-08-26 21:06:55 +00:00
oster
7cb3f2efd3 We have the notion of an 'absent' disk, so use that in another example. 2008-08-19 17:38:46 +00:00
martin
cd22f25e6f Move TNF licenses to 2 clause form 2008-05-02 18:11:04 +00:00
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
explorer
62c5ab302e Fix a minor typo: wd0h was repeated, change second instance to wd1h as is likely intended. 2007-12-14 07:24:01 +00:00
oster
761dfd3017 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@).
2007-08-06 19:44:16 +00:00
dan
1fcee3db59 close fp in several error paths, closing Coverity CIDs 1690, 1692.
"go" by go.
2006-03-19 01:57:11 +00:00