2 Relay USB
The following method of power cycling a USB drive is for a drive that is powered by USB and not an external power supply.
You will need a short USB extension cable that you will modify. This extension cable should be as short as possible. Longer cables will cause issues, such as the drive not being recognized all the time (issues that could potentially drive you insane trying to figure out!). It should also be a good USB 3.0 cable. I purchased two different cables on ebay. The first was described as "1FT/33CM USB 3.0 Type A Male to Female Extension Data Sync Cable Extender Cord", and it was black. The second was described as "Premium 1.5FT USB 3.0 A Male to Female Extension Cable Cord Blue", and as described it was blue. I was able to modify both cables successfully, and both were very similar internally.
You will also need some extra wire of some sort to splice into the cable and go to the relay. I used 18 AWG stranded wire. It is small enough to still match up with the cable wire size to twist together, and big enough to not have any power loss, plus it is a good size to fit into the relay connections. Using too small a wire could cause enough power loss to have issues with the drive not working as it should, and too big a wire would be difficult to work with.
Now when I say you need a short USB extension cable, I mean you really need two in case you mess up on the first one. And I would also recommend getting a longer cable to practice on, so that you can hack it up multiple times until you are comfortable with the modification process to do on the short cable you really want to use.
The first step is to slit the outer coating to expose the braided shielding. I used a utility knife to make about a 3 inch long slit. The utility knife that I used has the ability to control how far the blade comes out. This is where you will need to practice with whatever tools you have. You want to cut through the outer coating without doing any damage to the wires inside. My cut probably cut a few of the braided shielding strands, but left the wires inside fully untouched.
Once the slit was made, I pulled the wire assembly out of the coating. Then, using only my fingers (and fingernails), I worked the braided shielding open to expose the foil shielding. Some of the braiding either broke or was cut, but I made sure not to cut it any more to keep it as much intact as possible.
Then I used my fingers to work the foil to unfold it some, and expose a place where I could get a cut started on it. The foil will tear easy enough, but I had to use a pair of diagonal cutters to get it started. Once the cut was started, I used my fingers to tear the foil and peel it back to expose the wires. There was also a single copper wire strand around the foil that I pulled away without cutting.
Once the wires were exposed, I used my fingers to separate the red wire from everything else. The red wire is the 5 volt power wire we want to use for the relay control. Once the red wire was separated, I cut it and stripped the ends. If you are not familiar with stripping wires, this is also where practice is useful. You don't want to cut any of the strands of wire when you strip it.
Then I twisted the 18 AWG wires to the red wires. The image shown is not the best job, but it worked for the purpose of using the wire nuts to secure the wires together. Oops, forgot to tell you that small wire nuts are needed. And if you are more professional about it. you could solder the wires and either tape them or use heat shrink tubing. I used the wire nuts to show you don't need special tools. I would not recommend just twisting the wire together and taping them, that will not make as secure of connection as the wire nuts or soldering, and could lead to issues later (such as why does it only work when I wiggle the cable?).
Once the wires are connected, tape up the cable. My tape job is not the best looking, but it is functional and I was low on tape so did not want to redo it just for cosmetic reasons. Then hook the other end of the wires to the normally closed and common relay terminals. And now you should have a working relay control for USB connected devices.