Help: Firewire Enclosures

For a while now, I’ve been wanting to put together a small, quiet, low-power file server. Right now, I have a 1TB volume (comprised of 4 drives in a striped LVM set, so no redundancy) in my desktop machine. Since this box is also a (somewhat public) webserver and subversion server, I leave it on all the time. It’s in my bedroom, and is somewhat noisy, so I’d be glad to be able to turn it off sometimes, but I still want the public services on it to be accessible all the time if possible.

The other problem is that I’m rapidly running out of space on the volume. Right now I have about 85 GB left.

NewEgg was running a sale on the Seagate 400 GB SATA II drive around Christmas, so I bought two of them. I want two more, but I’m waiting on a better deal.

My original plan was to build a very small box with no storage in it, based on a mini-ITX board (or something similar). I’d probably buy a 2 GB flash disk for the OS. For the actual file storage, I was thinking about an eSATA enclosure, but the hardware for this is rather expensive, as I’d need a SATA port multiplier, as well as the eSATA-related hardware. I really don’t want to spend that much on it.

James suggested I look into Firewire 800 (aka 1934b). Since Firewire is daisy-chain-able, I’d only need a single Firewire port on the computer itself, and, in theory, it’s infinitely expandable (well, not really, but close enough for my needs). The assumption here is that the bottleneck will be the network (even with gigabit ethernet), so 1394b would be able to pump out the data plenty fast enough.

To start, I need two things: a 1394b controller that works well with Linux, and a 4-drive enclosure with SATA-to-1394b bridges. Bonus points if it’s fanless or otherwise very quiet, but I’m thinking I can toss this in a closet, so that’s not a huge deal.

So I started poking around. I have a couple leads on a decent 1394b controller, at an ok price. However, I can’t seem to find drive enclosures at good prices. I’d really like to spend around $100-120 on the enclosure. The best I can find is this qBOX-F, which is $190. And it’s not even quite what I want, because it requires an IDE-to-SATA adapter. And if you look at the specs, it says it only supports up to a 400Mbps data rate. Useless.

Anybody know of any 4-drive Firewire 800 enclosures that do SATA on the cheap? $100-120 (or less!) is ideal, but I guess I’d be willing to pay up to $160 or so if I had to. Alternatively, should I just stick with the older Firewire 400? (Hell, if I’m going to do that, I might as well just use USB2.) Any other options to hook up 4 SATA drives externally that I can do in under $200?

Wage Gaps

John Bogle, founder of Vanguard, says:

Think about this, and these numbers are in the battle for the soul of capitalism. The real income of the average worker in America has gone, from 1980 to 2004, from $14,900 to $15,900, OK? Well the real compensation of the CEO has gone from [approximately] $400,000 to $6 million, many times over. The CEO is making a statement and it is, “I built this company by myself and all the people that work here didn’t help at all. They are entitled to nothing.” Well, that is absurd. I have been a CEO for probably 35 of my years, 55 years in this business, an awful lot of them. I know it not to be true.

Really makes you think about the rich/poor gap and the erosion of the middle class.

Xfce 4.4.0 Released!

This is just a copy and paste of my /. story submission, but whatever:

After more than two years since our previous stable feature release, the Xfce Team is proud to announce the release of Xfce 4.4.0. This release features our new file manager, Thunar, as well as many improvements and feature additions to Xfce’s core components.

Head over to our brand-new website and take a look at our visual tour, or go straight to the downloads.

Digital cameras, libusb, permissions, hal, and other annoyances

At some point in the near past, I stopped being able to access my Canon PowerShot S30 (yeah, it’s an old non-PTP camera) as any user other than root. I poked around at the hotplug rules, and everything seemed ok. The device file in /proc/bus/usb was getting correct permissions, but still no good. I even tried setting permissions to rwxrwxrwx, and changing ownership to brian:brian, but still no luck.

So I googled, and googled, and googled. After reading through about 25 Gentoo forum posts, I came upon one thread with a post (at the bottom of page 1) that suggested something different: export USB_DEVFS_PATH=/proc/bus/usb. I thought that seemed somewhat redundant, but tried it anyway, and it worked. So, I thought, if /proc/bus/usb is no longer the default, what is? So I unset the env var, and ran gphoto2 through strace. I saw a bunch of attempts to open files in /dev/bus/usb. Wait… /dev? Sure enough, the device files in /proc/bus/usb are now duplicated as character devices in /dev/bus/usb, and of course the permissions weren’t set properly there.

So I grepped through /etc/udev/rules.d for anything related to usb, and found the rule that was creating the entries in /dev/bus/usb. I modified it to set some of the stuff to 0664, with group plugdev owning (this group is specific to Gentoo). The final line, which goes in /etc/udev/rules.d/10-local.rules, looks like this:

SUBSYSTEM=="usb_device", DRIVER!="usbhid", DRIVER!="hub", DRIVER!="hci_usb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", GROUP="plugdev", MODE="0664"

The “DRIVER!=” bits are so it doesn’t set the group and permissions on things like my mouse, keyboard, the USB hub itself, and Bluetooth. Since those “DRIVER!=” bits make that particular rule not match, udev will continue on until it hits the default rule in 50-udev.rules which will set it up for those devices.

Whew. Unplug the camera, plug it back in, and now gphoto2 works as my normal user.

Next I thought it would be cool if Benny’s new Thunar volume manager would launch gtkam when I plug in the camera. So I enabled the option in the volume manager to launch something on camera connection, typed “gtkam” in the box, and plugged my camera in. Nothing. sigh

So, I know all of this uses HAL, so I opened up hal-device-manager to have a look. I found my camera in the tree, and, of course, there aren’t any property strings in the device nodes that actually identify it as a camera. Great. Clearly, thunar-volman isn’t going to know it’s a camera if HAL doesn’t identify it as such. But, I remembered a page out of the gphoto2 documentation that mentioned something about HAL. As it turns out, HAL ships with a .fdi file that identifies all PTP-type cameras properly (apparently they share common system, subsystem, class, etc. ids), but doesn’t identify any older cameras such as mine. Fortunately, it told me what to do. First, run /usr/lib/libgphoto2/print-camera-list hal-fdi >90-camera-libgphoto2.fdi to generate a .fdi file. Then, move it to /usr/share/hal/fdi/information/90local/. Sweet. I unplug and replug my camera, and thunar-volman starts up gtkam. Finally.

Meh. So why was this so difficult? How come no one noticed that libusb changed its default device path to stuff under /dev/ instead of /proc/? I know this hasn’t been working for months and months.

Anyway, it’s done, and instead of going to bed more or less right when I got home, it’s now 2am. Brilliant.

(On a side note, yeah, I know I haven’t posted much in the past month. For those brave few of you who care, I’ll get back to that soon.)

Linux and Wireless Config

Configuring wireless on Linux is a pain. Gentoo doesn’t make the situation any easier: there’s a text file in /etc/conf.d that needs to be edited to include your SSID, keys, options, etc., and if you’re using WPA/WPA2, you need to mess with /etc/wpa_supplicant/wpa_supplicant.conf as well. If I want to change networks (say, when I visit my dad’s house), I have to edit these files and restart the interface.

There’s NetworkManager. It looks really cool. Unfortunately, it doesn’t work on my PowerBook. It never scans for wireless networks (though it appears to detect my wireless interface ok), and its logging output isn’t too useful. To be fair, I haven’t had the time to look into it too deeply (after spending hours and hours getting it to build properly, I didn’t have much patience for runtime issues), and I’m aware that the Gentoo ‘backend’ isn’t one of the more mature ones. Also: it’s ridiculously over-engineered. I do understand all the various cool things you can do with it because of how it’s designed and integrated into the desktop, but all of that stuff isn’t useful for my general usage.

Oh, and I still can’t get NetworkManager to compile without gnome-panel present, which really pisses me off. It doesn’t even build a GNOME panel applet, as far as I can tell. Regardless, I use Xfce, as we all should know by now. I’ve tried to keep the number of extraneous useless libraries and apps installed on my laptop to a minimum, so I don’t really want to install most of GNOME just for a network control applet in my systray.

(I’d just like to point out that I think NetworkManager is a great piece of software. It obviously does work very well for some people. Just because it doesn’t work for me, or doesn’t meet my needs quite as well as I’d like, that doesn’t mean I think it’s crap. It most definitely isn’t.)

I was thinking about what I care about for a wireless network manager. I realised that I don’t need/want it to manage my wired ethernet interface. (That’s a separate project: just a simple daemon, probably written in bash or perl, that configures/un-configures the interface when a cable is plugged in or removed.) For wireless, I’m thinking about the MacOS X model here. You get a little menu in the menu bar that lets you turn wireless on and off, pick networks, enter security info, and (I think, don’t have the Mac in front of me right now) open up the networking settings panel. That’s really all I need as well. I don’t need fancy system services (I’ll count on Gentoo’s startup script to try to connect to my default already-defined networks on startup), I don’t need it to take care of my ethernet interface, I don’t need it integrated into my desktop so all my apps can know whether or not I have a network connection, I don’t need a D-Bus service, and I don’t need some weirdo ‘dhcdbd’ thing (I still have no idea what this does or why NetworkManager needs it, and I don’t particularly care).

So, I think I’m going to blatantly rip off the Mac and write a little system tray icon (yes, I know, abuse of the systray; sue me) to handle my wireless connections. I was looking at wpa_supplicant, and it appears that it’s freakin’ awesome. You can use it for connections to unsecured, WEPed, and WPAed networks (among a bunch of other things most people aren’t likely to have in their home), and it has a command-line tool to control a running instance of it (wpa_cli), which can add/remove networks, set parameters, force it to reassociate, etc. So I’m thinking I’ll just require wpa_supplicant, and do network management through that. There are two things that require root access: 1) bringing the interface up and down, and 2) writing out a new wpa_supplicant.conf file so the system boot scripts can take advantage of any changes (this is optional). We don’t need root for wpa_supplicant control, because it can be configured to allow normal users to control it based on their group membership (though on my laptop, the permissions on the control socket were messed up when I first tried it).

Bringing the interface up and down is annoying, since it’s a very tiny (yet critical) action, and I need to pay attention to a bunch of security-related issues. One option is to use gksu or some other GUI method of prompting for the password. I like this from a development perspective, as it requires very little work on my part. It’s a pain from the user’s perspective, though, as I don’t feel that a logged-in user should have to enter his/her password every time they want to turn wireless on or off. A lazy option is just to require the user to set up ‘sudo’ to let them run ifconfig with root privs with no password, but I don’t really like that either. I think I’ll end up writing a setuid helper app that validates the logged-in user in some other way (perhaps using pam_console).

I’m going to attempt to do it without depending on any Xfce libraries (though I might pull in libexo for the session client and a couple other things). I’d like to create a general-purpose desktop-neutral app here. It’s certainly not going to cater to everyone, and probably won’t work on all distros without some manual fudging. I just don’t have the time or desire to spend that much time on it (yet), and I’ll have to rely on contributors to submit patches for their setup of choice, if they care to do so.

Otherwise, it’s not that hard. I’ll store wireless config in my own format in the user’s homedir. There can be an option to write out a system-wide wpa_supplicant.conf file to sync changes with the system so the interface can come up on boot with some default setup. All that’s left is a lot of text output parsing (from wpa_cli, which hopefully doesn’t change output formats between versions), and good CLI/GUI integration when setting wireless parameters and presenting feedback to the user. Since I’ll be in MD for 2.5 weeks, I’ll give it a shot, as I don’t really have all that much planned while I’m at home.

(I think I’m going to name it ‘airconfig’; when I make a website for it, it’ll likely be here. If anyone has any thoughts for a more creative name, feel free to leave a comment.)

Following Directions

Sigh. I know people don’t read directions. I know that, when you want to get someone to read something, brevity is better: the less there is to read, the more likely the recipient is to read it.

But when the first line of a Bugzilla mail says “Do not reply to this email. To comment on this bug, please visit: (URL)”, you’d think that people would, you know, just click on the damned link. How is it easier to hit reply, delete “” from the “to” line, and paste my email address in there?

(Ok, spambots, have at the bugzilla-daemon address. It goes directly to /dev/null anyway.)

So now, Xfce Bugzilla emails start with this: “DO NOT REPLY TO THIS EMAIL. Also, do not reply via email to the person whose email is mentioned below. To comment on this bug, please visit: (URL).”

Hopefully that’s clear enough, and not too long for the ridiculously lazy among us to read.

Xfmedia 0.9.2 Released

I was bored last night, and decided to try to fix a few xfmedia bugs. It was looking fairly decent, so I figured I’d put together a new release, since it’s been over a year since the last one, and several fixes have accumulated since then. Anyway, feel free to go download it from the page above, and/or check out the summary of changes.


For the hell of it, I installed Drivel. I’m not sure if I prefer blogging from a “normal” web client, or from a local client, outside the web browser.

One deficiency is that Drivel (2.0.3) seems to be unable to set more than one category for new posts. Unfortunate.

This might be out of scope for the app, but a more robust post manager might be nice. Currently you can see recent posts in a dropdown menu, but to do anything with them, you have to load the post. I’d like to have a window with a list of posts, sorted by date, category, whatever, and be able to do various things with that.

Maybe I’ll play with it again some other time; it looks like a neat piece of software.

« prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 next »