Computer-Ego
Es war mal wieder Zeit für ein neues Avatar. Wer erkennt mich?
![]()
Es war mal wieder Zeit für ein neues Avatar. Wer erkennt mich?
![]()
Today I was connecting a second USB harddrive to my NSLU2.
What you get is a few interesting effects, among them device IDs (/dev/sda, sdb…) changing depending on the order in which you attach the drives. Plus, I added a USB hub, which makes the device names change anyway.
The solution for the crazily jumping dev nodes is the udev system, which is part of Linux for quite a while now, but I never really had a need to play with it yet. But the howto is pretty nice and easy to apply.
Still, a few notes:
SYSFS{whatever} rules support wildcards, so that you don’t have to write the whole descriptor if you don’t want to. For example, “Max*” instead of “Maxtor 6” works totally fine. — That’s especially useful since SYSFS{model} descriptors often seem to be filled up with a couple of spaces at the end.BUS=="usb" will not result in any device links to be created at all. I had to define BUS=="scsi" instead. You should look at the udevinfo output as suggested in the “writing udev rules” howto, it will tell you exactly what setup is necessary for your device/drive configuration.That’s how my two new rules look like (each in one line only):
BUS==”scsi”, KERNEL==”sd*”, SYSFS{vendor}==”Maxtor*”, SYSFS{model}==”L250R0*”, NAME=”%k”, SYMLINK=”usbhd/maxtor250%n”
BUS==”scsi”, KERNEL==”sd*”, SYSFS{vendor}==”Maxtor*”, SYSFS{model}==”Y080P0*”, NAME=”%k”, SYMLINK=”usbhd/maxtor80%n”
If you have any questions, let me know.
If not, have fun ![]()