I see people unplug a USB e.g. External drive from the port without flagging/ejecting it from the OS first. What are the risks in disconnecting a USB device in the middle of a transfer? Could it damage my hub controller, or blow-up my motherboard or such?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
closed as off topic by Leon Heller, Kellenjb, Brian Carlton, Jason S, JustJeff Dec 30 '11 at 3:43
Questions on Electrical Engineering Stack Exchange are expected to relate to electronics design within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.
USB is intended to be electrically hot-pluggable, so the issue is actually one of software state rather than at the hardware level.
Essentially, the concern is that a mounted file system could have uncommitted buffers in ram at the time when the device is unplugged, or could be in the middle of some interruption-unsafe move operation or meta-data modification. Journaling file systems can provide some protection against this if well thought out (or make an even more hopelessly confused mess if badly designed). Further questions about that aspect of the issue would probably belong on superuser.
It would certainly be possible to (accidentally?) design a USB flash controller IC which conducted interruption-unsafe housekeeping operations below the level of the SCSI-like block device interface seen by the host, such that even when the host OS thinks the device is safe to remove it might not yet be. Hopefully that is not the case.