June 22, 2004

Sun Gigabit 1.0 (vge) : When you don’t have the driver CD anymore

Filed under: Sun Microsystems — octo @ 9:29 pm

The vge (Sun Gigabit Ethernet 1.0) card is an SBus 1000base-SX Ethernet card, which Sun unceremoniously discontinued in favor of the somewhat better 2.0 GEM card. The drivers were bundled with the card on a CDROM, which isn’t a seperately orderable item from Sun. These cards show up on eBay and such and are cheap enough (mine was $100) so they may have some allure, even if the drivers only work in Solaris 2.5.1 - 2.6 for Sparc.

Which, in my case was just fine, since I can’t upgrade the system beyond 2.6 anyway. (Long story)
I love SunSpectrum tech support. I’m milking it for all its worth while we still have coverage.

The VGE card is officially end-of-life, and Solaris 2.5.1 and 2.6 are in “Vintage Phase II” support. And the E3000 I’m installing in isn’t even under contract. So Sun really went the extra mile for me on this… I can’t say enough good things about them.

According to the Sun docs for the “Gigabit Ethernet 1.0″ card, the software package that contains the driver is SUNWvge. If you search aroung for that package name, the best you can find is patch 106178-03. And it’s for contract customers only. It isn’t too useful because patchadd or pkgadd won’t let it be installed automatically if you don’t already have the driver installed. You can probably extract the /kernel/drv/vge from it and try to load that manually, but it didn’t seem a good idea to me.

After a lot of going around in circles trying to find a source for the CD or at least the files on it, Sun came through with a cpio archive of it that they left for me in a hidden directory on the SunSolve ftp server. It would be wrong to link to it directly (and Sun has probably removed it by now) so we’ll just cheat and put copies of it elsewhere. ;)

So, here goes:

If you install the software before the card, reboot with -r afterwards. You can install the patch on top of the fresh software install without a reboot in between; or at least, it worked for me. You may want to try the OBP test procedure in the manual if you’re not sure if your card works or not.. and try the VTS tests afterward if you can.

NFS won’t seem much faster with this card installed, because the stock network stack settings assume slower links and slower machines. You can tune some of these kernel settings with a script that does:

ndd -set /dev/tcp tcp_recv_hiwat 65536
ndd -set /dev/tcp tcp_xmit_hiwat 65536
ndd -set /dev/tcp tcp_cwnd_max 65536
ndd -set /dev/udp udp_recv_hiwat 65536
ndd -set /dev/udp udp_xmit_hiwat 65536

This is actually recommended on page 10 (page 40 in the PDF) of the above manual 805-1136. On our E3000 I saw NFS file transfer speed more than double, just with these changes. Speed was > 17MB/sec, compared to about 6-8MB/sed for 100Mb/s Ethernet. Not a factor of ten faster, but still decent enough to knock over an hour off our backup window.

- J. Akari

Using a WinTV in a Sun

Filed under: Sun Microsystems — octo @ 9:29 pm

When I originally wrote this, the described procedure was the only way to use a WinTV card under Solaris/SPARC.
Today, if you want support for a WinTV card on Solaris/SPARC, there is a opensource driver available here. However, if you want to make your WinTV card work with a SunVideo-compatable driver, read on…

Ever want to have video capture abilities on your PCI-based Sun
workstation, but couldn’t stomach the cost of supported solutions? Well,
one of the supported cards just so happens to use the exact same chip as
the popular low-cost WinTV cards. In fact, getting the driver from this
supported card to work with the WinTV wasn’t all that difficult.

Note: This procedure was used for a bt878-based WinTV with the 64-bit
kernel/driver on Solaris 8. However, it should be easy to adapt it to
other configurations with a small amount of effort.

Step 1: Go to the ViewCast website and download the drivers for their
Solaris-supported “Osprey 150″ video capture board.
(version r130 used here)

Step 2: Install the drivers on your system. This procedure should work
flawlessly, and the driver will load just fine. However, the included
software won’t yet function properly. We’ll fix that in the next step.

Step 3: Driver hacking time. Here’s a snapshot of what you need to do to
“fix” the driver so it will work with your WinTV card:

# cd /kernel/drv/sparcv9
# adb -w o1c
o1c_open+0x288,5?ai
o1c_open+0x288:
o1c_open+0x288: mov     %i2, %o0
o1c_open+0x28c: tst     %o0
o1c_open+0x290: be,a,pt %icc,o1c_open+0x298
o1c_open+0x294: mov     0x6, %l2
o1c_open+0x298: cmp     %l2, 0x0
o1c_open+0x294?X
o1c_open+0x294: a4102006
o1c_open+0x294?W a4102000
o1c_open+0x294?ai
o1c_open+0x294:
o1c_open+0x294: clr     %l2
$q
#

What we did there, was alter the open function for the driver so that it
won’t fail if the card’s ID doesn’t match what it expects.

Step 4: Reboot the system.

Step 5: Enjoy! Also, don’t forget to configure SunVideo compatability
with “/opt/MMACo1c/bin/svc_install” so you can use the full range of video
capture software on your system. Only two things to note… First of
all, since the Osprey 150 is only a capture board, the tuner functionality
of your WinTV won’t work. Just use something like a VCR to feed the video
inputs of the card and the audio line-in of your system. Second, it
seems that ViewCast doesn’t exploit the special overlay features of the
bt878, so all video will pass through system memory and eat processing
power. (the PC WinTV drivers have the card itself do DMA transfers
directly to video memory, which avoid this problem)

June 11, 2004

Lightwave ConsoleServer 800

Filed under: SysAdmin — octo @ 9:41 am

Intro

The ConsoleServer 800 is your basic serial console server.
It has several serial ports for hooking up to serial console ports
on your servers or network devices, and has both a serial terminal
port and an ethernet port for your remote access to these consoles.
It is likely that information here will be relevant for other units
from the same product line, as they probably differ on little
besides port count.

An excellent review of the CS800 can be found here on sunhelp.

Password recovery

(I apologize if this section is poorly written. It was quickly thrown together, and will hopefully soon be cleaned up)

What is unique about the CS800, is that there is no easy way to reset a lost
administrative account (called “root”) password on the device.
There is no magic jumper, battery, capacitor, or anything like that.
The configuration is stored in non-volitile memory, and there is no
simple reset method. However, no one ever said the actual guts of the CS800
were difficult to decipher.

In essense, the CS800 is based around a common Motorola 32-bit microcontroller
known as the MC68332. This chip has a nifty feature called
“background debug mode”. With this feature, more commonly just called “BDM”,
the chip can provide a runtime debugger interface. Now, here’s the best
part… The nice folks at Lightwave placed a pin header on the circuit board
of the CS800, and clearly labeled it “BDM”.

To use this special port, you need a BDM interface. You could spend a few
hundred on a commercial one. However, Motorola provides schematics and
software for a cheap and easy-to-build one.

You can find the schematics for this BDM pod in application note

AN1230
.

With this
unit, you can talk to the BDM port with the parallel port of a normal PC and
Motorola’s little DOS-based program known as BD32.

Once you have this all up and running, you will be able to view the contents
of any arbitrary memory address on the CS800. Look around address “$121740″,
and you will find the root password stored in plaintext.
Use this to log in normally as root, and change the password to whatever you feel like.

CLARiiON FC Array Information

Filed under: Storage — octo @ 9:11 am

I recently came across one of these units, and thought I’d share my experiences
learning about using one. My perspective is as the second-hand buyer
hobbyist, so my collected information will be of more use than some official
documentation to this crowd. For example, I do not assume you magically
have access to the official configuration software frequently mentioned
in the vendor documentation.

For information on the particular hardware that I have, see
this page.

This unit is frequently sold as an OEM’d item, and thus can be found under a
variety of brand names. So far, I’ve been able to uncover the following:

The RAID system, which I’ll simply refer to as a 5400 from now on, is found
as a number of separate boxes. They include:

  • DPE - Contains two (SP) controllers, two power supplies, and space for 10 hard drives
  • DAE - Contains two power supplies, and space for 10 hard drives
  • SPS - Proprietary UPS, required if you want to enable write cache


Getting to the FCLI

One of the first problems you are likely to run into, as a second-hand
user, is a complete lack of the “official software” for configuring and
managing the device. Thankfully, you do not really need this software.

The 5400’s SP (controller) boards each have two serial ports. One is labeled
“SPS” and the other one has a picture of a terminal on it. Your first step is
to plug a terminal into that port with a picture of a terminal. (By “terminal”, all I mean is something that lets you, as a human user, do RS-232 I/O. You can either use a real serial terminal, or a program on your desktop like minicom or HyperTerminal.) Then, set your terminal to 9600 bps, 8 bits, no parity, 1 stop bit (commonly referred to as simply “9600 8N1″). Then, fire up the 5400
unit. If all goes well, you should see startup messages. If you see nothing,
then you need to stick a null-modem adaptor on your cable.

If you are lucky, this will get you to a prompt that says “fcli>” and you are
good to go, and can skip the rest of this section. Otherwise, the messages
will likely stop after printing “Entering Serial Application Mode”.
Type: {}{}
This is what I believe to be the magic debugger break sequence. It will
show you the contents of all the SP’s registers, and give you a prompt.
Type: menu
You should now get a menu with lots of low-level scarry-looking options.
Select: 9 (Nonvol Menu)
Select: 12 (Serial Mode)
Choose: 1 (fcli mode)
This toggles whether the FLARE code starts in FCLI mode, or Serial Application Mode
Select: 0 (Exit)
Select: 12 (FLARE Menu)
Select: 5 (Start FLARE)
Now the FLARE firmware should start up again, but this time you should get an
“fcli>” prompt. From here, you can access all the commands needed to
manage the array.
(shamelessly paraphrased from here.)

I’ve taken the liberty of putting together a document showing all of the
FCLI commands, and their associated online help. You can find it here:
5400 FCLI Commands

If you are using a Dell PowerVault 650F (CLARiiON FC5700, so the SP will
probably claim to be a “5600″), and wish to break out of “Serial Application
Mode”, the magic break sequence is “@$@$”. I cannot give
detail the other steps for the 5600 platform, but I’ve been told that they
are similar.
The FCLI commands for the 5600 SP are detailed here:
5600 FCLI Commands


The Supplemental Power Supply (SPS)

The next thing you will want to to, is attach an SPS. What is an SPS?
Essentially, it is a special proprietary UPS designed to talk with the SP.
Without a fully functional and charged SPS, you cannot enable write cache.
On one hand, enabling write cache without an SPS is a pretty bad idea.

To connect your SPS, you use a special cable that has an RJ-12 plug on one
end, and a standard DB9 plug on the other. The pinout for this cable is
as follows:

RJ-12 plug
(top view)
 /-------+
 |-------|--6 ---- 3 (on DB9)
 |-------|--5 ---- 2 (on DB9)
||-------|--4
||-------|--3
 |-------|--2
 |-------|--1 ---- 5 (on DB9)
 -------+

On the other hand, as a second-hand user, it is highly unlikely that you will
actually be able to get your hands on a real SPS. So, we do the next best
thing.

Basically, the goal is to figure out the protocol the SPS uses to
talk to the SP, and emulate it. This way, you can have a self-programmed
microcontroller or computer with a couple serial ports, acting as a go-between.
The idea is that you would have bought a standard UPS, and have a way to find
out its status. You then report this information to the “SPS” port on the SP.

From some independent tinkering, I’ve actually been able to
experimentally learn a great deal about how the SP talks to its SPS.
I also finally got my hands on a real SPS, and did some sniffing which verified
some of my guesses and corrected others. In any case, I now have a pretty good
understanding of how the communication works.
The communication uses standard RS-232 serial over the “SPS” port on the
back of the SP. The SP then periodically sends out a query, to which the
SPS responds. Depending on this response, any manner of SPS status can be
indicated. It also appears as though the SP is capable of controlling the SPS
to a limited degree. When I unplugged the SPS, the SP flushed the write cache.
Then, it sent a command to the SPS, after which the SPS promptly shut itself off.
I suspect this is to preserve SPS batter power, just in case, as it is really not
important for the SP to remain online once the cache is flushed.

SPS Emulation

Due to popular demand, I have finally finished an initial release of my SPS
emulator daemon. While it probably has a lot of room for improvement, it
does get the basic job done. It consists of a daemon that sits on your
serial port and manages communications with the SP, and also has a control
program and shutdown script, so you can make it interact with whatever software
you use to monitor the status of a normal UPS.

I’ve written and tested this code on FreeBSD, though it should probably and run
just fine on other ‘nixes. If not, feel free to send me the modifications
needed to make the source more portable. Also, refer to the README file
for installation and usage instructions

spsd-0.2.tar.gz
(note: updated to
incorporate support for the BBU test procedure, in response to the
BATTEST message)

spsd-0.1.tar.gz
(initial release)

SPS Protocol

SP Query:
  ASCII: "COND?" + 0A
  HEX:   43 4F 4E 44 3F 0A

SPS Responses:
 SPS removed:
  ASCII: nothing
  HEX:   nothing

 SPS not ready, battery charging:
  ASCII: "0" + 0A
  HEX:   30 0A

 SPS battery on-line, main power off-line, running on battery:
  ASCII: "1" + 0A
  HEX:   31 0A

 SPS Enabled, battery fully charged, system cache enabled:
  ASCII: "2" + 0A
  HEX:   32 0A

 SPS testing battery
  ASCII: "128" + 0A
  HEX:    31 32 38 0A

 SPS faulted: (this one discovered experimentally, not seen from actual SPS)
  ASCII: "10" + 0A
  HEX:   31 30 0A

SP Command:
 Cache flushed, shut down SPS:
  ASCII: "STOP" + 0A
  HEX:   83 84 79 80 0A

SPS Response:
 Ok, going dead now:
  ASCII: "" + 0A
  HEX:   0A

SP Command:
 BBU test routine:
  ASCII: "BATTEST" + 0A

  Procedure:
   Reply with a simple 0A response to the "BATTEST" query.
   Then, send a "128" in response to the next several "COND?" messages,
   then send "0" in response to the next several "COND?" messages after
   that.  Finally, revert to the normal behavior of sending "2" in
   response to "COND?".

(I’m sorry if my BATTEST description looks confusing, but it was recently
discovered, and is more of a procedure than a simple response. Thus, it
doesn’t fit nicely into the formatting with which I described the rest
of the protocol.)


Additional documentation


EMC Fibre Channel Storage System (CX-Series)
Configuration Planning Guide


EMC Installation Roadmap
for CX-Series and FC-Series
Storage Systems


EMC FC-Series and C-Series
Storage-System and
EMC ControlCenter Navisphere
Event Codes


EMC ControlCenter Navisphere Analyzer
Administrator’s Guide


EMC ControlCenter Navisphere
Command Line Interface (CLI)
Reference


EMC ControlCenter Navisphere Manager
Administrator’s Guide


EMC CLARiiON Open Systems
Configuration Guide