lkml.org 
[lkml]   [1999]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Disk MTBF
On Thu, 13 May 1999, Mike Black wrote:

> We were having some discussions on disk MTBF and somebody suggested this:
>
> -- Have a daemon that refreshes every sector on a disk once per month
>
> This would re-write sectors so as to decrease the probability of a read
> error due to magnetic loss.
>
> Comments anybody? Is this feasible to do?

As long as you don't mind unmounting the file-system at that time it's
easy.

Write a program that does this:

su root
ifconfig eth0 down
ifconfig lo down
kill -TERM -1
sync
kill -KILL -1
umount /your/filesystem (even root)

open("/your/filesystem/partition", O_RDWR)
while(!done)
{
old_position = get_file_position();
read() data into a buffer;
set_file_position(old_position);
write() data from buffer;
}
close()
reboot()


The major problem is finding out when you have reached the end of the
partition or physical device. This is because any sector read errors
(after near kernel panics) can result in the same indication to
a program that a normal EOF would result in, i.e., the return value
from the read is not the same as requested (normal last read), or
-1 with errno set to something if you read beyond that.


Cheers,
Dick Johnson
***** FILE SYSTEM WAS MODIFIED *****
Penguin : Linux version 2.2.6 on an i686 machine (400.59 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.048 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site