Monday 4 February 2008

ShadowProtect USB Hard Drive Swap Scripts

When we first started configuring ShadowProtect on client servers, we were running into a bit of a problem trying to rotate the USB HDDs.

We would get the following error whenever we tried to stop the drive:
The device Device_Name cannot be stopped because a program is still using it. Close any programs that might be using the device, then try again later.
So, we downloaded Process Explorer and launched a find for "e:" which was the USB drive letter.

We always found that it was the ShadowProtect services holding onto the drive, with the occasional QuickBooks 2008 server TSR holding onto it too.

So, here are a couple of quick batch files to shut down the ShadowProtect services without having to jump in and out of the Server Console or the Services Console (Start-->Run-->Services.msc).

To stop the ShadowProtect services copy and paste the following two lines into a batch file called ShutdownShadowProtect.bat:
  • net stop ShadowProtectSvc
  • net stop VSNAPVSS
To start the ShadowProtect services copy and paste the following two lines into a batch file called StartupShadowProtect.bat:
  • net start ShadowProtectSvc
  • net start VSNAPVSS
Voila! A quick click and the drive should be released when we click to stop it and a quick click to start things up again once our drives are rotated.

Remember to always power down the soon to be changed USB HDD BEFORE unplugging the USB cable. And also make sure that the power switch on its replacement is off before connecting the server's USB cable.

Always startup the ShadowProtect console and "Connect" the console back to the services as the ShadowProtect Shield will remain red until this happens.

And one more thing: We keep a folder on the server desktop called Batches to keep all of our server and services batch files and scripts in. We learned the hard way when moving a services shutdown batch file remotely across the desktop that we may activate them accidentally. If that happens, click on the Command window that pops up with the scripted commands and CTRL + C to terminate the batch and restart affected services immediately!

Philip Elder
Microsoft Small Business Specialists

*All Mac on SBS posts are posted on our in-house iMac via the Safari Web browser.

No comments: