DiskScrub: Difference between revisions

From DaqWiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 72: Line 72:
   
   
* http://daq.triumf.ca/~daqweb/yum/
* http://daq.triumf.ca/~daqweb/yum/
* git clone http://ladd00.triumf.ca/~olchansk/git/rpms
* git clone http://ladd00.triumf.ca/~olchansk/git/rpms.git

Revision as of 15:44, 28 October 2013

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html>

 <head> 
   <title>Linux disk scrubbing tools</title> 
 </head> 

 <body> 

Linux disk scrubbing tools

Introduction

Modern high capacity IDE/SATA disks are great. They offer huge capacity and fast data rates at incredibly low prices. But t\ here is a catch. Over time, they develop unreadable and "hard to read" sectors. Other than losing data, these defective disk sect\ ors interact badly with the Linux drivers: "read retry" storms, disks being kicked out from RAID volumes, are just a few examples\ . All grades of disks seem to exhibit this problem - disks marketed as "desktop", "enterprise" and "raid" all sooner or later wil\ l develop unreadable or hard to read sectors.

Tools shipped with typical Linux systems have limited usefulness for dealing with this problem. SMART disk monitoring tools\ work well for complete disk failures and for completely unreadable sectors, but have limited usefulness when dealing with "hard \ to read" sectors. Also, SMART disk scans seem to stop on the first detected error and so cannot assess the full state of a disk. \ "badblocks", "dd if=/dev/disk of=/dev/null", etc may detect unreadable sectors, but not the "hard to read" sectors.

Unsatisfaction with normal Linux tools led to the development of this disk scrubber package (diskscrub).

Examples

A disk scrubber run on a perfectly good disk:

 
# /usr/sbin/diskscrub.exe /dev/sda 
At 190780 MiBytes: Short read at offset 2318336 
At 190780 MiBytes: EOF 
Summary: disk size 187 GiBytes, 0 slow reads, 0 short reads, 0 unreadable areas, data rate 8 to 65 MiBytes/sec, longest read time\
 0.366 sec 

A disk scrubber run on a marginal disk:

Observe: there are two hard-to-read areas: at 30 and at 68980 MiBytes; there is one unreadable area ("short read") at 2940 MiB\ ytes

 
# /usr/sbin/diskscrub.exe /dev/hda 
At 30 MiBytes: Slow read around offset 10485760, max read time: 6.250 sec, data rate: 1 MiBytes/sec 
At 2940 MiBytes: Short read at offset 5636096 
At 2940 MiBytes: Slow read around offset 10485760, max read time: 9.362 sec, data rate: 1 MiBytes/sec 
At 68980 MiBytes: Slow read around offset 10485760, max read time: 0.539 sec, data rate: 9 MiBytes/sec 
At 114470 MiBytes: Short read at offset 3629056 
At 114470 MiBytes: EOF 
Summary: disk size 112 GiBytes, 3 slow reads, 1 short reads, 0 unreadable areas, data rate 1 to 47 MiBytes/sec, longest read time\
 9.362 sec 

A disk scrubber run on a failed disk:

Observe: at 4700 MiBytes, a read operation took more than 200 seconds and could not read all the requested data (short read). \ The true disk size is 160 GBytes

 
# /usr/sbin/diskscrub.exe /dev/sdb 
At 4700 MiBytes: Slow read around offset 524288, read time: 244.713 sec 
At 4700 MiBytes: Short read at offset 749568 
At 4700 MiBytes: Extremely slow read at offset 749568: 244.713 sec, giving up. 
Summary: disk size 5 GiBytes, 2 slow reads, 1 short reads, 0 unreadable areas, d 
ata rate 49 to 117 MiBytes/sec, longest read time 244.713 sec 

Download