Terastation Management

Aus MvOWiki
Wechseln zu: Navigation, Suche

Here are collected some information about Board Management Functions beside the main processor such as Fan controlling, Watchdog, LED switching, Power On/Off, Reboot, Flashing, UPS.

There are two different controllers on the board for these functions. See http://www.terastation.org/wiki/Hardware.

Monitoring Voltage, Temparature and Controlling Fan[Bearbeiten]

There is the SMSC EMC6D102-CZC controller on the board for voltage and temperature monitoring and fan controlling. This is a standard chip who is supported by the Linux 2.6 kernel and the lm-sensors package. Have a look at Terastation Sensors about this part of the board management.


Second there is a programmable Microprocessor Motorola MC68HC908JL8. This processor is responsible for LEDs, power on, power off, watchdog, communication with UPS. The software running at this processor is not public available so far as I know. Software running on the main processor communicates over a serial line represented as ``/dev/ttyS1`` under Linux with that processor.

In the original firmware from Buffalo there are many programs and scripts communicating with the AVR over that serial line. There are some information about this protocol available in the net. But the protocol differs from box to box and from firmware version to firmware version. So these information are not really reliable.

To the good for some of the functionality of this management processor there is a command line interface available. It is a utility called miconapl. This tool is provided by Buffalo as part of the firmware. The information in this document is about the miconapl which is contained in official firmware from Buffalo version 2.05.

The license of the buffalo firmware does not allow that the binary is published here. That's why you have to use your own one.

To use some of the original tools from Buffalo they could be run in a chroot jail to not interfer with the clean Debian Etch Installation.

Here comes the content of the jail located under /var/lib/legacy_apps/. If the files are copied using cp -a they are getting all their original attributes (special files, links, owner, permission and so on).


Now there could be created a script in /usr/local/sbin/miconapl:

 /usr/sbin/chroot /var/lib/legacy_apps /usr/sbin/miconapl $*

Now it should work the same way like miconapl on the original firmware except that is moved to comply with Debian path guidelines to /usr/local/sbin/.

LED controlling[Bearbeiten]

There are many commands to control the LED in front of the TeraStation:

 /usr/local/sbin/miconapl -a ledusermode on
 /usr/local/sbin/miconapl -a ledenet 10|100|1000 on|off
 /usr/local/sbin/miconapl -a leddiag on|off
 /usr/local/sbin/miconapl -a ledpower green on|off|blink

Reboot the system[Bearbeiten]

Rebooting the system is quite simple:

/usr/local/sbin/miconapl -a reboot_start has to be executed just when the restart process starts. In the original firmware the call to this script is located in a script in /etc/init.d/ which is the first script to be executed in runlevel 6 (reboot).

So we create a script /etc/init.d/tera_reboot with the following content:

 stop() {
   /usr/local/sbin/miconapl -a reboot_start
 case "$1" in
     echo "Only command 'stop' supported."
     exit 1

Now create the link for the run level 6:

 ts1:~# update-rc.d tera_reboot stop 10 6 .