62
6
There is a lot of information about how to safely unplug USB hard drives. However, the articles tend to stop at the part where the operating system says it is safe to unplug, or where you're sure nothing is writing to the drive, etc.
Relevant set up:
- Windows 10 PC or Windows 10 notebook
- External USB hard drive (not a USB stick)
- Click "Eject External USB 3.0"
- Wait for "Safe To Remove Hardware" notice
After the operating system declares that it is safe to unplug a USB hard drive, the LED on the drive blinks about 10 times before the drive shuts down.
I've used a number of external 1TB to 4TB HDDs by Toshiba and Seagate, and they all consistently blink their LEDs about 10 times when ejected. The blinking happens after the OS says it is "Safe to Remove Hardware". Although the OS is limited to seeing the completed buffer-flush whereas the drive's firmware can detect when the writes have completed, the 10 blinks happen even when the drive is just plugged in and immediately ejected with no writes at all. Likewise, it's still the same 10 blinks when the drive is written to extensively, then ejected.
Some theories:
The 10 blinks are just a courtesy to make it easier to identify which drive was ejected when multiple drives are plugged into a single computer.
There is a fixed latency between the OS flushing its write buffers and the writes getting physically encoded. This would explain why any non-zero amount of writes produces a fixed delay on eject. However, the 10 blinks still take place if there was a long delay between writing and ejecting, or if there wasn't any (intentional) writing at all.
The 10 blinks represent a safety margin for the drive to park its heads. That sounds like a rather long time just to park heads, though, with each blink lasting about a second.
So, is it safe to unplug the hard drive while its LED is still blinking?
I've tried finding an authoritative answer, even checking on Seagate's and Toshiba's websites, looking at the datasheet in the case of Toshiba. I'm looking for answers that reference credible sources regarding what the drive does during the shutdown blinking sequence, to understand whether unplugging during that sequence is safe.
Here are some other areas I checked:
Searching Google: is it safe to unplug flashing usb
I got a whole bunch of tips about how to safely unplug USB drives, but nothing to do with the USB.
Searching Google: is it safe to unplug blinking +LED usb
Some other posts come up, mainly to do with troubleshooting, but nothing to do with the routine 10 blinks on eject.
Searching Super User: [usb] [hard-drive] [windows-10] eject
This produces 7 results (or 8 results if I replace [hard-drive] with [external-hard-drive]), mainly about problems. Nothing about the routine 10 blinks on eject.
2If its blinking the OS is either reading or writing the usb, not safe to unplug. – Moab – 2019-09-15T13:32:55.433
1In the way you're asking (i.e. Windows says safe to remove, drive shows activity for a few seconds afterwards), wait until the OS and kernel have completely ceased all I/O activity. There's likely a way to see a log of such activity (in Linux, it would be the kernel log), however I'm not sure how to in Windows. There could be a myriad of reasons for this extra communication, but needless to say, wait until all I/O activity has stopped, else you risk data loss or corruption (which may not be immediately noticeable) – JW0914 – 2019-09-15T14:42:09.643
1I have found on occasion that my external hard drive is still spinning when I unplug it and go to pick it up. I wonder if those 10 seconds are after the writes are done and the heads are parked, but before the platters are done spinning. (If that were the case, I assume unplugging would be safe, but picking it up and moving it might not? I'm not sure.) – Glenn Willen – 2019-09-16T13:49:15.217
6LEDs are not a required standardized feature of USB storage, therefore their existence and behavior should only affect how you treat the device if the device manufacturer explicitly tells you to. – kayleeFrye_onDeck – 2019-09-16T20:12:05.167
2Have you tried asking Seagate or Toshiba (we can't do that for you; we don't know what model number you are using)? – Brian – 2019-09-16T20:54:43.337
1Theory: "Safe to Remove" commits all writes and prevents future writes, but does not affect reads. Then, the data is safe and committed, but it can still safely read from the drive, until the moment you unplug the device. – Mooing Duck – 2019-09-17T00:15:18.423
@Brian I checked their websites. I think Seagate has something about LEDs providing status information on another storage product, but nothing relevant to ‘ordinary’ HDDs and the routine 10-blinks. Toshiba’s datasheet has nothing relevant to this issue either. – Lawrence – 2019-09-17T07:31:41.543
@kayleeFrye_onDeck Fair enough, though there seems to be quite a bit of consistency over a few years (maybe up to a decade?) on low-end external USB HDDs from Seagate and Toshiba, both in their older chunky drives and as well as the modern sleeker ones. – Lawrence – 2019-09-17T07:38:30.203
@MooingDuck if there is a chance of the head crashing on sudden loss of power, even reads should be prohibited for a drive to be safe to remove. The OS likely unmounts the drive altogether before declaring that it is safe to remove. – Lawrence – 2019-09-17T07:41:43.443
Were you writing to it shortly before unplugging? Interrupting a read is less dangerous than interrupting a write. – Mast – 2019-09-17T08:43:05.067
@Mast Not in the cases I'm asking about. I'd complete my work with the drive, go through the Windows eject procedure, and wait for the pop-up to say that it's safe to disconnect the drive. Once the pop-up pops up, the drive blinks about 10 times before shutting down. I wait until after the blinks stop before unplugging the drive. It's the 10 blinks I'm wondering about - they happen after the pop-up. The drive has disappeared from Windows File Explorer once the pop-up pops up, so I'm not accessing the drive for reading or writing at this point. – Lawrence – 2019-09-17T08:52:11.540
Depends on the type of HDD you have. My WD Passport blinks a couple of times after ejecting too, but not 10 times. Seems vendor (perhaps even type) specific. – Mast – 2019-09-17T08:56:13.323
@Mast As noted in the question: Toshiba & Seagate, 1TB to 4TB USB HDDs. Yes, possibly vendor-specific. – Lawrence – 2019-09-17T09:02:38.487
@Lawrence Just to be precise... is it 10 time blinking, about 10 times or maybe just 8? [moreover are they all the same? Are they short pulse or long pulse?] This because for example the Segate implements an error report signaling based on led pulses: 8 short pulses means error number 0 that is widely used to say no error at all... so, if true, that you can remove safely. – Hastur – 2019-09-17T10:58:32.447
@Hastur I don’t always glance quickly enough at the HDD to say with certainty that it is 10x precisely, every time, but based on the perceived time elapsed, I am fairly confident that it is precisely 10 blinks each time. They are fairly short pulses at roughly 1 second per blink-cycle. The blinking is also consistent over multiple Toshiba and Seagate drives. – Lawrence – 2019-09-17T11:04:14.740
1Since the information is not on their websites either, it might be worth writing them a physical letter. – Jan Doggen – 2019-09-18T14:33:04.530
@JanDoggen I've just contacted one of the companies; awaiting a reply. – Lawrence – 2019-09-18T14:47:23.840