Commit Graph

7 Commits

Author SHA1 Message Date
xtraeme 481db08b0a Rewrite bioctl(8) and add support for the following features:
- Ability to add/remove hot-spare disks (previously only 'add' was accepted).
- Ability to add/remove pass-through disks.
- Ability to create/remove RAID volumes with optional size, stripe, level,
  member disks and others.
- Ability to start/stop consistency checks in a RAID volume.
- Ability to show only information about physical disks, volumes or both.

Rather than using multiple flags, the utility has been modified to use
the same mode than dkctl(8) (and maybe others), i.e:

$ ./bioctl
usage: bioctl device command [arg [...]]
Available commands:
  show [disks] | [volumes]
  alarm [enable] | [disable] | [silence] | [test]
  blink start | stop [channel:target[.lun]]
  hotspare add | remove channel:target.lun
  passthru add DISKID | remove channel:target.lun
  check start | stop VOLID
  create volume VOLID DISKIDs [SIZE] STRIPE RAID_LEVEL channel:target.lun
  remove volume VOLID channel:target.lun
$

I'll add support for other features soon.
2008-01-02 23:45:06 +00:00
xtraeme 10f7c0a4da Add BIOC_SVMIGRATING to bio(4) and bioctl(8) to report if a volume
is migrating currently showing the percentage.

Update arcmsr(4) to report this, like:

$ sudo ./bioctl -h arcmsr0
    Volume Status     Size Device
 arcmsr0 0 Migrating  698G ARC-1210-VOL#00 RAID 5 7% done
	 0 Online     234G 0:0.0   noencl <WDC WD2500YS-01SHB1 20.06C06>
	 1 Online     234G 0:1.0   noencl <WDC WD2500YS-01SHB1 20.06C06>
	 2 Online     234G 0:2.0   noencl <WDC WD2500YS-01SHB1 20.06C06>
	 3 Online     234G 0:3.0   noencl <WDC WD2500YS-01SHB1 20.06C06>
$
2007-12-07 11:51:21 +00:00
xtraeme a0c2cca741 There's no need to waste 14 spaces in the third element when the
the human output is requested, align it at most 4 spaces.

I'd also make the human output the default but not sure everybody will
agree...
2007-12-05 16:29:48 +00:00
xtraeme 507f8b0669 - Remove -D flag... it's useless (it was removed in OpenBSD as well).
- Use errx(3) in the appropiate function rather than warn(4) and
  returning EXIT_SUCCESS all the time.
- Remove another case where it checks the device passed string will be
  the same than in bv_dev.
2007-12-05 14:28:13 +00:00
xtraeme 1de866da81 Do not enforce that passed device string will be the same than the
one in bv_dev, which in some drivers like arcmsr(4) it contains the
volume name.

While I'm here, fix the formatting output so that it fits with arcmsr(4),
like:

$ sudo bioctl -h arcmsr0
    Volume Status               Size Device
 arcmsr0 0 Building             698G ARC-1210-VOL#00 RAID5 96% done
         0 Online               234G 0:0.0   noencl <WDC WD2500YS-01SHB1 20.06C06>
	 1 Online               234G 0:1.0   noencl <WDC WD2500YS-01SHB1 20.06C06>
	 2 Online               234G 0:2.0   noencl <WDC WD2500YS-01SHB1 20.06C06>
	 3 Online               234G 0:3.0   noencl <WDC WD2500YS-01SHB1 20.06C06>
$
2007-12-05 13:26:04 +00:00
xtraeme d3f615b78d - Remove the code for softraid, it's unlikely that NetBSD will support
this because we do have a working raidframe(4).
- Miscellaneous cleanups and make the code WARNS=4 compliant.
- Removed all stuff that doesn't apply to NetBSD.
2007-11-04 08:25:04 +00:00
bouyer 982bad256f Add bio(4) and associated bioctl(8) from OpenBSD, a driver control block
device controllers, and more specifically raid controllers.
Add a new sensor type, ENVSYS_DRIVE, to report drive status. From OpenBSD.
Add bio and sysmon support to mfi(4). This allow userland to query
status for drives and logical volumes attached to a mfi(4) controller. While
there fix some debug printfs in mfi so they compile.
Add bio(4) to amd64 and i386 GENERIC.
2007-05-01 17:18:52 +00:00