Is it harmful to directly remove an external hard disk from your computer without "ejecting" it first?

Answered

Posted May 11, 2015, 4:19 PM UTC

2815
Schnutzel•

Yes. You might disconnect the drive while it is in the middle of a writing operation. The result can mess up the file system causing loss of data.

17

If the device has an access light, you can use that as a guide for when it's not in use & therefore safe to remove. In Windows, if the light isn't flashing, it's (probably) safe to remove. Windows usually mounts removable drives synchronously, so disk writes are not cached for an excessive amount of time. If you remove the device while the light is flashing, any file that was being written to is likely to be corrupt, and worse-case scenario you could have filesystem corruption that could result in loss of many files.

On other operating systems such as MacOS and Linux, removable devices might be mounted asynchronously, which improves speed but means that writes might be delayed for minutes or even longer. So you could create / copy / edit a bunch of files, eject unsafely, and later find that all your changes are just gone because it hadn't even started writing them yet when you pulled it. I've heard horror stories about people writing or editing an important document on a removable drive, ejecting unsafely, then finding later that the document's just gone.

7
jonnywoh•

I think Windows mounts external hard drives with write caching (I think this is the same as or similar to asynchronous mounting) enabled by default.

1
shalafi71•

Write caching is disabled by default on Windows external drives.

Write caching is enabled on internal drives.

2
jonnywoh•

Ah, that's what it was.

2
oldage•

a flash drive is fine if nothing is happening, but I was told you had to do it with a hard drive so the thing properly parks.

3
Sir__Hippo•

If you've turned the computer off and are not performing a "hot swap" then you do not need to do anything special for an internal drive. Very few home computers utilize "hot swap" bays. It's kind of something you do intentionally and therefore if you didn't, you don't have to worry about either.

1
oldage•

I was talking about an external USB hdd if that matters

1
Mr_Ivysaur•

Not necessarily, at least on a Windows.

There is no warm to remove if you know that it is not being used. The "Remove Safety" is just a way to make sure that it everything is in order to remove the drive. Anyway, it is always recommended to do the safe way, just to be sure.

2
Master_Tallness•

I'd say as a rule of thumb, always eject the drive first. It takes 2 seconds.

2
Mr_Ivysaur•

I know. I'm just answer OP question.

1
bart2019•

The system could be set up for delayed writing, which means that whole parts of written files could not have made it onto the disk.

See Sysinternal's "sync" utility to write all that data to disk without ejecting it.

Note that USB flash drives are usually configured for immediate, thus not delayed writing, meaning that using this won't make a difference.

2
API-BeastCurious.•

No. All ejecting does is making sure that the disk isn't used. If the disk is used you can't eject it, and if it isn't used you don't need to eject it. It's a simple double-check measure.

1
madplayshd•

Depends on the filesystem. ZFS or btrfs have copy-on-write, which means when the system says a file is copied, it has been physically written on the device. Unplugging it doesn't do damage.

However, if it's a file system like NTFS or ext, it says a file is copied if it is in write cache, so losing power does lose that data and can corrupt files.

1
log-off•

NTFS

Write cache is disabled on Windows for external drives by default.

1