Slashdot Mirror


Hot-Swapping IDE Drives?

Patman asks: "I've recently taken a new job where I'll need to be making drive images and such for quite a few IDE drives - say a few a day. I need the ability to 'hot-swap' IDE drives into a running Linux or Windows system. The systems that I'm using are fairly standard IBM desktop PCs, I've found references on Google to IDE->USB converter cables and IDE->USB converter boxes. Does anyone have experience with those? Some come with drivers for Windows - has anyone used them under Linux? Does the mass storage USB code deal with them accurately? Barring that, does anyone have any other ideas? External hot-swapping would be ideal, although an internal solution would be doable, too."

11 of 122 comments (clear)

  1. Delayed write bug in Win2k by ka9dgx · · Score: 4, Informative
    There seems to be a deep seated bug in Windows 2000 server when it comes to delayed writes and USB. The USB spec calls for a maximum transfer of 128k, but Win2k attempts a 512k trasfer after it's cached up a few writes, which results in "Delayed Write Failure", and lost files.

    I can't seem to find any fix, the driver software doesn't permit caching to be disabled in the advanced properties box, so it's rendered an otherwise fine 120 GB Western Digital drive as an expensive paper weight, at least as far as Windows is concerned.

    From what I've been able to read, it appears that Linux knows better, and respects the 128k per packet limit, and doesn't have this issue, but I've not confirmed that yet.

    It's a bitch to be doing a backup (using copy) of 45 Gb of photos, and lose a few along the way.

    --Mike--

    1. Re:Delayed write bug in Win2k by Spoing · · Score: 4, Interesting
      I have 2 seperate dual USB 2 and Firewire cases, and both drop files, has bus time outs, locks the bus or the whole machine...under Linux using EXT2!

      This only happens on large transfers (say dd of a 5 or 20gb drive, or cp of the files). Small files or copying one a small number of files works fine. The drives I use are from Maxtor; 1 120gb, and another 40gb.

      Really #@#@$ me off. If anyone has encountered this with the 2.4.22 and earlier kernels and knows a fix (even if "move to 2.6.x") I'd appreciate knowing it!

      1. It can't be the drives since I've used different ones (unless Maxtors have some generic problem).

        It can't be the bus since I've used USB, USB 2, and Firewire.

        It can't be the chipset since the two cases use different chipsets from different manufactureres (and yes, I checked that they were supported before purchase).

        It can't be the machine itself since I've tried connecting it to a couple different systems (all Intel, one Celeron 1.4g desktop, another PIII 500 laptop).

        Tried formatting the drives in the external case, and reformatting them in the desktop first.

      --
      A firewall can not protect you from yourself. Turn off what you do not need. Do not use the firewall to do your work.
  2. Firewire by selacious · · Score: 3, Insightful

    Grab a IEEE1394 IDE bridge, preferably bus powered. Linux should support these devices and they are easily, externally hot-swappable. I've had success with the SuperDriveDock from Wiebetech, although there are certainly cheaper models out there.

  3. I tried that once.... by Louis+Guerin · · Score: 4, Funny

    Hot-swapping an IDE HDD on my winXP box. Not sure what I was thinking, but I burned two HDDs and a motherboard doing it...

    Oh, you mean WITHOUT destroying your system? Sorry, can't help you...

    L

    1. Re:I tried that once.... by man_ls · · Score: 3, Informative

      I've hot-swapped (both add and remove) IDE interface drives in WinXP with no problem.

      My guess is you removed the data cable before removing the power.

      Procedure to Remove Fixed Hard Disks:
      1. Remove Power Cable from Drive
      2. Remove Data Cable from Drive
      3. Scan for Hardware Changes in Device Manager.

      No data loss will occur as long as no open file handles are present on the disk at the time of removal. Windows XP will detect and gracefully dismount/remove references to it. If there are open file handles, data in the write cache will be lost, and WinXP will freeze up for a few minutes while waiting for the IDE timeout.

      Procedure to Add a Fixed Disk:
      1. Connect Data Cable
      2. Connect Power Cable
      3. Scan for Hardware Changes in Device Manager

      Windows will read the drive signature and make it available under My Computer.

    2. Re:I tried that once.... by jpop32 · · Score: 3, Informative

      If there are open file handles, data in the write cache will be lost, and WinXP will freeze up for a few minutes while waiting for the IDE timeout.

      IMHO, removing or disabling the drive from device manager should ensure you have no open files and flush the cache.

    3. Re:I tried that once.... by schapman · · Score: 5, Informative

      theres a reason not to do this... If you look at SATA, one of the reasons its safe to hot-swap is that on the power connector, the pins are different lengths. This way, when u connect/disconnect, you wont have shorts happening. I think its the ground connector on the power cable that connects first, disconnects last... Old school PATA devices dont have this, so every time you connect/disconnect while running... you have the risk of shorting and blowing your drive/MB

      --
      Wouldnt you like to be a pepper too?
  4. FireWire by haunebu · · Score: 3, Informative

    Wouldn't FireWire be better, considering FireWire-IDE bridge enclosures are readily available and actual throughput is much faster usig the Oxford 911/922 chipsets?

    --

    Blue skies, Barthy Burgers, girls...

  5. Buffering Bug in Linux by Crutcher · · Score: 4, Informative

    Okay, I use a USB drive enclosure on Linux to do my backups, and it works pretty well.

    However, it took me a very long time to learn to set the 'sync' option in the mount options. USB writes much more slowly than a normal harddrive, and if sync isn't set, it is possible for the system to buffer all writes to the drive up to the point where it consumes most system memory, and the machine becomes unresponsive.

    Perhaps this is fixed in 2.6; but it doesn't really matter. You are doing backups, the backup isn't done until it's all on the disk, so setting the sync option just means that your writes "seem" to take longer, and your unmount at the end seems faster. Without sync, you pay for the buffering in the unmount, which will hang while it finishes syncing the disk.

    --

    -- Crutcher --
    #include <disclaimer.h>
  6. Use IDE-Raid: 3Ware will do the job for you! by darkfox · · Score: 3, Informative

    Go to 3Ware

    It is really well supported in Linux (and been since a while) as well as in M$. It supports Hot-Swap and Hot-Spare...

    --
    Francis Provencher
    "What if the bird will
  7. Windows XP has an option for Firewire. by Futurepower(R) · · Score: 5, Informative

    Windows XP has an option for not caching Firewire writes. You can then just remove and reconnect the drive without any other adjustment and without data loss. If you have audio on, there is a tone when the drive is connected or disconnected.