Next Previous Contents

13. Advanced Topics: 5070 Command Reference

In addition to the text based GUI the RAID configuration may also be manipulated from the husky prompt ( the : raid; prompt) of the onboard controller. This section describes commands that a user can input interactively or via a script file to the K9 kernel. Since K9 is an ANSI C Application Programming Interface (API) a shell is needed to interpret user input and form output. Only one shell is currently available and it is called husky. The K9 kernel is modelled on the Plan 9 operating system whose design is discussed in several papers from AT&T (See the "Further Reading" section for more information). K9 is a kernel targeted at embedded controllers of small to medium complexity (e.g. ISDN-ethernet bridges, RAID controllers, etc). It supports multiple lightweight processes (i.e. without memory management) on a single CPU with a non-pre-emptive scheduler. Device driver architecture is based on Plan 9 (and Unix SVR4) STREAMS. Concurrency control mechanisms include semaphores and signals. The husky shell is modelled on a scaled down Unix Bourne shell.

Using the built-in commands the user can write new scripts thus extending the functionality of the 5070. The commands (adapted from the 5070 man pages) are extensive and are described below.

13.1 AUTOBOOT - script to automatically create all raid sets and scsi monitors

13.2 AUTOFAULT - script to automatically mark a backend faulty after a drive failure

13.3 AUTOREPAIR - script to automatically allocate a spare and reconstruct a raid set

After parsing it's arguments (command and environment) autorepair gets a spare device from the RaidRunner's spares spool. It then engages it in write-only mode and reads the complete raid device which reconstructs the data on the spare. The read is from the raid file system repair entrypoint. Reading from this entrypoint causes a read of a block immediately followed by a write of that block. The read/write sequence is atomic (i.e is not interruptible). Once the reconstruction has completed, a check is made to ensure the spare did not fail during reconstruction and if not, the access mode of the spare device is set to the access mode of the raid set. The process that reads the repair entrypoint is rebuild.

This device reconstruction will take anywhere from 10 minutes to one and a half hours depending on both the size and speed of the backends and the amount of activity the host is generating.

During device reconstruction, pairs of numbers will be printed indicating each 10% of data reconstructed. The pairs of numbers are separated by a slash character, the first number being the number of blocks reconstructed so far and the second being the number of blocks to be reconstructed. Further status about the rebuild can be gained from running rebuild.

When the spare is allocated both the number of spares currently used on the backend and the spare device name is printed. The number of spares on a backend is referred to the depth of spares on the backend. Thus prior to re-engaging the spare after a reconstruction a check can be made to see if the depth is the same. If it is not, then the spare reconstruction failed and reconstruction using another spare is underway (or no spares are available), and hence we don't re-engage the drive.

13.4 BIND - combine elements of the namespace

13.5 BUZZER - get the state or turn on or off the buzzer

13.6 CACHE - display information about and delete cache ranges

13.7 CACHEDUMP - Dump the contents of the write cache to battery backed-up ram

13.8 CACHERESTORE - Load the cache with data from battery backed-up ram

13.9 CAT - concatenate files and print on the standard output

13.10 CMP - compare the contents of 2 files

13.11 CONS - console device for Husky

bind -k cons /dev/cons

On a Unix system this is equivalent to:

bind -k unixfd /dev/cons

On a DOS system this is equivalent to:

bind -k doscon /dev/cons

On target hardware using a SCN2681 chip this is equivalent to:

bind -k scn2681 /dev/cons

13.12 DD - copy a file (disk, etc)

The number after the "+" is the number of fractional blocks (i.e. blocks that are less than the block size) involved. This number will usually be zero (and is otherwise when physical media with alignment requirements is involved).

A write failure outputting the last block on the previous example would cause the following output:

Write failed
8+0 records in
7+0 records out

13.13 DEVSCMP - Compare a file's size against a given value

13.14 DFORMAT- Perform formatting functions on a backend disk drive

13.15 DIAGS - script to run a diagnostic on a given device

13.16 DPART - edit a scsihd disk partition table

13.17 DUP - open file descriptor device

13.18 ECHO - display a line of text

13.19 ENV- environment variables file system

13.20 ENVIRON - RaidRunner Global environment variables - names and effects

To over-ride the number of parity buffers for ALL raid 3's (and set only 72 parity buffers) set

: raid ; setenv RAID3_Default_PBUFS 128

If you set a default for all raid sets of a particular type, but want ONE of them to be different then set up a variable for that particular raid set as it's value will over-ride the default. In the above example, where all Raid Type 3 will have 128 parity buffers, you could set the variable

: raid ; setenv RAID3_Dbase_PBUFS 56 

which will allow the raid 3 raid set named 'Dbase' to have 56 parity buffers, but all other raid 3's defined on the RaidRunner will have 128.

13.21 EXEC - cause arguments to be executed in place of this shell

13.22 EXIT - exit a K9 process

13.23 EXPR - evaluation of numeric expressions

13.24 FALSE - returns the K9 false status

13.25 FIFO - bi-directional fifo buffer of fixed size

13.26 GET - select one value from list

13.27 GETIV - get the value an internal RaidRunner variable

13.28 HELP - print a list of commands and their synopses

13.29 HUSKY - shell for K9 kernel

13.30 HWCONF - print various hardware configuration details

13.31 HWMON - monitoring daemon for temperature, fans, PSUs.

13.32 INTERNALS - Internal variables used by RaidRunner to change dynamics of running kernel

13.33 KILL - send a signal to the nominated process

13.34 LED- turn on/off LED's on RaidRunner

13.35 LFLASH- flash a led on RaidRunner

13.36 LINE - copies one line of standard input to standard output

13.37 LLENGTH - return the number of elements in the given list

13.38 LOG - like zero with additional logging of accesses

13.39 LRANGE - extract a range of elements from the given list

13.40 LS - list the files in a directory

13.41 LSEARCH - find the a pattern in a list

13.42 LSUBSTR - replace a character in all elements of a list

13.43 MEM - memory mapped file (system)

13.44 MDEBUG - exercise and display statistics about memory allocation

13.45 MKDIR - create directory (or directories)

13.46 MKDISKFS - script to create a disk filesystem

13.47 MKHOSTFS - script to create a host port filesystem

13.48 MKRAID - script to create a raid given a line of output of rconf

13.49 MKRAIDFS - script to create a raid filesystem

13.50 MKSMON - script to start the scsi monitor daemon smon

13.51 MKSTARGD - script to initialize a scsi target daemon for a given raid set

13.52 MSTARGD - monitor for stargd

13.53 NICE - Change the K9 run-queue priority of a K9 process

13.54 NULL- file to throw away output in

13.55 PARACC - display information about hardware parity accelerator

13.56 PEDIT - Display/modify SCSI backend Mode Parameters Pages

13.57 PIPE - two way interprocess communication

13.58 PRANKS - print or set the accessible backend ranks for the current controller

13.59 PRINTENV - print one or all GLOBAL environment variables

13.60 PS - report process status

13.61 PSCSIRES - print SCSI-2 reservation table for all or specific monikers

13.62 PSTATUS - print the values of hardware status registers

13.63 RAIDACTION- script to gather/reset stats or stop/start a raid set's stargd

13.64 RAID0 - raid 0 device

13.65 RAID1 - raid 1 device

13.66 RAID3 - raid 3 device

13.67 RAID4 - raid 4 device

13.68 RAID5 - raid 5 device

13.69 RAM - ram based file system

13.70 RANDIO - simulate random reads and writes

13.71 RCONF, SPOOL, HCONF, MCONF, CORRUPT-CONFIG - raid configuration and spares management

13.72 REBOOT - exit K9 on target hardware + return to monitor

13.73 REBUILD - raid set reconstruction utility

13.74 REPAIR - script to allocate a spare to a raid set's failed backend

13.75 REPLACE - script to restore a backend in a raid set

13.76 RM - remove the file (or files)

13.77 RMON - Power-On Diagnostics and Bootstrap

13.78 RRSTRACE - disassemble scsihpmtr monitor data

13.79 RSIZE - estimate the memory usage for a given raid set

13.80 SCN2681 - access a scn2681 (serial IO device) as console

13.81 SCSICHIPS - print various details about a controller's scsi chips

13.82 SCSIHD - SCSI hard disk device (a SCSI initiator)

13.83 SCSIHP - SCSI target device

13.84 SET - set (or clear) an environment variable

13.85 SCSIHPMTR - turn on host port debugging

13.86 SETENV - set a GLOBAL environment variable

13.87 SDLIST - Set or display an internal list of attached disk drives

13.88 SETIV - set an internal RaidRunner variable

13.89 SHOWBAT - display information about battery backed-up ram

13.90 SHUTDOWN - script to place the RaidRunner into a shutdown or quiescent state

13.91 SLEEP - sleep for the given number of seconds

13.92 SMON - RaidRunner SCSI monitor daemon

13.93 SOS - pulse the buzzer to emit sos's

13.94 SPEEDTST - Generate a set number of sequential writes then reads

13.95 SPIND - Spin up or down a disk device

13.96 SPINDLE - Modify Spindle Synchronization on a disk device

13.97 SRANKS - set the accessible backend ranks for a controller

13.98 STARGD - daemon for SCSI-2 target

13.99 STAT - get status information on the named files (or stdin)

13.100 STATS - Print cumulative performance statistics on a Raid Set or Cache Range

13.101 STRING - perform a string operation on a given value

13.102 SUFFIX - Suffixes permitted on some big decimal numbers

13.103 SYSLOG - device to send system messages for logging

13.104 SYSLOGD - initialize or access messages in the system log area

  1. EMERG: messages of an extremely serious nature from which the RaidRunner cannot recover
  2. ALERT: messages of a serious nature from which the RaidRunner can only partially recover
  3. CRIT: messages of a serious nature from which the RaidRunner can almost fully recover
  4. ERR: messages indicating internal errors
  5. WARNING: messages of a serious from which the RaidRunner can fully recover, for example automatic allocation of hot spare to Raid 1, 3 or 5 file system.
  6. NOTICE :messages logged via writes to syslog device
  7. INFO: informative messages
  8. DEBUG: debugging messages options are given and cnt is set to 20.
  9. REPEATS: Indicates that the previous message has been repeated N times every S seconds since it's initial entry.

13.105 TEST - condition evaluation command

13.106 TIME - Print the number of seconds since boot (or reset of clock)

13.107 TRAP - intercept a signal and perform some action

13.108 TRUE - returns the K9 true status

13.109 STTY or TTY - print the user's terminal mount point or terminfo status

13.110 UNSET - delete one or more environment variables

13.111 UNSETENV - unset (delete) a GLOBAL environment variable

13.112 VERSION - print out the version of the RaidRunner kernel

13.113 WAIT - wait for a process (or my children) to terminate

13.114 WARBLE - periodically pulse the buzzer

13.115 XD- dump given file(s) in hexa-decimal to standard out

13.116 ZAP - write zeros to a file

SYNOPSIS: zap [-b blockSize] [-f byteVal] count offset <>[3] store

DESCRIPTION: zap writes count * 8192 bytes of zeros at byte position offset * 8192 into file store (which is opened and associated with file descriptor 3). Both count and offset may have a suffix. The optional "-b" switch allows the block size to be set to blockSize bytes. The default block size is 8192 bytes. The optional "-f" switch allows the fill character to be set to byteVal which should be a number in the range 0 to 255 (inclusive). The default fill character is 0 (i.e. zero). Every 100 write operations the current count is output (usually overwriting the previous count output). Errors on the write operations are ignored.

SEE ALSO: suffix

13.117 ZCACHE - Manipulate the zone optimization IO table of a Raid Set's cache

13.118 ZERO - file when read yields zeros continuously

13.119 ZLABELS - Write zeros to the front and end of Raid Sets

Next Previous Contents