Safe to Unplug FireWire Drive In Sleep?

Discussion in 'Mac Basics and Help' started by sanford, Jan 23, 2008.

  1. sanford macrumors 65816

    Joined:
    Jan 5, 2003
    Location:
    Dallas, USA
    #1
    I know that FireWire is hot-swappable, but when you're talking about FW data storage, like external hard drives, you need to unmount the drive volume(s) before you unplug them, to make sure the Mac isn't writing to the drive when you unplug it, possibly corrupting your data or some even writing to the wrong place on the drive making the drive unmountable in future.

    But what about in sleep? I have MacBook connected to a USB2 hub, an external FW drive with 2 partition volumes one of which is my Time Machine partition, an external display, and of course power adapter. This is a higher-end external FW drive, and when I put the MacBook to sleep, even though the FW drive has its own power supply, it detects the host device is asleep, it spins down the actual disk drive and goes into a low, low power mode, essentially it turns itself off while the MacBook is asleep, turning itself back on when I wake the MacBook. I'm in the habit, when I want to use the laptop as, well, as laptop, like first thing in the mornings, of yanking all the cables while the MacBook is still asleep. I start with the FireWire drive, to make sure the MacBook doesn't come out of sleep before I've disconnected the FW drive. Pulling the mini-DVI to DVI-adapter never seems to wake the MacBook, but pulling the USB hub and USB device connected to the two ports does. Pulling the FW drive doesn't ever wake either the MacBook or the "turn on" the FW drive, but I pull it first just in case.

    I always get the "device improperly removed/your data may be corrupted" dialog when I wake the Mac, because the FW drive volumes were mounted at sleep, and then on wake just poof aren't there. But since putting the MacBook to sleep does all the clean up of unmounting the FW volumes, essentially does "unmount" them but remembers they were mounted so it immediately remounts them when it wakes, and of course a sleeping MacBook can't possibly be writing anything to a sleeping external FW drive, I figure I'm perfectly safe.

    It just makes me nervous, the warning dialog, since it's my back-up drive. Logically I know the dialog is only triggered because the volume(s) were mounted when the MacBook went to sleep, and nothing can possibly be writing to the external drive when both Mac and FW drive are asleep, I *always* pull the external FW drive first -- it never wakes the MacBook or the drive, but even if it did, the drive would already be physically disconnected before the MacBook could write to it. Still makes me nervous, but it's a hassle to wake the MacBook, unmount the drive volumes, then put the MacBook back to sleep before pulling the external display, so the MacBook will cleanly switch to the internal display. Be helpful if someone backed me up on this: pulling a FireWire hard drive while it is "still mounted" but spun down/asleep and the MacBook is asleep may cause the warning dialog, but it's perfectly safe.
     
  2. JNB macrumors 604

    JNB

    Joined:
    Oct 7, 2004
    Location:
    In a Hell predominately of my own making
    #2
    I'm not sure I understand your process. If you're just sleeping and leaving in place, why unplug everything? Or, if you're transporting, why not just shut down?
     
  3. sanford thread starter macrumors 65816

    Joined:
    Jan 5, 2003
    Location:
    Dallas, USA
    #3
    I put the MacBook to sleep the night before with all it's "desktop" paraphernalia -- external display connected, USB devices connected, FireWire drive connected. I'm transporting, but to use on battery on a sofa about four feet from my desk. It's a lengthy hassle in this context to wake, shut down, unplug, flop down on sofa, start up, reopen all applications and documents in use the night before (none of which reside on that external FW drive).

    My only concern is the warning dialog, which is of course triggered because two volumes mounted when the MacBook was put to sleep aren't there when it wakes up. I can't see by any order of logic how if both the external FW drive and the MacBook are "asleep" when I unplug the FW drive there could possibly be any data corruption, as the MacBook can't possibly be writing to the drive. The FW port on the MacBook isn't even powered when it's asleep -- not that this matters for the drive, as the drive is an externally powered model; but it does mean the FW port is completely *dead* with the MacBook asleep. Logic dictates it's just a warning dialog that in this case has no significance. It's been properly put to sleep prior to the unplug, so any necessary housecleaning as to the drive is handled putting it to sleep, the drive and the MacBook are still asleep at the unplug so it can't be writing to the drive, and it has to be writing to the drive for any corruption to occur due to a mounted hot unplug.

    I mean, technically, with desktop Macs asleep and connected to mounted external FW drives, this happens all the time if the power fails. The physical cable connection doesn't matter; the power fails and the drive is immediately, improperly unmounted. There's never any data corruption in those cases. Now if the desktop Mac is awake and writing to the drive when the power fails, data corruption is certainly possible, but even in an automated back-up scenario, like Time Machine, it's likely to only affect one file, a file that if changed will be backed up in it's current, proper version at the next incremental back-up. Even if the most recent incremental back-up of that file is corrupted, with Time Machine you could go back to the next most recent version and restore. The only real issue would be if you created a document, the power failed during back-up, the file was corrupted because of that, you never touched file again, so it was never incrementally backed-up again, and then, say, you accidentally toss the file and need that one and only back-up file, which is corrupted.

    The upshot I suppose is under my scenario, corruption is not possible, and even under the desktop Mac power failure scenario, the risk window is small, barring corruption of the master index record *and* the journal. So I'm not going to worry about it.
     
  4. JNB macrumors 604

    JNB

    Joined:
    Oct 7, 2004
    Location:
    In a Hell predominately of my own making
    #4
    Why not eject the externals, then sleep? That way when you reconnect in the morning (or whenever) they remount properly and without the drama (something the Mac has in common with XP). Or am I missing something entirely? (Very possible, at my age! :eek:)
     
  5. sanford thread starter macrumors 65816

    Joined:
    Jan 5, 2003
    Location:
    Dallas, USA
    #5
    You're probably about my age, or more in that range than the forum regulars. We could both me missing something. But excellent point. Almost, I'd say absolutely even, positively nothing can happen if you unplug a mounted FW external drive while both drive and Mac are asleep. Certainly nothing has happened yet. The drama is indeed unnecessary, although the dialog is wordy and does state "might" and "may" quite in bit in the corruption/file damage comments.

    But by unmounting the drives overnight during sleep -- there's sure no purpose they be mounted during sleep -- if I don't pull the drive in the morning, it's easy to remount with Disk Utility, and if I do pull them and then plug them back in, they'll mount right on their own. Either way Time Machine will run right away, just as it does if I merely wake up the Mac with drives mounted and connected. And I don't have to worry one bit, even in the back of my head, over the worrisome but almost certainly in my case benign dialog warning.
     
  6. Makosuke macrumors 603

    Joined:
    Aug 15, 2001
    Location:
    The Cool Part of CA, USA
    #6
    You've already hit on the safest solution--just unmount before sleep, remount if it turns out you want to use them instead of move the computer.

    I just want to add that while it is indeed unlikely for anything bad to happen when disconnecting a sleeping drive that was not properly unmounted before sleep, it's certainly possible for bad things to happen in this situation. It just depends on what, exactly, the OS or other apps were doing to the drive when the machine went to sleep, and if they cleaned up properly after themselves.

    Again, unlikely unless you're sleeping the computer in the middle of some disk operation, but there's a reason you get all those warning dialogues.
     
  7. JNB macrumors 604

    JNB

    Joined:
    Oct 7, 2004
    Location:
    In a Hell predominately of my own making
    #7
    Completely OT, but I'd have to guess you're over 40, at least. You write in complete sentences, and your paragraphs have a beginning, middle, and end, with punctuation and everything! :p

    (Appy polly loggies if I overestimated! :eek:)
     

Share This Page