aboutsummaryrefslogtreecommitdiff
path: root/sbin/vinum/v.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove "label" keyword.Greg Lehey2003-06-121-2/+1
| | | | Notes: svn path=/head/; revision=116247
* Move most #includes to vext.h.Greg Lehey2003-05-011-50/+33
| | | | | | | | | | | | | | | Change name of history file to History to avoid name conflicts. Rewrite minor number decoding. Now we have only three types of object: subdisks, plexes and volumes. The encoding for plexes and subdisks no longer reflects the object to which they belong. The super devices are high-order volume numbers. This gives vastly more potential volumes (4 million instead of 256). Don't try to chown directories if they haven't been created. Notes: svn path=/head/; revision=114364
* Make vinum disk-related devices readable by group "operator" to matchJoerg Wunsch2003-01-161-0/+15
| | | | | | | | | | | | | the configuration of any other disk-like devices. This is the non-DEVFS part which is normally not used in 5.x, but due for MFC into 4.x. PR: bin/28294, bin/32588 MFC after: 1 week Notes: svn path=/head/; revision=109398
* s/filesystem/file system/g as discussed on -developersTom Rhodes2002-08-211-1/+1
| | | | Notes: svn path=/head/; revision=102231
* more file system > filesystemTom Rhodes2002-05-161-1/+1
| | | | Notes: svn path=/head/; revision=96707
* Remove #ifdef VINUMDEBUG. vinum(8) now always supports debug optionsGreg Lehey2001-05-231-37/+1
| | | | | | | | | | 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. Notes: svn path=/head/; revision=77025
* Tidy up header files. Don't include stuff we don't need.Greg Lehey2001-05-221-50/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=76967
* Use _PATH_DEV.David E. O'Brien2001-02-281-3/+4
| | | | | | | Reviewed by: grog Notes: svn path=/head/; revision=73236
* Fix vinum for both devfs and non-devfs systems.Alfred Perlstein2001-02-201-19/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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> Notes: svn path=/head/; revision=72777
* Clean up now that setproctitle() is in libc.Greg Lehey2000-09-031-1/+0
| | | | | | | Submitted by: brian Notes: svn path=/head/; revision=65384
* continue_revive: Set the revive blocksize correctly in the ioctl request.Greg Lehey2000-06-071-0/+6
| | | | Notes: svn path=/head/; revision=61357
* Change the default command history file from /var/tmp/vinum_history toGreg Lehey2000-06-021-3/+50
| | | | | | | | | | | | | /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. Notes: svn path=/head/; revision=61161
* Add -i (interval) option, for use with start command.Greg Lehey2000-05-111-2/+15
| | | | Notes: svn path=/head/; revision=60361
* Don't print any error message if we can't open the history file. ThisGreg Lehey2000-02-291-10/+8
| | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=57606
* Don't use /dev/vinum/rsd/XXX for init as it doesn't exist any more.Peter Wemm2000-02-061-1/+1
| | | | | | | | | | Without this change, you cannot do the required init on a new raid5 volume. Reviewed by: grog Approved by: jkh Notes: svn path=/head/; revision=57005
* make_devices(): Create devices with permissions 640, not 740.Greg Lehey2000-01-051-10/+10
| | | | | | | Pointed-out-by: "Rodney W. Grimes" <freebsd@gndrsh.dnsmgr.net> Notes: svn path=/head/; revision=55489
* makedev: Give all devices permissions 740.Greg Lehey2000-01-051-57/+25
| | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=55434
* Change the name of the v flag variable from 'verbose' to 'vflag',Greg Lehey1999-10-131-9/+20
| | | | | | | | | indicating the multiple use (verbose or verify). Add -S flag to specify the size of some operations. Notes: svn path=/head/; revision=52194
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50476
* parseline(): Reset the -w flag.Greg Lehey1999-08-241-27/+29
| | | | | | | continue_revive: Implement the -w flag. Notes: svn path=/head/; revision=50291
* make_plex_dev: make them raw. Volume-related plex devices willGreg Lehey1999-08-141-9/+19
| | | | | | | probably die a death soon (yes, DES, that's correct usage). Notes: svn path=/head/; revision=49712
* Remove code to detect RAID-5/non-RAID-5 kernel modules.Greg Lehey1999-08-071-99/+125
| | | | | | | | | | 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. Notes: svn path=/head/; revision=49492
* Modify device numbering method to work with latest -CURRENT. Briefly,Greg Lehey1999-07-221-4/+4
| | | | | | | | | | | | 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> Notes: svn path=/head/; revision=48975
* Change the name of the s option to indicate that it wears more thanGreg Lehey1999-07-021-15/+49
| | | | | | | | | | | | | one hat. Add -n option for specifying names of volumes created with the simplified commands. Add function find_drive_by_devname to help the simplified configuration commands. Notes: svn path=/head/; revision=48454
* Remove ancient, mouldy comments.Greg Lehey1999-06-221-16/+0
| | | | Notes: svn path=/head/; revision=48097
* timestamp:Greg Lehey1999-05-021-1/+3
| | | | | | | | | Assign explicit variable for sec to get it to compile on Alpha. Submitted by: dfr Notes: svn path=/head/; revision=46348
* Maintain a log file, by default /var/log/vinum.history, showing whatGreg Lehey1999-05-021-0/+54
| | | | | | | | | | | has been done. This name can be overridden by the value of the VINUM_HISTORY environment variable. Print dates in log file according to the variable VINUM_DATEFORMAT, by default %e %b %Y %H:%M:%S. Notes: svn path=/head/; revision=46266
* When looking at all objects, look at all objects.Greg Lehey1999-04-171-7/+7
| | | | | | | | main: If the wrong version is started, execve the correct version. Notes: svn path=/head/; revision=45734
* Add -w option to init command: wait for init to complete beforeGreg Lehey1999-04-101-0/+5
| | | | | | | returning. Notes: svn path=/head/; revision=45526
* If the wrong version of vinum(8) has been started (i.e. non-RAID-5Greg Lehey1999-04-091-3/+5
| | | | | | | | | | when the kernel module is RAID-5, or the other way round), execve() the correct one. Add \n to an error message. Notes: svn path=/head/; revision=45502
* main (): Don't loop waiting for children to finish.Greg Lehey1999-03-281-2/+2
| | | | Notes: svn path=/head/; revision=45075
* Print correct message if the wrong module is loaded.Greg Lehey1999-03-231-1/+1
| | | | Notes: svn path=/head/; revision=44959
* If we fail to open the super device, open the "wrong" device (that is,Greg Lehey1999-03-191-1/+32
| | | | | | | | | | | the debug superdevice when we're compiled without debug, or the normal superdevice when we're compiled with debug. If this succeeds, print an informative comment and exit. make_devices: Create both debug and normal superdevices. Notes: svn path=/head/; revision=44888
* Move definitions of VINUMMOD and WRONGMOD to vext.h.Greg Lehey1999-03-021-17/+42
| | | | | | | | | | | | Wait4 zombies. make_devices: Don't try if the /dev directory is mounted read-only. Create daemon superdevice /dev/vinum/controld. Format a couple of multiline comments conformant with style(9). Notes: svn path=/head/; revision=44416
* Check for both kinds of Vinum module (with and without RAID-5). UsingGreg Lehey1999-02-111-0/+8
| | | | | | | | | | | | | the wrong module can cause confusion, including loading both versions (which conflict with each other) and incorrect ioctls, which cause unintelligible error messages. Extend 'start' command: if used without any parameters, vinum scans all disks known to devstat for vinum drives and reads their configuration. Notes: svn path=/head/; revision=43871
* Update to reflect major changes in vinum kernel moduleGreg Lehey1999-01-211-15/+95
| | | | Notes: svn path=/head/; revision=42947
* Complete previous commit: change debug macro from DEBUG to VINUMDEBUGGreg Lehey1999-01-061-5/+7
| | | | | | | Reported by: dg Notes: svn path=/head/; revision=42327
* Tweaks as a result of having vinum statically buildable in a kernel.Peter Wemm1998-12-281-2/+2
| | | | Notes: svn path=/head/; revision=42125
* Import base vinum userland sourcesGreg Lehey1998-09-161-0/+561
Notes: svn path=/cvs2svn/branches/VINUM/; revision=39332