So that's what happens when you unplug a hard drive without unmounting it...

Discussion in 'iMac' started by fattire357, Apr 14, 2012.

  1. fattire357 macrumors regular

    Joined:
    May 18, 2011
    #1
    My wife was re-arranging my desk and yanked the cable out of my external hard drive to my iMac. I got one of those error messages saying that you should eject it first, but wasn't that worried. Next thing I know my hard drive is telling me it is corrupted, and can only be read-only it to copy files off. I got some of my data but not all, and now it has a totally corrupted partition map.

    This is so frustrating. I bought a Mac because I thought it would be more secure. I was sick and tired of having to tweak with Windows 7 (or linux from time to time) and just wanted something to work without messing with it. I know it is a rare occurrence, but it is totally unacceptable in 2012 that you can just accidentally unplug a hard drive and mess it up its partition tables (while being idle). I'm so disappointed in Apple. Just FYI everything is vanilla, I'm not running paragon NTFS or anything.

    Before I get any flaming on what I could have done better (which I'm sure there are a few things), my whole point is that computers should just work without having to mess with it. Good to know Apple has the same flaw everyone else has. Argh.
     
  2. SandboxGeneral Moderator

    SandboxGeneral

    Staff Member

    Joined:
    Sep 8, 2010
    Location:
    Orbiting a G-type Main Sequence Star
    #2
    The reason you should eject a HDD or flash drive before unplugging it is because that stops all reading/writing to the drive before its unplugged. That way the drive won't be cut off in the middle of a writing operation and thus corrupt the data. That goes for any drive on any computer with any operating system.
     
  3. fattire357 thread starter macrumors regular

    Joined:
    May 18, 2011
    #3
    Yeah, I know that it can corrupt whatever is being written at that time.

    However, there was no need for the OS to write to the partition table as it was idling. Usually you need a root level process to do that. Therefore, it is really freaking frustrating that the partition table is wrecked and I can't access the 3TB of data on it. This seems more like an OS bug than an unavoidable circumstance because the consequences were so severe. Really, destroyed the HD by unplugging it? Holy @($!!~~


    What you are saying only makes sense if you are telling me that X file you are copying is corrupted.
     
  4. posguy99 macrumors 6502a

    Joined:
    Nov 3, 2004
    #4
    If the data was important, why isn't it backed up? And if it isn't important, why are you so bent about it?
     
  5. papoopeepoo macrumors member

    Joined:
    Jul 2, 2011
    Location:
    Philadelphia
    #5
    If you've removed as much data as you can recover, try zeroing the drive in Disk Utility. This will scan for corrupted blocks as it writes zeros and write in the index that those blocks should be avoided.
     
  6. SandboxGeneral Moderator

    SandboxGeneral

    Staff Member

    Joined:
    Sep 8, 2010
    Location:
    Orbiting a G-type Main Sequence Star
    #6
    Just because you weren't actively using it, doesn't mean the system wasn't. It could have been indexing the drive for faster file access.

    Bottom line here is, unmount and wait 2 seconds before you pull the plug.
     
  7. posguy99 macrumors 6502a

    Joined:
    Nov 3, 2004
    #7
    No, actually it won't do anything of the kind. As with all modern hard disks, if bad blocks are actually being exposed to the interface, where Disk Utility can see them, then the drive has run out of spare sectors and needs to be trashed immediately.

    There is a colossal difference between "I corrupted the filesystem on the device", and "the device has bad blocks". The first one means the blocks are fine, the data in them is not what it should be. The second is a hardware error.

    The OP is experiencing the first one.
     
  8. snberk103 macrumors 603

    Joined:
    Oct 22, 2007
    Location:
    An Island in the Salish Sea
    #8
    It's possible that this wasn't an OS fault as much as the HDD firmware. If the OS was writing data to the HDD when the power was unceremoniously yanked the firmware may have been parking the head... which is what it's supposed to do. However the controller may have tried to continue writing the data - for just a millisecond, across the partition table - as the head is being swung into the parked position.

    Not saying for sure that's not the OS's fault, just that you can't assume it was.

    A partition map can be corrupted by an incomplete write operation, which is what you assumed. But it can also be corrupted by a rogue write operation, which is my scenario. Since it makes no logical sense that the partition table was being written to at them time, then it may make more sense that it was a rogue write operation.

    If it was just the partition table that was corrupted, a good data recovery application should be able to get things back. Essentially you just repartition the HDD exactly as it was. The file directories will then be where the OS expects to find them, and it will carry on from there. Although other corruptions may have occurred. You will need to do a disk repair at a minimum. I'd feel better pulling all the data off and doing full reformat.

    Good Luck.
     
  9. jablko macrumors member

    Joined:
    Nov 12, 2007
    Location:
    Lincoln, Nebraska
    #9
    I've found with corrupted disks that sometimes Windows or Linux will see data OSX won't and vice versa. So before zeroing anything out, try it on a different OS. (Of course, if it's formatted as an HFS file system, Windows won't be much help, but you can try HFS Explorer on Windows, it's a free download.)

    You can also try using data recovery software like Disk Drill (also free) to see if it can find files you're not seeing in Finder.

    I don't think I've ever had significant problems with unplugging before ejecting. Most of my disk issues have been caused by failing disks, dropping disks or disks operating in too hot an environment. So while I suppose it is possible for pulling the plug to be responsible, it does seem a bit unlikely to be the only cause.

    Good luck. Data loss is painful.
     
  10. Sackvillenb macrumors 6502a

    Sackvillenb

    Joined:
    Mar 1, 2011
    Location:
    Canada! \m/
    #10
    I think this has little to do with Apple or Windows. It's fundamental to the way hard drives are used, and like someone pointed out, just because you are not actively using a file or folder on the drive does not mean the drive is not being used in some way by the system at any given moment, whether it's windows or apple. Any drive on any system that's improperly removed will have a chance of file system corruption.

    That being said, it would be nice if the industry could update the standards and processes used to minimize these problems. Maybe by buffering instructions and retaining residual power so that a drive can wrap up the last set of before completely powering down when suddenly unplugged? Oh well.

    And with that being said, I wish you the best of luck in recovering your data.
     
  11. philipma1957 macrumors 603

    philipma1957

    Joined:
    Apr 13, 2010
    Location:
    Howell, New Jersey
    #11
    3 tb hdds fail a lot. i suggest that you have it in 2 partitions of 1.5tb in the future.
    pulling the plug or usb cord or fire wire does not always kill a drive off. many factors are involved. the case you are using has a chip and it can be the cause of the problem. many cases work badly with 3tb hdds .

    for the record I am sorry you lost data I hope you can get it back.
     
  12. fattire357 thread starter macrumors regular

    Joined:
    May 18, 2011
    #12
    thanks for your comments. i guess it is hard to tell if it is the OS or the firmware of the hard drive. hopefully in the coming years this improves as someone here was saying


    i backed up the most important parts of it
     
  13. blueroom macrumors 603

    blueroom

    Joined:
    Feb 15, 2009
    Location:
    Toronto, Canada
    #13
    For general purpose external storage I'd recommend a NAS such as the type Synology makes.
     
  14. driftless macrumors demi-god

    driftless

    Joined:
    Sep 2, 2011
    Location:
    Chicago-area
    #14
    This thread had wondering how external drives do with a power failure? Will UPS' shut down/unmount external drives when they turn off a Mac?
     
  15. samleung macrumors newbie

    Joined:
    Jan 19, 2009
    #15
    I can agree with the poster's sentiments.

    Yanking out the cable to my external hard drive in Mac = death, tons of Disk Utility remounts and Verify Disks.

    Yanking out the cable to my external hard drive in Windows = no problem.
     
  16. MacDawg macrumors P6

    MacDawg

    Joined:
    Mar 20, 2004
    Location:
    "Between the Hedges"
    #16
    I have experienced the exact opposite
     
  17. Taz Mangus macrumors 68040

    Taz Mangus

    Joined:
    Mar 10, 2011
    #17
    I suggest that you buy yourself a copy of a program like DiskWarrior. DiskWarrior can repair hard drive issues that Disk Utiity can't. I have been using since OS X 10.2 days. Of course, it is always best to have a backup of your valuable data first and foremost. And in some case two backups.
     
  18. Dangerous Theory macrumors 68000

    Joined:
    Jul 28, 2011
    Location:
    UK
    #18
    This is a bit worrying. I have always ignored those warnings about un mounting first. Always thought it was only an issue of the past. I haven't had any problems yet, but evidently I could.
     
  19. fa8362 macrumors 65816

    Joined:
    Jul 7, 2008
    #19
    So, you're angry at Apple because your wife corrupted your data, which you hadn't backed up?
     
  20. harcosparky macrumors 68020

    Joined:
    Jan 14, 2008
    #20
    Rules To Live By:

    1) Always Backup Your Data

    2) Always Eject/Dismount External Drives before walking off.



    I realize that hindsight is always 20/20, but I live by those rules thanks to the mistakes others have made before me.


    .
     
  21. rixax macrumors member

    rixax

    Joined:
    Apr 15, 2012
    Location:
    Toronto
    #21
    repair b-tree

    Absolutely! Saved me many times.
     
  22. robgendreau macrumors 68040

    Joined:
    Jul 13, 2008
    #22
    The OP is right in that at this point in computing we should have some better solutions to this problem. I can't believe we still throw away volumes in the trash in order to eject them.

    Seems to me that my DVR, for example, is more robust in this regard. It runs Linux, and it's been depowered numerous times and at most I've lost a program it was recording. Earlier editions didn't even have an off switch; you just pulled the plug no matter what it was doing.

    I would be willing to bet there are more engineers working on some way to animate email in 3d than to prevent disk corruption... :D But maybe when we're running iOS 6.2 on our desktops we won't have to worry about it.
     
  23. rutledjw macrumors member

    Joined:
    Aug 11, 2011
    #23
    I've never had this happen to me. For me it's been the other way around. But hey, maybe you have special skills...
     
  24. Slow Programmer macrumors regular

    Joined:
    Jun 25, 2011
    #24
    I have done this a lot when accidentally unplugging the wrong drive. I have had issues when repluging the drive with read or write access. So far if I do this and replug the drive in and then do a normal eject it works fine the next time it is plugged in. Your milage may vary.
     
  25. Puevlo macrumors 6502a

    Joined:
    Oct 21, 2011
    #25
    Apple should put a magnetic locking mechanism on all USB ports that physically stops devices from being ejected unless they have been unmounted.
     

Share This Page