Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a few servers that rely on external USB drives for some of their backup scripts. However, there have been times when the USB drive might get disconnected accidentally (upon reboot or power outage or just anomalies). This causes the backup script to fail to run.

Anybody know of a way to monitor if a drive is available and send an alert (SNMP, email, custom event log entry, doesn't matter) if it isn't available? Something that polls on a regular basis (batch file, SNMP trap, etc.)

To keep this from being a "shopping question", I'm just curious what WMI or SNMP counters I can query against to find this information.

P.S. I know I can monitor the backup script itself for failure, but that seems like the tail wagging the dog. I'd rather know the external drive is down and fix it before the nightly backup runs.

share|improve this question
add comment

1 Answer

The Win32_PnPEntity class could be used to locate all USB devices attached to the system. I'd do a snapshot before and after device removal to find the specific instance to watch (something like WMIC /namespace:\\ROOT\cimv2 PATH Win32_PnPEntity GET output to a text file).

share|improve this answer
    
Thanks Evan, I'll look into it and see what I can grab. –  TheCleaner Mar 6 '13 at 17:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.