简体   繁体   中英

what is the difference between hot pluggable device and removable device?

I have read that USB HDD are hot-pluggable but not removable whereas USB Flash drives are both removable and hot-pluggable.Internally, the windows DEVICE_OBJECT structure has Characteristics flag that can have a value FILE_REMOVABLE_MEDIA for removable media (not the removable device). Also, STORAGE_HOTPLUG_INFO structure has Devicehotplug boolean member that says device is hot pluggable or not. Can you please justify your answer with a little details?

David Zeuthen explains it best :

[...] "removable" means that the media of the device is removable. For example, CD-ROM drives or Nin1 card readers for flash media. [...] ATA disks connected via eSATA aren't removable, you can't remove the platters.

Yet of course, you can intuitively understand that even non-removable devices can be hotpluggable (ie you can plug and unplug the entire device as a whole, as opposed to inserting/removing the media it contains).

Now, all (modern) buses in use in current systems are hotpluggable - most new systems allow you to add/remove SATA disks while the system is running.

Indeed you shouldn't have to care much about whether something is hotpluggable or not anymore: virtually all storage devices are. (In the past, you had to shutdown the machine to manipulate the storage devices).

So, it should follow that external USB drives (either HDDs or flash sticks) for example should be non-removable and hopefully always hotpluggable.

Unfortunately:

Of course, hardware sucks so virtually all USB keyfobs reports "removable==1" probably because the maker of the device wanted to be "helpful" and make things work better on windows.

I have no sources regarding the real reasons, but it turns out that many USB drives report themselves as removable too. David's suggestion that it might be because of certain operating systems which didn't use to support hotplugging but did support removable devices (CD-ROMs, etc) sounds reasonable: the manufacturers reused the same technique to trick the OS into letting the user "eject" USB drives.

Nowadays I would guess all modern operating systems make the distinction clear, and this has many advantages from a management standpoint (eg you might have a hotpluggable DVD drive with removable DVDs and you would thus need to be more clear about which you want to interact with). Still, older drives and old habits die hard, so you'll still find some "removable" USB drives even if they're really not.

Note: The bug report linked is about udisks which is more often found in the free software world. But again, I'm sure all systems make the distinction now even if the terminology is not exactly the same. Also note that the terminology is really rather arbitrary, though whichever terms you use for these two concepts best be well understood.

A simple Google search could have answered your question...

  • Hot plugging is the ability to replace or install a device without shutting down the attached computer. Hot plugging is implemented when a peripheral device is added or removed; a device or working system requires reconfiguration; a defective component requires replacement or a device and computer require data synchronization. Also known as hot swapping. Hot swapping allows easy accessibility to equipment and the convenience of uninterrupted systems.
  • Removable media are data storage devices capable of computer system removal without powering off the system. Removable media devices are used for backup, storage or transportation of data.

source: techopedia dot com

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM