Thursday, October 6, 2005

USB mass storage data loss

I have an Apacer Handy Steno HT202 256MB USB flash storage device. (Am I the only person who refuses to call these things "flash drives"?) It had on it a tar archive from which I wanted to extract some data. Observant readers will note that I am using the past tense. Knowing that my Windows XP box would almost certainly be incapable of extracting data from a tar archive, I plugged it into the PowerBook. It came up on the desktop immediately with no fuss. (This, of course, is in stark contrast to the considerable amount of fuss caused by plugging one of these devices into a Windows XP machine. Why would I want a dialog asking me how the device should be dealt with every time I plug it in? Just mount the file system and leave me alone!) I opened a Terminal window and navigated to the device. I asked tar to extract the data.

Now, it was a pretty big archive, probably around 100MB. And being a USB device, it didn't really all happen at once, so I left it running. The PowerBook was not connected to the mains, and, as far as I can see, it went to sleep in the middle of the archive extraction. When I woke the machine back up, the tar process was wedged hard. Control-C didn't work. Control-Z didn't work. kill didn't work. kill -KILL (inexplicably) didn't work. Nothing worked. So I got the Finder to terminate the shell. And as a side effect of something in this chain of events, the USB mass storage device terminated my data. Gone. Well, not quite: MacOS X wouldn't admit to seeing anything in the directory where the archive was, and wouldn't even give a directory listing. Windows XP saw the directory and the archive, but wouldn't read the latter. FreeBSD 5.3 saw everything, but, again, wouldn't read it.

Ultimately this was my fault.
  • The data should have been moved off the USB stick months ago.
  • I should never have been doing the extraction on the device itself.
  • I should have had the PowerBook plugged into the mains if I was doing something important.
However, is it really too much to ask that either MacOS X allows USB data transfer during sleep mode, or it doesn't fall asleep while accessing a mass storage device? Do I have to wear the entirety of the blame here?

No comments:

Post a Comment