Chapter 9. Firewire

Table of Contents

External harddisk
Digital video camera

External harddisk

I recently bought an external harddisk for backups, using FireWire to connect it - as USB is too unstable for me. To use it, I need the following modules:

  • ieee1394

  • ohci1394

  • sbp2

I had some problems getting the drive to work, because you have to do all in a certain order:

  1. Don't connect the disk/cable!

  2. Load the three modules listed above in the given order

  3. Connect the cable now

  4. Do a cat /proc/scsi/scsi to see if something happened, or a classical dmesg

  5. Mount the harddisk

Whenever I attached the cable (with powered harddrive) before loading the modules, I never got the disk working.

I also had another problem: Copying from the disk was incredible slow, taking about 20 minutes for 50Mib. A dmesg showed me the following lines:

Nov  1 23:18:33 bogo ieee1394: sbp2: aborting sbp2 command
Nov  1 23:18:33 bogo scsi0 : destination target 0, lun 0
Nov  1 23:18:33 bogo command: cdb[0]=0x2a: 2a 00 00 01 00 d1 00 00 06 00
Nov  1 23:19:03 bogo ieee1394: sbp2: aborting sbp2 command

Everywhere those "aborting sbp2 command" lines. Searching the web for that string unveiled the solution: I need an extra module parameter, serialize_io=1. I added it to /etc/modules.conf, had no time to test it and came back two weeks later with the same problem. What happened? The file had been re-generated by modules-update, and my changes were gone. This time I did it correctly and created a new file /etc/modules.d/sbp2, filling it with the following line:

options sbp2 serialize_io=1 max_speed=2

After that I run modules-update causing the modules.conf to be regenerated, and since then my disk works fine. I doubt that the max_speed=2 parameter is necessary, but I have no means to change it as it works :)