You are not logged in.

#1 2011-05-05 16:46:19

porcupene
Member
Registered: 2010-03-01
Posts: 34

How to ckeck a HDD for bad sectors.

Hi, how do I ckeck a HDD for bad sectors? I don't seem to find an option for fsck to do this. Does the filesystem matter?

Offline

#2 2011-05-05 17:40:36

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,793

Re: How to ckeck a HDD for bad sectors.

Does the drive support SMART?  If so, I would use one of the many tools to cause the SMART subsystem to perform a full drive test.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2011-05-05 17:52:34

ChoK
Member
From: France
Registered: 2008-10-01
Posts: 346

Re: How to ckeck a HDD for bad sectors.

The filesystem matters, it stores the bad blocks. For ext2/3/4 : man e2fsck, e2fsck -ckvf eventually with the -p option should do what you need on UNMOUNTED ext2/3/4 filesystem. Never use badblocks alone


Ah, good taste! What a dreadful thing! Taste is the enemy of creativeness.
Picasso
Perfection is reached, not when there is no longer anything to add, but when there is no longer anything to take away.
Saint Exupéry

Offline

#4 2011-05-05 19:17:05

Damon
Member
From: Germany
Registered: 2009-04-09
Posts: 7

Re: How to ckeck a HDD for bad sectors.

To analyze SMART information you can try hdsentinel (installable from aur)

Offline

#5 2011-05-05 20:05:22

porcupene
Member
Registered: 2010-03-01
Posts: 34

Re: How to ckeck a HDD for bad sectors.

ewaller wrote:

Does the drive support SMART?  If so, I would use one of the many tools to cause the SMART subsystem to perform a full drive test.

They do. So what tool do you recommend? (preferably with a GUI)

Offline

#6 2011-05-05 21:22:38

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,793

Re: How to ckeck a HDD for bad sectors.

palimpsest (provided by gnome-disk-utility)

But -- You can run some SMART functions on a mounted drive.  Others, like surface scans, you cannot.  If you are trying to scan a drive that has to have partitions mounted in your installation, you will need to boot from another disk.  It might be easier to boot from an install USB with smartmontools installed.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#7 2011-05-05 21:36:04

student975
Member
From: Russian Federation
Registered: 2011-03-05
Posts: 613

Re: How to ckeck a HDD for bad sectors.

@ewaller

gsmartcontrol (GUI for smartmontools) says all self-tests are safe wrt data and "Extended self-test examines complete disk surface and performs various test routines built into the drive".


"I exist" is the best myth I know..

Offline

#8 2011-05-05 21:51:07

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,793

Re: How to ckeck a HDD for bad sectors.

student975 wrote:

@ewaller

gsmartcontrol (GUI for smartmontools) says all self-tests are safe wrt data and "Extended self-test examines complete disk surface and performs various test routines built into the drive".

I believe all of that.  I'm just not sure about the implications of trying it with a mounted file system.  At the very least, I would expect the system to become extremely disk bound.  Other scenarios are the drive might end or suspend the test to service other requests, or, the drive could become unresponsive to the point that the kernel pitches a fit.

If the tools allow you to start a test, I suppose the worst that can happen is a system crash with un-synced disks.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#9 2011-05-05 22:12:28

student975
Member
From: Russian Federation
Registered: 2011-03-05
Posts: 613

Re: How to ckeck a HDD for bad sectors.

@ewaller

IIRC, there are variants to configure smart tools daemon to perform such tests/reports for drives under production mode on constant base (say,weekly). OTOH, I guess, nuances depend on concrete drive model/firmware.


"I exist" is the best myth I know..

Offline

#10 2011-05-06 07:49:57

porcupene
Member
Registered: 2010-03-01
Posts: 34

Re: How to ckeck a HDD for bad sectors.

gsmartcontrol (smartmontools) does the job. It does not require unmounting the partition while performing the extended test. However I did not write/read anything to that disk hile the test was running. Thanks guys!

Offline

Board footer

Powered by FluxBB