RAID-1 and bad sectors?

F

Folkert Rienstra

Rod Speed said:
(e-mail address removed) wrote Rod Speed (e-mail address removed) wrote



Yeah, you can get that result on some systems.

Particularly those where the S.M.A.R.T. driver isn't installed or
the driver isn't S.M.A.R.T. compatible.
Usually the RAID drivers are not.
 
F

Folkert Rienstra

J. Clarke said:
Which "defect count"? That's not one of the standard SMART fields. You
should be looking 0x0033, which is usually the reallocated sectors count.
Also, SMART counters are not always intuitive--some of them start at a high
value and count down.

'Some of them', eh?
Could be that if it's showing zero it means that
all the available sectors have been remapped.

Or that there is still the last hand full available.
Point is that you have likely very long ago passed the threshold for that value.
Also, some drives reset the counters after the first 8 hours or so of operation.

So what.
You also need to obtain the manufacturer's docs--the SMART fields are not
completely standardized.

There's a great deal of useful information at
<http://smartmontools.sourceforge.net/>--follow the "useful references"
link and you'll find actual SMART reports on failing drives, some of them
Maxtor.

And if you look at them you'll notice that the RAW counters just count up-
ward and are actual numbers, unlike the thermometer type attribute values.
 
F

Folkert Rienstra

Yeah, since the offline test will read the entire disk, then if there are any
bad sectors, they'll definitely show up in the SMART data after running a
test.

The only time a bad sector won't show up in the SMART data is if data has
never been read from or written to it.
I hope I got that right.

Sorry to disappoint you. No checks on writes unless the sector is blacklisted:
is a bad sector candidate/pending bad sector.
 
F

Folkert Rienstra

philo said:
Go to the website of the HD's mfg and download the diagnostic utility
and run it.
If *any* errors are found..backup your data and replace the disc.
At any rate...I'd never use a drive with bad sectors in a RAID situation

Obvious lie. There is no such thing as a drive without bad sectors.
 
F

Folkert Rienstra

So the hard drive will detect a bad sector and then find a good sector
to which to write the data?

Kind of.
Based on what Chuck F. said, the hard drive will
just write the data to whichever sector, even if its bad.

Basically yes, if it doesn't know about it being bad.
No, if the sector is a socalled bad sector candidate.
Then it will be write-checked and reallocated if necessary.
 
F

Folkert Rienstra

Chuck F. said:
Which may mean that you wrote some of your actual data into a
failing "unused" area,

It wouldn't be unused then, now would it.
and that that data is now lost or altered.

Yup, that's why it is called "unused".
 
F

Folkert Rienstra

I just used BootItNG to resize the 2 NTFS partitions on my hard disk. I was
increasing the size of the C drive, so I had to shrink the D drive and slide
it down to the end of the disk. When I did the slide operation, I told it to
slide everything including the unused areas. I ended up getting an "error
reading from hard disk" message. So I retried the slide operation, but just
told it to slide the data only. That worked, so maybe there was a bad sector
in an unused area?

Anyways, I'm now ready to set up RAID-1 in my system. But I'm wondering if
that bad sector might cause a problem in a RAID-1 setup?
I know RAID-1 is supposed to help you if a drive fails.

And there are lots of broken products on the market that fail miserably when
actually taken to task.
But what if a drive doesn't totally stop working...
what if it only develops a few bad sectors?
Can RAID-1 handle that?

Common sense says that it should with last decade drive technology. But OSes
and drivers still basically behave the same as 10-20 years ago, so who's to say.
Common sense is often lacking in RAID products.
(I'll be using the HighPoint 370 controller on my Abit KT7-RAID motherboard.)
Like what would happen if the RAID controller is writing some data, and one of
the drives is OK but the other drive has some bad sectors on it?

Bad sectors should only matter on reads and corrected by data from the 'perfect' drive.
Can the RAID controller detect the bad sectors and write the data to good sectors?

No, unless it reads all data back that it writes, which is very inefficient and therefor
doesn't happen.
Or will it not detect the bad sectors and the 2 drives will be out-of-sync?

Yes and no.
Badly written data will not be detected until the next read to that data so until
that time the drives will not be out of sync even though technically they are.
Harddrives do not write-check on standard writes.
With write caching enabled they don't wait for writes to finish even.
 
F

Folkert Rienstra

Arno Wagner said:
It will detect a bad sector only if it reads from it. In that case
it will fail-over to the other disk. Many RAID controllers will
also mark the disk as bad and kick it form the array. If you
have bad sectors on eiter disk in different places that behaviour
is not too desirable, but in this case you are in trouble anyways,
since modern disks only exhibit bad sectors if they are dying or
have very serious problems.

Ignore the blithering idiot.
Bad power supply or overheating can cause these symptoms where the drive is not at fault.
Now, you might be in this situation and then your best bet is
possibly RAID recovery software (have seen some, don't remember
where) or if your controller allows you to disable the kicking on
defects. Linux software RAID seems not to allow you to do that.
What I would do in such a case is to mount both partitions/drives
read-only, determine which has less bad sectors, write them
down and copy that partition/drive to a good one. Then copy
the bad sectors on the first drive from the second one. If
ithe number of bad sectros is high, then script this using,
e.g., badblocks and dd_rescue.

When writing to a bad sector, the data will be written to both drives.
Since the data is written with checksums,
then the controller will recognize a bad sector and read it form the
other disk.

Nonsense, that is what the RAID driver will do.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top