Lock access to external USB disk

0

I am using an external USB3 disk drive for backups. My PC works under Windows 7.

So far, the USB disk has permanently been connected to my system. Probably not a good idea anyhow, as the disk is powered on all the time and thus accessible for spyware. Failing software or my own mistakes could damage the disk content. I would also like to prevent ransomware like TeslaCrypt to spoil my backups.

Question:

Is there any convenient way to lock and unlock the external drive without unplugging the USB cable?

Switching the power is no option as the disk is powered via USB.

Edit:
Meanwhile, I have tried Microsoft's devcon.exe tool along the lines of this post. But the disable operation always failed. I used Administrator privileges and chose the proper 64-bit version, but could not make it run.

Axel Kemper

Posted 2015-12-21T00:27:40.853

Reputation: 2 892

Answers

1

  • You can set the disk offline using Disk Management. Just right-click your USB drive's partition and click Offline.
  • Locking and unlocking are the key terms here: you can also create an encrypted volume using software like VeraCrypt and mount/unmount it as needed. The encryption does not have to be particularly strong, as you need the performance for making backups.

Refrain from keeping your USB drive plugged in at all times. If you need an always-online drive, it would be a better idea to install another internal drive on your computer for backups.

oldmud0

Posted 2015-12-21T00:27:40.853

Reputation: 3 858

Thanks for your answer, but I am still hoping for a simple single-click solution, probably via .cmd script. What are your objections against USB drives? Especially with changing systems, they offer quite a lot of flexibility. – Axel Kemper – 2015-12-21T22:58:46.943

@AxelKemper USB drives are very convenient, but they are very susceptible to failure. You can access the online/offline that I mentioned using DiskPart. Make a DiskPart script (launch with diskpart /s <script>), select the disk/volume, and use the OFFLINE command. – oldmud0 – 2015-12-21T23:50:33.887

1

Don't dismiss switching the power - USB has 4 pins - Pin 1 (Red) is for voltage, 2 and 3 for signal and 4 is for ground. I've not tried it, but you should be able to split the cable and put a switch on the voltage cable)

You may be able to get 95% of the way there just by making the disk read-only as per this post.

davidgo

Posted 2015-12-21T00:27:40.853

Reputation: 49 152