Turning a USB drive on/off w/out unplugging it
I have dealt with a similar problem where a USB thumb drive had to be "disconnected" from a laptop during a test procedure. There was a problem with the computer always trying to assign a new drive letter to the USB drive that made the test sequences break. (Note that the USB drive was part of the unit being tested and looked like a new drive with each UUT. The problem being the fact that the scripts of the test sequence had a fixed understanding of the USB drive letter. And on top of that the laptop test computer would quickly run out of drive letters after testing a couple dozen units. 

Solving the problem took several steps. The first one was disconnecting the USB drive. In the test station electronics I used a USB power switch IC of the type that are used in USB hubs. This gave a logic level signal to turn the USB power on and off. For the D- and D+ lines I used a USB signal line switch IC from Fairchild Semiconductor. (Not that components like these are available from a wide selection in the market place). The switch also offered a logic level signal to switch the D+ and D- lines off/on.

The second part of the solution was that the test script on the laptop had to remove the assigned drive letter from the Windows OS. That took some deep research to learn how to do that programmatically via the Windows API. Note that the USB drive had to be disconnected before killing the drive letter assignment.

Interesting additional detail 

Note that at another time I had an almost like case of a USB Serial Chip embedded inside a device being tested. Each time a new UUT came along the test computer would try to assign a new virtual COMM port number to the USB serial port. The solution to that was almost identical to that described above.