Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Without RAID-0, I usually check bad sectors using this command:

fsck -yvckfC -E fragcheck /dev/sdX

How to check bad sectors when the harddisk was using RAID-0? should I run it for each drive? /dev/sdb and /dev/sdc or using information from /proc/mdstat ?

# cat /proc/mdstat 
Personalities : [linear] [raid0] [raid1] 
md1 : active raid0 sda2[0] sdb2[1]
      7808789888 blocks 64k chunks

md0 : active raid1 sdb1[1] sda1[0]
      524224 blocks [2/2] [UU]

unused devices: <none>
share|improve this question
Why are you using RAID 0? – EEAA Apr 19 '14 at 4:31
because it's faster than JBOD (I'm using NAS to backup my files, ShareCenter DNS-320) – Kokizzu Apr 19 '14 at 4:32
So you have doubled the chance of losing all your backups to gain a bit of speed? – Grant Apr 21 '14 at 0:02
yes, I am a speed freak.. – Kokizzu Apr 22 '14 at 4:12

Bad block check must be done in the disk device itself, since you are using mdadm RAID you should stop the array and run checks on /dev/sda2 and /dev/sdb2.

But before doing this, if you value your data I do recommend a backup, the possibility of losing the entire RAID-0 array exists.

share|improve this answer

What I'd do in such a case is to simply use find, xargs and cat to read the entire disk content and if anything fails you lost data and will need to recover it. But this way you will immediately know which file lost data or which directory is lost. If you just use badblocks it will tell you a sector but not what to do to recover from the failure.

find . -type f | xargs -IX cat X
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.