Commit Graph

4825 Commits

Author SHA1 Message Date
xtraeme 3d60ce5de6 Add two examples to create and remove a RAID volume in a supported
controller... such as arcmsr(4) for now.
2008-02-02 03:21:47 +00:00
dyoung ae1c071d6f Patch /dev/drvctl and drvctl(8) to let us suspend/resume device
sub-trees, and to let us list the children of a device.

While I am here, add -p to the drvctl(8) usage message.
2008-01-27 01:38:33 +00:00
dsl 7ddd81a137 Add support for mbr code with ascii keycodes 2008-01-25 23:19:10 +00:00
dsl 683572a3a3 Note the existance of mbr_com0 and mbr_com0_9600. 2008-01-20 15:04:09 +00:00
tsutsui aa7cb7b8f0 - add a sanity check to avoid possible division by zero
- adjust sector numbers _after_ "Sanity check the data against all zeroes"

Should close PR bin/37656.
2008-01-20 06:39:31 +00:00
ad 40e9e0d144 Fix a dumb bug. 2008-01-19 01:18:47 +00:00
ad bbc79e58a6 Pull in my modules code for review/test/hacking. 2008-01-16 12:34:50 +00:00
ad 73e694f404 Don't use the block device to read crashdumps, if possible. 2008-01-15 14:26:41 +00:00
xtraeme aff55dbf6c New bioctl(8) first appeared on 5.0 not 4.1. 2008-01-11 17:11:42 +00:00
xtraeme e0fef4a42b Xref gcscpcib(4). 2008-01-09 14:35:54 +00:00
simonb d8de5b102b Remove support for NetBSD/pc532. 2008-01-09 11:25:58 +00:00
seanb fb884caea6 Shutdown sloop socket for read as it's never read on to
prevent mbufs from queueing in its recv buf.
PR:21459
2008-01-08 20:03:09 +00:00
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 a5381ad0a5 Xref itesio(4). 2007-12-29 06:10:29 +00:00
ad 2b5d04688e Make it build with src/sys from the vmlocking2 branch. 2007-12-28 21:44:32 +00:00
riz 42a4e6ef13 As discussed on tech-userlevel, add NetBSD GPT partition types for
swap, ffs, lfs, raidframe, ccd and cgd.  gpt(8) now defaults to
NetBSD ffs if no type is given, but previous FreeBSD types are
still recognized in the DKWEDGE_AUTODISCOVER code.
2007-12-28 19:53:09 +00:00
apb bb3a1dfc42 Remove note about the first track being reserved for the BIOS (it's
not), and replace it with a note about the first partition traditionally
beginning in the second track of the first cylinder.
2007-12-23 10:47:42 +00:00
apb ca6bb6217d Track zero is not strictly reserved for the BIOS, that's just a
convention, so don't make it an error in check_overlap().  Sector 0 is
reserved for the MBR, so make that an error in check_overlap().
2007-12-23 10:43:57 +00:00
apb 49b1fa58d7 Report the first active partition. 2007-12-23 08:58:34 +00:00
apb 29a92a49d4 If the partition is unused, then attempting to decode the PBR would
actually decode the MBR from sector 0 of the disk.  Don't do it if
v_flag < 3.
2007-12-23 08:14:28 +00:00
tsutsui 68fb2791e1 Use h2fs32() rather than fs2h32() on host to disk conversion. 2007-12-22 01:19:52 +00:00
tsutsui 37d769ed47 - use MINFREE defiend in <ufs/ext2fs/ext2fs.h>
- remove unnecessary casts
- unsigned -> unsigned int
- misc KNF
2007-12-22 01:15:49 +00:00
tsutsui 7bc26029c9 Remove unused macro. 2007-12-22 00:28:21 +00:00
dogcow 3a04c46a48 Your friendly neighborhood 64-bit architecture here to remind you that
strlen returns size_t, and printf's precision specifier uses int.
2007-12-19 05:48:33 +00:00
riz 0fac2edb7f Fix the usage strings for each command, and print them all for the
"global" usage.  It's still a little ugly, but hopefully not as
fantastically confusing as before...
2007-12-18 21:46:45 +00:00
degroote 9fe6472fc5 Add support for the command list scan in ifconfig (this command permits to scan
access point in the neighbourhood).

Complete list of channel attributes and list of management information element
payload.

While here, use estrlcpy instead of strncpy.

From FreeBSD ifconfig and net80211
2007-12-16 13:49:21 +00:00
snj 5a1d0f0133 Sort xrefs. 2007-12-15 21:44:15 +00:00
apb 824c1f08d4 Update for the fact that MAKEDEV uses either tmpfs or mfs. 2007-12-15 21:33:49 +00:00
perry 441197bc3b de-__P, ansify prototypes 2007-12-15 20:36:11 +00:00
perry 8b0f9554ff convert __attribute__s to applicable cdefs.h macros 2007-12-15 19:44:37 +00:00
perry 36c7456d7c include sys/cdefs.h so that __attribute__ can be fixed later 2007-12-15 16:32:05 +00:00
perry 4d096031f0 replace instances of __attribute__((__packed__)) with __packed 2007-12-15 16:03:29 +00:00
christos 9e925a6665 - Use fattr.c functions instead of home brewed ones.
- Use new dehumanize number.
2007-12-14 17:37:22 +00:00
tsutsui ea9dd22af6 Don't allow blocksize larger than 4096 bytes as our kernel, fsck_ext2fs(8),
and Linux e2fsprogs.
2007-12-14 13:19:35 +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
wiz 3a8a3f8310 Whitespace and HTML output fixes. 2007-12-13 22:06:45 +00:00
tsutsui f4f8fe5f57 Add Xref newfs_ext2fs(8). 2007-12-10 12:34:49 +00:00
tsutsui 3c4a86f736 Fix typo. 2007-12-09 17:39:51 +00:00
apb d9024ddf4b * init calls "MAKEDEV -MM init", not "MAKEDEV -M init"
* s/filesystem/file system/
* one typo and one markup fix
* bump date
2007-12-09 09:24:55 +00:00
apb edf9f9968b No need to pass "-ppax" to MAKEDEV now that MAKEDEV internally defaults
to using pax.
2007-12-09 09:16:28 +00:00
jnemeth 1d506ab633 PR/37155 - Marcelo Schmidt -- specifying too large of a size causes segvs 2007-12-08 21:40:23 +00:00
jnemeth 415d88d5b8 PR/37503 - De Zeurkous -- inaccurate description of -s option 2007-12-08 20:52:19 +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 415141bdf8 Mention arcmsr(4) in SEE ALSO. 2007-12-05 12:29:55 +00:00
yamt ca117550c0 remove an unused variable, nfsproto. 2007-11-30 16:13:15 +00:00
dsl fe8a8005c1 Make this compile without -Wno-pointer-sign
(Needs updated bootblock.h)
2007-11-29 23:19:25 +00:00
dsl 0d1f6529aa Change -F to not use opendisk().
Don't change default to the boot volume until after we've found we aren't
  doing -F.
For tool-fdisk enforce -F and use #defines to make code that can no
  longer possibly execute compile.
2007-11-29 23:02:00 +00:00
tsutsui 726acbb131 Use powerof2() macro in <sys/param.h> rather than a homegrown version. 2007-11-27 13:31:10 +00:00
xtraeme 90a0b7ad49 Mention evbarm/iopwdog(4) and swwdog(4). 2007-11-23 13:32:46 +00:00
xtraeme 9537f21760 Mention some watchdog drivers in SEE ALSO and don't mention envsys(4)
or envstat(8), they don't have nothing in common with watchdogs.

<wizd> Bump date.
2007-11-23 11:34:50 +00:00
tsutsui 58babb9c75 Roundup e2fs_ipg to make it use whole inode table blocks since
it's still reasonable and some kernel code seems to assume it
(otherwise some inode numbers of directories could be corrupted).

XXX: not sure if odd e2fs_ipg is valid or not in ext2fs spec.
2007-11-21 13:14:06 +00:00
tsutsui ddd9ad0a5e Fix e2fs_itpg calculation. 2007-11-20 16:34:37 +00:00
tsutsui e2cf99a49a - fix a possible integer overflow
- initialize inode generation numbers with random numbers for NFS
  like newfs(8) as man page said
  XXX: sys/ufs/ext2fs/ext2fs_alloc.c:ext2fs_valloc() seems to override
       these generated numbers.
2007-11-19 15:11:50 +00:00
apb 02c42d6bae Remove unwanted ">" from a printed message. 2007-11-18 19:19:00 +00:00
christos eb90df6853 From Marco Trillo (marcotrillo at gmail dot com):
Add Advanced power management in atactl(8)
2007-11-18 17:48:21 +00:00
tsutsui 67c9d310f8 Several minor fixes:
- replace a magic number with a macro
- fix several printf format
- fix possble block sizes for zap_old_sblock()
- use err(3) rather than errx(3) + strerror(errno)
- fix a typo
- misc cosmetics
2007-11-18 07:11:39 +00:00
tsutsui d047ce663b Descend into newfs_ext2fs(8). 2007-11-17 16:58:30 +00:00
tsutsui f8b02b9cdf Add a dumb but BSD-licensed newfs_ext2fs(8) command.
This is based on the newfs(8) command for ffs, but
most ext2fs specific part is written from scratch.

Tested on alpha, cobalt, i386 and sgimips with some disks and vnd(4),
and at least cobalt's firmware can load boot files from an ext2fs
E2FS_REV0 partition created by this native newfs_ext2fs(8) command.

Closes PR bin/16175.
2007-11-17 16:50:25 +00:00
tsutsui 1e795b0373 Add a workaround for incorrect "SUMMARY INFORMATIONS WRONG FOR CG #N"
and "BLK(S) MISSING IN BIT MAP #N" reports on newer ext2fs with
EXT2F_COMPAT_RESIZE feature by accounting blocks in EXT2_RESIZEINO.

XXX1: Should we account blocks allocated by all other reserved inodes?
XXX2: We should really check and fix EXT2_RESIZEINO accordingly.
2007-11-16 16:55:04 +00:00
tsutsui 672990c37a Fix e2fs_itpg calculation (a rounddown bug). 2007-11-13 17:25:43 +00:00
tsutsui 98bd33ec69 Use more proper aligned format in a debug function print_bmap(). 2007-11-13 13:57:52 +00:00
pooka 3384f1f26e tyop: _time_seconf -> _time_second 2007-11-12 16:04:55 +00:00
christos f4f95f573f simplify and fix the combination code. Hi pooka. 2007-11-11 22:44:12 +00:00
yamt f72b283e28 - fix timeout for -s.
- mention default values of some options.
2007-11-09 12:25:00 +00:00
martin 4babfd8202 size_t != unsigned int - so don't pass the address of the former when a
pointer to the latter is expected.
2007-11-06 10:48:39 +00:00
martin 309213c31a Do not use %d for size_t 2007-11-06 10:44:23 +00:00
christos ad18d2e41e 3 month roland feedback timeout:
- Pass lint
- knf
- convert ints to size_t's
2007-11-06 02:50:48 +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
xtraeme 51f434b0bb Fix typo in SATA features: Perservation -> Preservation. 2007-11-04 02:34:27 +00:00
tsutsui b682074ae4 Don't print Drive serial number if -S (setting shell variables) is specified. 2007-10-28 10:02:08 +00:00
ad 7dad9f7391 Merge from vmlocking:
- Split vnode::v_flag into three fields, depending on field locking.
- simple_lock -> kmutex in a few places.
- Fix some simple locking problems.
2007-10-10 20:42:20 +00:00
ad 0e7216ebf1 brelse() now takes two args. 2007-10-08 21:42:33 +00:00
ad fe44973fe3 Give brelse() a second argument so that it matches the kernel.
fsck_lfs now compiles again.
2007-10-08 21:39:49 +00:00
xtraeme 8b2678bd7e Use a two clause license for all the code I contributed.
The envsys code will be changed later.
2007-10-06 07:21:02 +00:00
xtraeme 9ab6815f21 Remove intval from %union, it's unused... ok christos@. 2007-10-01 17:01:55 +00:00
ragge b531488dbc __attribute -> __attribute__. 2007-09-16 18:42:02 +00:00
ragge 9949926272 __attribute -> __attribute__. 2007-09-15 14:35:33 +00:00
wiz f4a91b1899 Fix Dd argument (use full month names).
Use more markup.
Comment out references to safte(4) and softraid(4), which don't exist in
NetBSD.
Remove trailing whitespace.
Use macros instead of characters for HTML output (replace ">", "<"
with \*[Gt], \*[Lt]).
Sort sections.
2007-09-09 16:13:19 +00:00
bouyer 23448a2818 Fix typo. 2007-09-09 13:30:55 +00:00
xtraeme a0b933c5b2 CID 4498: print_entry() returning without freeing 'fp'.
Ok by rmind@.
2007-09-06 03:01:55 +00:00
tls ae75a5cdbe This program is a host tool, so when we use newfangled C features like
PRIxyz we have to ensure it still builds on hosts with Old compilers.
Noticed while building a cross-toolchain on FreeBSD 4.
2007-09-04 00:34:58 +00:00
christos 7bf1a6f81d Avoid zero-divides from Anon Ymous 2007-08-22 16:30:28 +00:00
bouyer bd627359dd Improved SATA support, from Jonathan A. Kollasch in PR bin/36772:
* use full 5-bit command queue depth that SATA supports
* decode SATA bits
2007-08-21 16:53:18 +00:00
pavel 5e809e89c6 Attempt at fixing build failures after proplib was converted to bool:
FALSE -> false, TRUE -> true, boolean_t -> bool, int -> bool when
appropriate, include stdbool.h . proplib.h no longer provides boolean_t,
so it is necessary to change to bool.

From Tom Spindler (dogcow@).
2007-08-17 17:59:15 +00:00
dyoung 4287175475 Don't nul-terminate the interface name in a sockaddr_dl that is
part of an ifa_msghdr returned by sysctl(3), because that could
overwrite the ifam_len field of the following ifa_msgher.  Instead,
copy the interface name out of the sockaddr_dl, and then nul-terminate.
Fixes the bug reported by Frank Kardel on current-users@.  Thanks
Frank for reporting, and for testing the fix.
2007-08-14 03:39:19 +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
yamt 3c955ef258 lengthen timeout. i saw a server for which 10s was not enough. 2007-08-05 22:09:12 +00:00
pooka ba8a93da5b typographical fixes
from Matthew Wala in misc/36729
2007-08-04 10:45:36 +00:00
he 844b7f67f9 Re-phrase description of -A option, as per suggestion from Jukka Salmi
at netbsd-users@ and with a slight tweak by myself -- at the end the last
dump device will remain as the single active dump device.
Fix a nearby typo.
Bump date.
2007-08-02 18:53:46 +00:00
pooka fee6f866be Don't re-explain vfs.generic.usermount & friends here. 2007-08-01 08:52:07 +00:00
pooka 16170d27f6 Explain that nosuid,nodev is also needed for non-privileged mounts. 2007-08-01 08:51:24 +00:00
rumble 331f3b4b63 Rescue the subjunctive. 2007-07-30 05:00:55 +00:00
christos 7f593965ea cast sizeof() to int for printf widths. 2007-07-17 23:56:01 +00:00
christos 27e0d2b78b kill MFSNAMELEN 2007-07-17 20:17:52 +00:00
christos a6e0a40b9f kill MFSTYPENAME 2007-07-17 20:13:43 +00:00
christos fede0a77fc kill MFSNAMELEN 2007-07-17 20:03:10 +00:00
pooka 91896524c2 Don't attempt to start megamaid if run with MNT_GETARGS. 2007-07-17 12:39:24 +00:00