HDD Dying - Get an alert when remounting RO?

Marc Lanctot lanctot-yfeSBMgouQgsA/PxXw9srA at public.gmane.org
Tue Aug 19 17:24:23 UTC 2008


Scott Elcomb wrote:
> Looks like I've a got an HDD dying out on me - over the last few days
> there's been lots of issues.  fsck refuses to auto-correct problems
> (ala -p) and manual checks (-fvC) are returning ~ 20 bad blocks per
> run.
> 
> I'll be replacing the drive soon enough, but in the meantime is there
> a way I can be notified (audio/popup/other) when the root drive is
> remounted as read only?
> 
> The tired machine in question is running Gnome under Ubuntu Edgy Eft.
>

I can't be of much help, but for what it's worth: I've attached a little 
script I used from time to time to alert me of random things by using 
at. If you put the following into a script and keep it running in a 
terminal, it will do what you want. Not the best way to do it,  but it 
should work.

#!/bin/sh
HOME=/path/to/a/directory/on/the/root/drive
DELAY=5

while /bin/true
do
   sleep $DELAY
   touch $HOME/testfile || alert "Read-only :("
done

I'm getting the same problems with one of my drives .. it's a Samsung 
that came with the machine. I'd like a recommendation on hard drive 
quality. A quick inspection tells me that Seagate is the classic best 
but that Maxtor/Quantum is catching up. I have a second Western Digital 
that has never had problems, but I heard they're quite slow so I kept it 
as a storage/backup drive. This will be my main drive so I don't care 
how much it costs as long as it will will be reliable.

Thanks,
Marc

-- 
Impatience is the sign of a practical mind.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: alert
URL: <http://gtalug.org/pipermail/legacy/attachments/20080819/0eeaf6d7/attachment.ksh>


More information about the Legacy mailing list