Can a USB hub be used to access a drive from two devices?

No. USB by design can only have a single host (one PC).

What you can get is a kind of "switch", often combined with a USB hub. Then you can connect two PCs to it and manually switch between them. But only one PC can be the USB host at a time.

If you want to share a harddisk between two PCs, then there are other ways to do that (e.g. NAS = network attached storage).


No. You cannot share USB devices between different hosts. USB switches allow you to disconnect USB devices from one computer and connect them to another by pressing a button. The primary use is (most probably) to connect a keyboard-mouse-set to two PCs and switch as needed.

But even if USB would allow the setup you have in mind, you'll run into trouble. Most filesystems will be damaged/become inconsistent/corrupt if data is written simultaneously by two computers. Please don't confuse this with special protocols like Samba/Windows Shares, NFS etc. In these cases, only the computer that shares the data will continue to read and write to disk for the other computers. So although multiple computers have access, a single computer controls all read and write accesses.

If you want to share a harddisk between two PCs you can use sharing options in the OS of one of the PCs (e.g., Windows Shares, NFS). Moreover, today's home routers and NAS allow to easily share attached storage in the network.


It's physically impossible to plug a hub into two PCs using standard USB cables. Hubs and PCs both have A-type sockets on downstream ports, and there are no standard cables connecting two A-sockets together.

The same issue will arise when you'll try to connect your hub's upstream port to a hard drive, as they will both have B-type sockets . There are exceptions to this case, as upstream ports are allowed to have AB or C-type sockets, but it won't work nevertheless, as USB is dysfunctional without a host on the bus.

Tags:

Usb

Hard Drive