I haven't had quite the same problem, but this might shed some light...
As of 10.7 I've noticed that Lion is much, much more persnickity about having access to its peripherals. If a peripheral goes offline (e.g.: sleep mode) Lion will often freeze up until it comes back. This is particularly sensitive in regard to disk drives, and it tends to bite you more often than seems logical.
For instance, I use an external RAID array (SmartStore DS4600) for Time Machine. Under 10.6, I absolutely NEVER experienced this problem, but after the 10.7 upgrade it made both Time Machine and, for the most part, the DS4600 unusable. The DS4600 is a "smart" (or "green") drive... if you don't touch it for 10 minutes, it powers down each of the array drives. This is pretty common, most drives are designed to sleep after some period of time... but with 10.7, that meant every time the drive was 'touched' it would spin up, and being a 4-drive RAID array, that takes 40 seconds or so! When I do a Spotlight query, it might touch the drive. Open a new finder, if I'm unlucky, it touches the drive. TIme Machine of course, always touches the drive.
Now you can imagine, with a 40-second spin up time I was running into constant "lockups." Worse, it seems that the slow spin up time would cause Lion to "give up" now and then... probably too slow for it, and it just would stay locked up maybe 1 out of 5 times. That was a daily experience -- sometimes a few times a day.
My short-term solution was to disconnect the drive unless I wanted Time Machine to take a snapshot, then I'd disconnect it again. This, as a rule, pretty well sucked as a solution.
I finally found a better one, and it was a two step process:
- I thought if I could keep the system touching the drive, it wouldn't sleep. Turns out it was a breeze to do this, I just created a LaunchDaemon job that basically touches a file in the DS4600 root directory every minute. It's set up as a system-wide daemon, it only touches the drive once a minute for an instant, and as a system-wide daemon it is always running. Also, it checks to make sure the drive is mounted before doing it's thing. Works like a charm.
- But, alas, after the first day I came back and found my system asleep... I shook the mouse, it started to wake up and... the system was frozen. What the heck!?! Oh, yea... system went to sleep, so the drive went to sleep, and Lion "gave up" again when it woke up. Easy enough to fix, I told my laptop never to sleep and never to shut down the hard drive while it's on A/C power. Perhaps not ideal and perfectly green, but these laptops run very quiet and use low power when they aren't "busy," so it works.
For those interested in the nitty gritty, here's what I did to set up the LaunchDaemon:
First, create a file (named "com.hyraxintl.ds4600touch.plist" in my case, name it whatever you like) in the /Library/LaunchDaemons directory. This is what the file should contain:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.hyraxintl.ds4600touch</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/ds4600touch.sh</string>
</array>
<key>Nice</key>
<integer>1</integer>
<key>StartInterval</key>
<integer>60</integer>
<key>RunAtLoad</key>
<true/>
<key>StandardErrorPath</key>
<string>/tmp/ds4600touch.err</string>
<key>StandardOutPath</key>
<string>/tmp/ds4600touch.out</string>
</dict>
</plist>
Make sure the file is owned by the "root" user.
Then, create your version of the /usr/local/bin/ds4600touch.sh script. Mine looks like this:
#!/bin/sh
if [ -d /Volumes/DS4600 ] ; then
date > /Volumes/DS4600/.ds4600touch
else
echo `date` "DS4600 not mounted"
fi
In both of the above files, you'll need to make changes for your local machine and disk. For instance, my drive is mounted at /Volumes/DS4600, yours will be different.
That's about it. Once you reboot, your system will start touching your external drive every minute. Just be sure to change all of the paths accordingly!
After all of these changes, I haven't experienced the same problems with locking up that I used to. Time Machine seems to be working just as well as it used to under 10.6, thankfully.