summaryrefslogtreecommitdiffstats
path: root/sbin/vinum/commands.c
Commit message (Collapse)AuthorAgeFilesLines
* Ups! Forgot to put "sbin" on the commit line:phk2004-11-041-2329/+0
| | | | Remove userland vinum(8) stuff.
* Fix potential buffer overflow.le2004-07-241-2/+2
| | | | | PR: bin/14697 Submitted by: Matthew <kienow@infinet.com>
* 'ld' lists drives, not volumes.le2004-05-251-1/+1
|
* NULL -> 0.ru2004-03-171-1/+1
|
* Also remove "makedev" from the online help.le2004-02-161-2/+0
|
* Since DEVFS is mandatory, remove all instances to make_dev*. Keep thele2004-02-161-18/+0
| | | | | | | | "makedev" command for backwards compatibility, but just print out an informational message (this was the current behaviour, anyway) and remove it from the documentation. Approved by: grog (mentor)
* Remove unused variable and related bogus checks.le2004-02-141-10/+3
| | | | Approved by: grog (mentor)
* Don't attempt to make devices if we're using devfs. Thisrwatson2003-11-171-5/+10
| | | | | | | substantially cleans up the output when running the vinum management tool, and also makes it work better. Long sustained silence from: grog
* Remove label command. It has been deprecated since December 1998, andgrog2003-06-121-37/+1
| | | | | | recent changes broke it altogether. Prompted by: phk
* vinum_read: Don't lock configuration from userland. If vinum(8)grog2003-05-081-7/+1
| | | | | | | | crashes, the config remains locked and causes all subsequent start or read attempts to fail. This is part of a fix for the recently reported hangs. Approved by: re (scottl)
* Centralize _PATH_* definitions.obrien2003-05-051-1/+1
| | | | Submitted by: Tim Kientzle <kientzle@acm.org> (embellished by me)
* vinum_start: Call vinum_read with correct number of parameters.grog2003-05-051-1/+1
|
* vinum_readpol: Get this right.grog2003-05-051-19/+20
| | | | | | Submitted by: Allan Saddi <allan@saddi.com> vinum_read: White space cleanup.
* Rewrite of startup code:grog2003-05-041-56/+13
| | | | | | | | | | | vinum_read: Accept 0 parameters, hand an empty string to the kernel if so. Use new ioctl VINUM_READCONFIG, not VINUM_CREATE, to read config. vinum_start: When passed 0 parameters, drop the devstat kludge and call vinum_read instead. It's no longer necessary to distinguish between "start" and "read" if no parameters are passed, and probably one of them should go away.
* Move most #includes to vext.h.grog2003-05-011-57/+38
| | | | | | | | | | | | | | | | Change name of history file to History to avoid name conflicts. Don't try to make devices unless devfs has been removed. Don't accept resetconfig command from a file. Abused by: Jens Schweikhardt <schweikh@schweikhardt.net> Remove dead code (#if 0) vinum_mirror: Don't try to create mirrors with 0 drives. Found by: mismatch between enum kw in two different files.
* Update to use current version of devstat API.phk2003-03-151-2/+2
|
* Add #include <sys/resource.h>phk2003-02-161-0/+1
|
* While being here, remove a couple of unused "default:" labels in switchjoerg2003-01-161-4/+0
| | | | | | statements, now that gcc loudly complains about them. MFC after: 1 week
* vinum_start: examine storage array devices, not just disks.grog2002-04-261-3/+4
| | | | | | | Submitted by: Holger Kipp <holger.kipp@alogis.com> PR: 37458 MFC after: 5 days (to get 4.6 code freeze)
* Usage style sweep: spell "usage" with a small 'u'.des2002-04-221-11/+11
| | | | | Also change one case of blatant __progname abuse (several more remain) This commit does not touch anything in src/{contrib,crypto,gnu}/.
* Correct typo.grog2001-06-111-2/+2
| | | | Submitted by: Normand Leclerc <leclercn@videotron.ca>
* vinum_debug: Check for kernel module debug support, print errorgrog2001-05-231-10/+11
| | | | message if not present.
* Tidy up header files. Don't include stuff we don't need.grog2001-05-221-108/+107
| | | | | | | | | | | | | | | | | 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.
* Use _PATH_DEV.obrien2001-02-281-2/+3
| | | | Reviewed by: grog
* Fix vinum for both devfs and non-devfs systems.alfred2001-02-201-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Correct some comments.grog2000-12-201-3/+6
| | | | | | vinum_attach: Get correct names (were being overwritten). Submitted by: Terry Glanfield <Terry.Glanfield@program-products.co.uk>
* Clean up now that setproctitle() is in libc.grog2000-09-031-1/+0
| | | | Submitted by: brian
* vinum_start: Set the revive blocksize correctly.grog2000-06-071-1/+3
| | | | checkparity: Allow the -v flag to display progress.
* attach command: allow attaching striped or parity plexes if the -fgrog2000-06-021-1/+2
| | | | option is given. This will break the data in the plex.
* start plex/subdisk:grog2000-05-111-57/+31
| | | | | | | | | | | | 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.
* Implement vinum_rebuildparity, which had got forgotten. In thegrog2000-03-011-35/+58
| | | | | | | process, move the body of vinum_rebuildparity and vinum_checkparity to a new function, parityops. Implicitly-sanctioned-by: jkh
* New function checkupdates: check whether configuration updates aregrog2000-02-291-5/+357
| | | | | | | | | | | | | | | | | | | | | | 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
* Don't use /dev/vinum/rsd/XXX for init as it doesn't exist any more.peter2000-02-061-1/+1
| | | | | | | Without this change, you cannot do the required init on a new raid5 volume. Reviewed by: grog Approved by: jkh
* Explicitly type large scalar parameters to avoid compilation warningsgrog2000-01-051-10/+132
| | | | | | | | | | | | | | | | | 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.
* Change the name of the v flag variable from 'verbose' to 'vflag',grog1999-10-131-43/+110
| | | | | | | | | | | | | | | | 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_init: Fix message typo.grog1999-09-281-1/+50
| | | | | | | 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.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Tidy up some indentation and comments.grog1999-08-241-15/+109
| | | | | | | | | | | | | | | | | 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.
* initsd: On completion, put the subdisk in 'initialized' status, notgrog1999-08-151-34/+34
| | | | | | | 'up'. This matches changes in the kernel module. Reported-by: Bernd Walter <ticso@cicely.de> Remy Nonnenmacher <remy@synx.com>
* vinum_init: add code to initialize subdisks as well as plexes. Alsogrog1999-08-141-129/+159
| | | | provide for initializing volumes; this code is not yet complete.
* vinum_init:grog1999-08-071-29/+83
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Remove the volume, plex, sd and drive commands which allowed the usergrog1999-07-021-66/+493
| | | | | | | | | | | | | | 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
* Allow a 'start <drive>' command.grog1999-06-221-1/+4
|
* vinum_create:grog1999-05-021-57/+97
| | | | | | | | | | If no file name is specified, create one and edit it with the editor specified in the EDITOR environment variable, by default vi. vinum_help: Update. Fix typos in messages.
* vinum_init: count dead children correctly when waiting for completion.grog1999-04-171-2/+5
| | | | vinum_resetstats: count objects correctly.
* Add -w option to init command: wait for init to complete beforegrog1999-04-101-63/+71
| | | | returning.
* vinum_resetstats: Reset stats for drives correctly when recursing.grog1999-03-311-2/+4
|
* vinum_start: Allow user to specify a plex. In this case, revive allgrog1999-03-281-2/+28
| | | | | | | | subdisks in need of revival. vinum_stop: sleep for a second before unloading. This solves a race condition with a potential daemon when the stop command is specified on the command line.
* 'start' command: check that the objects in question aren't already up,grog1999-03-241-17/+49
| | | | and produce an intelligble message if they are.
* Correct ioctl calls VINUM_STARTCONFIG. The last commit broke thegrog1999-03-231-3/+3
| | | | 'vinum start' command.
OpenPOWER on IntegriCloud