How to programmatically detect sata drive unplug in SuSE Linux?

Posted by Steven Behnke on Stack Overflow See other posts from Stack Overflow or by Steven Behnke
Published on 2010-04-20T16:04:06Z Indexed on 2010/04/20 16:43 UTC
Read the original article Hit count: 427

Filed under:
|
|

Does anyone know of a method I can use to programmatically detect if a SATA hard drive has been unplugged? Our file system is mounted in READ-ONLY mode when we need to detect the removal of the drive. We noticed the other day that we were able to unplug a hard drive and everything continued to run without a hitch until the next time we attempted to read from a file on disk.

© Stack Overflow or respective owner

Related posts about c++

Related posts about linux