1.) prefix all functions in the library with devstat_ (compatability
functions are available for all functions that were chaned in an
incompatible way, but are deprecated).
2.) Add a pointer to a kvm_t as the first argument to functions that
used to get their information via sysctl; they behave the same
as before when NULL is passed as this argument, otherwise, the
information is obtained via libkvm using the supplied handle.
3.) Add a new function, devstat_compute_statistics(), that is intended
to replace the old compute_stats() function. It offers more
statistics data, and has a more flexible interface.
libdevstat does now require libkvm; a library depedency is added, so
that libkvm only needs to be explicitely specified for statically linked
programs.
The library major version number is bumped.
Submitted by: Sergey A. Osokin <osa@freebsd.org.ru>, ken (3)
Reviewed by: ken
if the kernel module is built that way.
Remove the gross debug device/non-debug device hack used to recognize
whether the kernel module was in sync with the userland module.
vinum_mirror, vinum_raid4, vinum_raid5.
Correct typos.
Show new output of the 'list' and 'ls' commands.
Update examples to use 279 kB stripe sizes instead of 256 kB.
Clarify some text.
Remove the description of the 'invalid ioctl' messages which now no
longer occur.
Add a description of the 'retryerrors' keyword.
to avoid including the kernel headers.
Move a number of definitions of userland functions from
dev/vinum/vinumext.h.
Desired by: bde
This commit is the first of a general cleanup of the header files..
It won't be enough to make bde happy.
Remove vinum_perror and associated DEVBUG definition.
Use userland expurgated versions of kernel structures, since that's
what the ioctls return now.
Remove vinum_perror.
main: Check kernel version with userland version in _vinum_conf. This
field is a constant which gets incremented every time the
kernel-userland interface changes. This enables vinum(8) to
check for the correct kernel version and to produce a useful
message if it doesn't match. For previous versions, which don't
have a version number, the length of the structure is different,
so we can recognize it via the EINVAL return from ioctl.
Supply count parameter to tokenize().
Change method of recognizing active devfs: replace devfs_is_active
with (complemented) no_devfs.
make_devices: remove references to devfs. If we're running devfs, we
don't need to call make_devices at all.
vinum_makedev (user command 'makedev'): Print a warning message if
devfs is running and don't do anything else.
Remove vinum_perror.
Modify 'list' brief printout to fit in 80 columns.
Modify 'ls' brief printout to show the drive to which the subdisk
before instead of the plex offset, which is usually less interesting.
The verbose printout remains unchanged.
Use userland expurgated versions of kernel structures, since that's
what the ioctls return now.
Move checkupdates here to simplify header file mess.
Remove 'vinum_perror'.
Only call make_devices if we're not running devfs.
Use userland expurgated versions of kernel structures, since that's
what the ioctls return now.
Update help list, which was lagging behind reality.
checkupdates: move to list.c to simplify header file mess.
vinum_stripe, vinum_mirror, vinum_raid4, vinum_raid5: change the
default stripe size from 256 k to 279 k, thus hopefully spreading
superblocks more evenly.
userland tool:
Use the vfs.devfs.generation sysctl to test for devfs presense
(thanks phk!) when devfs is active it will not try to create the
device nodes in /dev and therefore will not complain about the
failure to do so.
Revert the change in the #define for VINUM_DIR in the kernel
header so that vinum can find its device nodes.
Replace perror() with vinum_perror() to print file/line when
DEVBUG is defined (not defined by default).
kernel:
Don't use the #define names for the "superdev" creation since
they will be prepended by "/dev/" (based on VINUM_DIR), instead
use string constants.
Create both debug and non-debug "superdev" nodes in the devfs.
Problem noticed and fix tested by: Martin Blapp <mblapp@fuchur.lan.attic.ch>
/var/log/vinum_history. Also check that any existing history file is
a regular file.
Admonished-by: imp
Allow stopping long-running commands with ^C (well, SIGINTR).
Previously this would stop the program.
directly off the drives.
This command shows a minor problem: it requires that the device nodes
exist, whereas kernel Vinum does not. Thus dumpconfig may show no
configuration for certain drives which are up and happily running.
This is documented in the man page.
Describe -i option for start.
Update description of start command (will now work on plexes).
Update discussion of choice of stripe size (don't use power of 2).
Remove references to raw devices.
Add -i option to delay between blocks copied, to reduce performance
impact.
Remove -v option, things work now.
Rewrite parity maintenance functions.
Rebuildparity: Add -v option to check whether it was broken before
rebuilding each block.
Describe stop -f to stop when config updates are disabled.
Explain in more detail why Vinum needs its own partition type, and why
you can't make it the c partition.
Implicitly-sanctioned-by: jkh
replaces an older attempt to silence vinum(8) when started in
single-user mode.
Add entries for vinum_raid[45].
Replace the preprocessor variable name CDEV_MAJOR with
VINUM_CDEV_MAJOR.
continue_revive: Set the proc title to 'reviving <sdname>' so that it
can be recognized in a ps list.
Approved-by: jkh
drive if it is set.
vinum_lvi: Change line spacing. This is still not right.
Change checks for striped or RAID-5 plexes to a macro 'isstriped',
which now also includes RAID-4.
Change checks for RAID-5 plexes to a macro 'isparity', which now also
includes RAID-4.
vinum_lsi: If the subdisk is initializing or reviving, don't wait a
whole second to check whether it's advancing; wait in increments of 50
ms up to 1 second. This makes for a barely perceptible delay.
Approved-by: jkh
enabled and print a warning message in varous places if they are not.
Fix typos in comments.
Change some indents to approach style(9).
initvol: If init fails, place the subdisks in a "down" state.
vinum_start(): If we're starting a plex, try doing it directly. It's
possible that the state of the plex differs from that of the subdisks,
for example if somebody has used 'setupstate'.
New functions vinum_raid4 and vinum_raid5 to create RAID-4 and RAID-5
volumes, analagous to vinum_mirror and vinum_stripe.
vinum_checkparity: Don't try to check the parity of a non-parity plex,
print a rude remark instead.
Approved-by: jkh
Suggested-by: Bernd Walter (ticso@cicely.de)
Add key pairs for 'mv' and 'move' (a synonym for 'mv'). Required for
the move command code submitted by Marius Bendiksen
<marius@marius.scancall.no>
make_devices: Don't create symlinks for drives if they are only
referenced. Previously, spurious symlinks appeared in the current
directory.
Problem-reported-by: Bernd Walter (ticso@cicely.de)
No longer create character devices, now that there is no difference.
Make the devices as character devices, not block devices.
on alpha.
Submitted-by: Bernd Walter <ticso@cicely.de>
Replace %q formats with %lld.
Desired-by: bde
Remove #ifdef RAID5
vinum_lsi: If a subdisk is in 'reviving' state, check the status of
the revive and report the status of the revive. In verbose mode,
display the pid of the reviver.
on alpha.
Submitted-by: Bernd Walter <ticso@cicely.de>
Add function vinum_mv, which moves subdisks to different drives. This
function just does the low-level configuration changes; the resultant
subdisk is stale if it previously had any contents, otherwise it is
empty (i.e. in need of initializing if it's RAID-5). We still need to
handle getting the contents moved over, but the current version will
suffice to migrate subdisks from a disk which has failed.
Submitted-by: Marius Bendiksen <marius@marius.scancall.no>
vinum_start: Get the revive block size right.
interface limits it to this anyway.
Change the name of the v flag variable from 'verbose' to 'vflag',
indicating the multiple use (verbose or verify).
Add -S flag to specify the size of some operations.
indicating the multiple use (verbose or verify).
vinum_ldi:
Show active requests for the drive if -v is specified.
White space cleanup.
vinum_lsi:
Show the progress of an init command if -v is specified.
vinum_info:
Print the number of active requests.
Print out loginfo_sdio and loginfo_sdiodone log entries.
indicating the multiple use (verbose or verify).
initsd: rewrite:
Initialization is now done in the kernel.
Verify (again!) if -v is specified.
Allow specification of a blocksize, the length to be transferred in
one transfer.
vinum_revive:
Allow specification of a blocksize, the length to be transferred in
one transfer.
vinum_lpi: Add information about progress of rebuildparity and
checkparity commands.
listconfig: Print object counts in a different format, don't refer to
the internal number of slots allocated:
Caused-confusion-to: Norbert Meissner <norbert.meissner@daimlerchrysler.com>
vinum_info: Change format of device numbers so that they fit in the
column (ignore high-order minor number bits, which aren't really of
much interest).
vinum_start: bzero the statinfo.dinfo struct. The lack of this was
causing sporadic failures of the start command.
Add body of vinum_checkparity command.
vinum_init(): Change name of variable plexindex to objindex, which
better describes its purpose.
initsd(): Add a second parameter to determine whether it should wait
for completion or not. This allows it to DTRT when called
with the -w flag either directly or via initplex().
Add 'setstate' command (function vinum_setstate ()) to implement the
VINUM_SETSTATE_FORCE ioctl for diddling individual object states.
This is a repair tool which can also be used for panicing the system.
Use with utmost care if at all.
Add unimplemented commands 'checkparity' and 'rebuildparity'. Watch
this space.
Add function definition for readpol command.
Rewrite make_devices with a view to incremental making. In the
process, effectively kill off plex-bound subdisk device numbers.
Add Cybernet copyright.
OK'd-by: Chuck Jacobus <chuck@cybernet.com>
vinum_ldi:
Calculate the percentage used correctly.
vinum_lsi:
Flag detached subdisks.
vinum_info:
Request info: get the major and minor numbers and print them
correctly.
list_defective_objects:
New function, for listing objects which aren't up after vinum_start.
Requested-by: Steve Taylor <staylor@cybernet.com>
wait correctly for completion.
set object in initializing state before initializing.
Don't set the plex up, it should go up automatically.
vinum_start:
If any objects are not up on start, list them.
Requested-by: Steve Taylor <staylor@cybernet.com>
vinum_attach:
Make sure we always have the object information before examining it.
vinum_replace:
Start writing.
create_drive, vinum_concat, vinum_stripe, vinum_mirror:
Check the ioctl return values correctly
vinum_readpol:
Start writing.
the device numbers are now minor number only, so that we can still
compare them after dev_t has turned into a blob.
Broken-by: dev_t changes
Reported-by: Vallo Kallaste <vallo@matti.ee>
"Niels Chr. Bank-Pedersen" <ncbp@bank-pedersen.dk>
Change definition of sflag
Reported-by: Johan Karlsson <k@numeri.campus.luth.se>
Doug <Doug@gorean.org>
green
World-broken-by: grog
Pointy-hat-passed-to: grog
to bypass the create command.
vinum_stop:
Allow -f option.
Add commands for simplified configuration:
concat - create a volume with one concatenated plex
stripe - create a volume with one striped plex
mirror - create a volume with two concatenated or striped plexes
Egged-on-by: jkh