THE BOOK cover
The Unwritten Book is Finally Written!
An in-depth analysis of: The sacrifice bunt, batter/pitcher matchups, the intentional base on balls, optimizing a batting lineup, hot and cold streaks, clutch performance, platooning strategies, and much more.
Read Excerpts & Customer Reviews

Buy The Book from Amazon


SABR101 required reading if you enter this site. Check out the Sabermetric Wiki. And interesting baseball books.
MOST RECENT ARTICLES
MAIL : You ask | We say

Advanced


THE BOOK--Playing The Percentages In Baseball

<< Back to main

Friday, December 02, 2011

Improper Eject of Flash Drive

By Tangotiger, 11:00 AM

I go out of my way to always do a proper eject of the flash drive, to the point that I will do a shutdown if for whatever reason I can’t get the eject done properly.  Except today.  I rushed, I pulled it out of my computer.  And when I get into the office, the good news is that most of the folders were fine.  The bad news is that the one folder that I always use was corrupted.

Now, I learned my lesson from last year when my flash drive just died to make sure I backup on a weekly basis, rather than sporadically.  Anyway, I still wanted to know WHAT I lost, and if I have to bother doing an automated recovery, or simply manually recreating whatever I lost.

And this is the software I found from Get Data:

http://www.recovermyfiles.com/

What a fantastic piece of software.  It scanned my flash drive, and reports on everything it could find, including giving me a preview of the files.  Based on the preview alone, I can recreate what I needed in many of the cases.  In addition, it shows dates, and so, I just had to look for the files last modified since my last backup.  And you can even export the names of the files (and dates, etc).

And all that is free.

For 70$, you buy the Pro version, and it’ll recover all the data it can for you.  In my case, since I made a recent backup, and whatever was not backed-up I can recreate manually, it’s not worth it.  This time anyway. But, it may be useful in the future.

I also wanted to highlight this software for anyone who has experienced some corrupt drives, or may in the future.

I presume that there are other enterprise standard software for around that price.  But this was the first one I found that gave you all the preview capabilities it did for free.  And for that alone, I give it two thumbs up.

NOTE: This post is *not* an advertisement.


Web Admin
#1    Tangotiger      (see all posts) 2011/12/02 (Fri) @ 17:05

I will delete any post that accuses me of deception of any kind.


#2    Brian Cartwright      (see all posts) 2011/12/02 (Fri) @ 17:32

I know that early versions of USB drives required you to dismount them before physically removing them from the computer, but did not think that applied to those made in the last few years.

As long as no files are open or being transferred, I just yank it out and haven’t had a problem.

One time though I left it in the back of my work PC during the day shift while I was working nights. One of the day employees went to my PC to write large amounts of data onto a removable HD, wich they plugged in to another USB, but wiped and then attempted to write the files to my USB instead. They didn’t understand why it said “Insufficient Disk Space.” Everything I had was gone and of course not everything was backed up.


#3    Tangotiger      (see all posts) 2011/12/02 (Fri) @ 17:52

Brian: I always figured it was some sort of old wives tale.  I didn’t have anything opened, and even if I did, it should only affect the file that is open.  Why would the index to the files be affected (which is I presume what changed)?

It’s almost like it was going through some sort of defrag when I pulled it out.

I’m sure some of the bright minds can explain it to us.


#4    Brian Cartwright      (see all posts) 2011/12/02 (Fri) @ 18:48

I can remember the first one I bought had instructions on proper dismounting and removal.

Also, on NCIS, where Gibbs is generally portrayed as not being very computer literate, there was an early episode where he just grabs the flash drive out of the USB and the others just look at him with this shocked look on their faces as in “He didn’t just do that!”


#5    Aaron Delisio      (see all posts) 2011/12/02 (Fri) @ 20:09

I have never heard or read anything about the proper way to remove a flash drive, I had no clue it mattered. What am I missing?


#6    NaOH      (see all posts) 2011/12/02 (Fri) @ 22:43

My understanding has long been that users of the three major operating systems (Windows, Linux, and Mac) should always unmount/eject external drives. Yes, there may be some system-level precautions implemented by the OS vendor, but this Lifehacker piece from a couple days ago indicates unmounting is still a wise choice due to the threat of file or disk corruption.

http://lifehacker.com/5863810/do-i-really-need-to-eject-usb-drives-before-removing-them


#7    mettle      (see all posts) 2011/12/03 (Sat) @ 04:30

There’s actually a Mac/Windows difference in terms of USB drives.

Macs use a pretty large buffer of some sort, and so you *really* have to eject it, otherwise you’re likely to brick the flash drive in the process of buffer write/read. The benefit is that it’s much faster.

With Windows, there’s no buffer, so you can generally yank at will. But of course there’s a small buffer involved in writing to anything so you can get unlucky if you yank your drive at the wrong time in the buffering process.

Tom - I believe you use windows, right? So, you really had bad luck on that. Me, I lost a drive on a Mac the first time I didn’t eject so that’s why I read up on this stuff.


#8          (see all posts) 2011/12/03 (Sat) @ 11:31

This seems like a good excuse to ask, “Why aren’t you using the cloud for PC to PC file transfers?”


#9          (see all posts) 2011/12/03 (Sat) @ 11:48

I wouldn’t care if it was an advertisement, but your overall attitude/hypersensitivity to criticism is amusing to me and others.


#10    NaOH      (see all posts) 2011/12/03 (Sat) @ 12:27

Macs use a pretty large buffer of some sort, and so you *really* have to eject it, otherwise you’re likely to brick the flash drive in the process of buffer write/read.

The use of “brick” should be used very carefully. It means a device is as dead as a doorstop and forever useless without replacing internal components. This is well beyond file/disk corruption, and they should not be confused with bricking.


#11    Geoffrey Buchan      (see all posts) 2011/12/03 (Sat) @ 12:44

The core issue is that operating systems cache changes to output devices. This means the system memory has the update, but it may not get written immediately on the device. At some point the cached changes are flushed to the storage device (i.e. physically written on the device).

Typically this happens when the system is otherwise less busy, so after a period of idleness or doing something else it should be OK simply to yank a drive. Most of the time.

The biggest risk is that if you happen to unplug the drive while the OS is in the process of writing to it, then the file system on the drive can be left in a corrupt state. Depending on the extent of the damage, recovery programs may or may not be able to retrieve your data.

So the bottom line is that it’s safest to unmount/eject a drive always. Often, if not almost always you can get away without doing so, but as Tango discovered, sometimes you can get burned.

A sudden loss of power to your computer can cause similar effects of leaving a file system in an incoherent state.


#12    JD      (see all posts) 2011/12/03 (Sat) @ 16:28

I have never done the proper eject, but I always wait a minute before removing the drive.

Occasionally my Vista-powered laptop will tell me my drives need to be scanned and fixed when I insert them, but doing this/not doing this doesn’t make any difference, as no files have ever been corrupted (until now, because I’m talking about it, so I’m sure the next time I do it I’ll destroy the drive).


#13    Geoffrey Buchan      (see all posts) 2011/12/04 (Sun) @ 08:50

JD - I’m not too familiar with Vista, but I can think of two possibilities that might trigger scanning of a drive:
1. The previous time the drive was removed, it wasn’t left in a fully clean state, so the OS is trying to recover from that. A file system is designed to be reasonably fault tolerant, so this probably will work most of the time.
2. Some systems (I know GNU/Linux ones usually do this) will automatically scan a drive for errors every N times you insert it. There’s a tradeoff between better safety by scanning more frequently and the time it takes to scan, which is proportional to the amount of data on the drive.

As to why systems cache writing to devices, it’s a tradeoff to improve usability. If every time you saved a file the computer had to wait until it was done before doing anything else, the computer would seem much more sluggish. Also as more programs auto-save without conscious action by the user, this problem would become worse (the OS simply knows a program is trying to write a file; it doesn’t know whether this was because the user did something to trigger it or not).


#14    mettle      (see all posts) 2011/12/04 (Sun) @ 19:28

10/NaOH

The process does actually brick the USB drive. You can’t just reformat it—it becomes unusable absent some really involved rehabilitation process.
I can re-find all the webpages I found on the issue when it happened to me if you’re interested.


#15    NaOH      (see all posts) 2011/12/05 (Mon) @ 03:33

mettle/14: I’ve seen hundreds of drives incorrectly unplugged from Macs without ever hearing of one being bricked. No, I don’t think that means it’s okay to do that, but the worst I’ve seen is an occasional need (maybe 3 or 4 instances) to repair the drive using the built-in software Apple provides (Disk Utility). So, yeah, if you get a chance I’d be interested in seeing those articles.


Page 1 of 1 pages


Name (required)
E-Mail (optional; WILL be published)
Website (optional)

<< Back to main


Latest...

COMMENTS

May 25 08:49
Do pitcher’s reach back for velocity when needed?

May 25 08:11
What sabermetrics is NOT

May 25 06:43
Largest demonstration in Canadian history?

May 25 06:39
Lack of hustle during a game

May 25 02:38
NFLPA lawsuit against collusion

May 25 01:43
Neal Huntington’s best moves

May 24 23:50
Rooting for laundry

May 24 17:04
Firefox, IE, or Chrome?

May 24 12:07
How to beat the shift

May 24 11:11
Incredible story