On Fri, 2004-05-28 at 15:31, Pong wrote: > how about writing a script which checks a known directory/file > on the mounted disk. then run it under crond. if the disk has been > physically removed, the script will send an alert: syslog, email, > etc... > > or, put a sticker (custom tamper sticker that easily breaks and hard > to imitate -- merong hologram?). place it along the ejection path. > if it breaks, then the media has been removed. > > or put both.
You still don't get it. Unmounting does more than making a file system unavailable on a mount point. The problem with what you're saying above is that it only detects the removal of the media. It does not do anything to do a "clean unmount". Even on Windows, you need to unmount any mass storage devices manually before removing it if it does not have one of those "magic" eject button. (sorry for the the lack of better term, but I'll explain later what this "magic button" does.) Reason: well, any modern os today has "delayed writes" meaning before actually writing the data to disk in order to improve the "perceived" performance of the system (like further optimizing of the disk i/o scheduling, some resources being available for a moment because of delayed writes, etc.) Anyway, those data that are written "delayed" includes the data and file system meta-data. Now you want those written to disk before unplugging the drive or your precious data is toast. Anyway as for the "magic" eject button, there are some devices on some other architecture that if you press an eject button, it signals the os to do a "clean unmount" then eject the media when it receives a signal from the os that the media can be safely ejected. I think this is what you're looking for. There aren't a lot of devices like that in the x86, unfortunately. ZIP drives have this kind of thing I believe under Windows but this feature is not available on Linux because under Linux the default behavior is to lock the media in the drive until you do an unmount. -- Philippine Linux Users' Group (PLUG) Mailing List [EMAIL PROTECTED] (#PLUG @ irc.free.net.ph) Official Website: http://plug.linux.org.ph Searchable Archives: http://marc.free.net.ph . To leave, go to http://lists.q-linux.com/mailman/listinfo/plug . Are you a Linux newbie? To join the newbie list, go to http://lists.q-linux.com/mailman/listinfo/ph-linux-newbie
