Project Hydra: the USB Multiheaded Monster

You have a bunch of servers to administer, not enough consoles and a small budget. Roll your own serial console server with USB.

Poul Petersen (petersp@alleft.com) has been working with Linux since about the first release of Slackware. Since then, Linux has permeated his desktop, laptop, living room, home Beowulf cluster and even his car. In the daytime, he pays the electricity bill by working as a senior UNIX system administrator for Rogue Wave Software.

______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

modern motherboards seem to

Anonymous's picture

modern motherboards seem to have multiple controllers, 1 port per controller or in the worst case 2 ports per controller. this could be further extended with pci cards.

furthermore you could use multiport usb-to-serial converters that provide 2,4 or 8 serial ports on a single usb device. At some point usb bandwidth may limit your system - the converters quite often require several usb transactions for a single-byte transfer.

there is a more serious limitation in the older linux kernels, like those you mention - all usb-to-serial converters share the same major device number, thus limiting number of accessible converters to 256. current kernels solve this entire mess with udev where rules are used to name the devices by location in the device tree or by the serial number, which may be available on FTDI converters, for example.

USB To USB Console

AdamG's picture

Since the linux kernel can not support console redirection to USB.

I was wondering if it would be possible to go straight from usb to usb without the need for the serial to usb convertor.

Has anybody tried this?

Adam

I would like to know as

porter's picture

I would like to know as well. I will designing a new production environment for my company. We will have 20+ linux systems. We probably are going to use some type of kvm setup for a few machines. I would much rather have a many to one USB system giving me console access to all machines from on central computer. Isn't there some mechanism already build into linux that will give us this functionality?

Re: Project Hydra: the USB Multiheaded Monster

Anonymous's picture

I'm a month behind in my LJ, but last month's issue had an article what might help fix the naming problems by using udev in newer kernels. (>= 2.5)

Kernel Korner - udev--Persistent Device Naming in User Space

Re: Project Hydra: the USB Multiheaded Monster

faheyd's picture

This article is exactly the reason why I read Linux Journal every month. Actually seeing someone doing something with all the tools linux gives you is most satisfying. My hats off to Poul!!!!

Re: Project Hydra: the USB Multiheaded Monster

Anonymous's picture

can you provide your source for "Maxxtro adapters based on the pl2303 chip for about $15 each". I went looking for that on froogle/google and managed to land a heap of sites in .ru, which I'm not in the mood to buy from, really.

TIA.

Is this really cost effective?

Anonymous's picture

Let's just say that the serial adapters are only going to cost us $25.00 each, and let's say we are only going to do 16 ports. For the $400 we are going to spend, it might be cheaper to get a used terminal server (16 or 32 ports) for the same price and have a dedicated hardware device.

Personally I am using the lantrontix series products and have several doing all my serial consoles.

Re: Is this really cost effective?

petersp's picture

I think so. First, it seems a little unfair to compare used prices of lantronix hardware to "new" USB hardware prices. The list price of a 16-port lantronix is roughly $2,200 new (though admitedly you could beat that by shopping around a little). And the condition that you will only purchase used hardware can create a deficit when you need a new terminal right away. That is, the ease of extensibility of using USB means that I can drive down the street and spend $40 and have enough hardware to hook up the two new machines we just received; The hardware is common and available everywhere and I don't have to buy a 16-port server for two new machines. Also, the prices quoted in this article are not the best you can do. I have on occassion spotted good 7-port USB hubs for $12, and 4-port hubs for $5.

Finally, there is a hidden value. This solution is all open. You can do other things with it, like monitor UPS, control other serial devices, etc. It's completely flexible. One of the things I've been working on lately is using our old "useless" laptops as remote consoles. All of the virtual terminals are sessions back on the main console server, so we can have as many "heads" spread around the server room as we like, and we can move them to any location with a network port without having to log in twice...

Of course, the lantronix units provide a nice clean solution. One of the drawbacks of using USB for serial consoles is that you can end up with a "spiderweb" of cables. So if you're planning a new rack of 32 servers and you've got the money then a lantronix unit is a great solution. But if you've got a server room like ours with every different kind of UNIX hardware imaginable and non-rackable cases spread all over the place, you might find that the flexibility of using a USB solution is desireable.

-poul

Re: Is this really cost effective?

Anonymous's picture

Poul has too many computers.

-makisupa

Re: Project Hydra: the USB Multiheaded Monster

Anonymous's picture

ohh yes, great article - thanks a lot for sharing poul.

Re: Project Hydra: the USB Multiheaded Monster

Anonymous's picture

First off: great article! I'll be trying this out... Thanks.

About the software redirection: one of the kewl things bootloaders can do is give serial-console access. Hence, an option to pass parameters to the OS kernel before bootstraping (boot into initrd.img on ramdisk, and (try to) fix stuff from there) .

In Linux, to /etc/lilo.conf add "serial = 0,9600n8"
In OpenBSD, to /etc/boot.conf add "set tty com0"

(All? Others have such an option also - hell one might be able to use Linux or even FreeDOS as a bootloader/rescue for NT :-)).

Better yet, some mobos seem to be supported by LinuxBIOS:
http://www.linuxbios.org/status/index.html

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix