SCSI Trouble on My Server

25 April 2004

I got the good idea that I needed to mount up an extra 18G drive on my server to store music. I knew the block length was set to 516 instead of the normal (and usable) 512, so I'd have to low-level format it. I started at about 11:00pm and much trouble ensued.

I got curious in the SCSI BIOS and kicked off a low-level format in there. This, of course, meant the box wasn't serving anything, and I had no idea how long it would take. After 10 minutes, I got impatient, and killed it to see what Linux would do with it. It was not pleased with me (MEDIUM ERROR), so I went back into the BIOS and did it again, but waited.

While I waited, I got impatient again regretting using the BIOS for this. Instead of touching the server, I took out my impatience on the backup gentoo box, and formatted another drive using my directions from the last time. I stayed the hell away from the BIOS this time, and just used scu. Specifically, I did this:

  1. # scu -f /dev/sg0
  2. scu> set bypass on
  3. scu> set device block-length 512
  4. scu> time format defects primary options dcrt
About the time I got this started, the BIOS format on the server finished, so I could boot up, find that it didn't change the block length for me, and then I kicked off the same scu process on the server.

I made file systems on it, mounted it up, but got disconnect and reset errors from my SCSI interface for that drive. I rebooted, tried again, but had the same issue. I ripped the case apart again and swapped in my other drive. It's about 2:00AM by now.

That drive worked, so I copied 10G of music to it. I left it at 3:00AM and continued a bit in the morning at 7:00AM. I unmounted it, tried to remount it in a new place, and got the disconnect errors again. I ripped open the case again, unplugged the drive from the adapter, booted the machine again and left it.

Having had a moment to think about it now, these drives work fine in my older server with the slower SCSI card. That card tries to talk to them at something like 10Mb/s. My card in the new server seemed to think it could talk 40Mb/s to the drive. I have to wonder if I just need to tune the access speed down a bit to get it working reliably. I'll have to try that tonight.

In the beginning of all this, when I rebooted, my computer seems to have decided it can release its IP to the DHCP server, so I got a new IP address after 1.5 years of having the same one. My handy DNS update script worked fine, but the script that puts my IP in the /etc/hosts file and makes it available to my firewall scripts didn't work -- my firewall script used the old IP and pretty much locked up any outgoing traffic. That took a moment to figure out, and I still don't have the script working properly.

I just wanted to collect all my music in one place instead of being distributed across several CDs and a laptop. Ultimately, I hope to be able to just load up anything I want on my laptop and be good for a while. When I get tired of it, just delete it and load it again. The server will have the central repository. I'm even toying with the idea of have a process to burn random mix CDs for in the car. First, though, I must get this drive working.

Update (25 April 2004): I bumped the speed in the SCSI BIOS down to 10Mb, just like the gentoo box, and now the drive is working fine. It's been mounted up and functioning for over a day now with no incidents. That's a relief.

For everyone's reference, here's the ID of the drive, in case someone else looks for this sort of information:

Host: scsi0 Channel: 00 Id: 03 Lun: 00
  Vendor: FUJITSU  Model: MAA3182SCX       Rev: 2412
  Type:   Direct-Access                    ANSI SCSI revision: 02


Filed Under: Computers Linux