Article 6N327 Check for bad blocks on RAID member

Check for bad blocks on RAID member

by
mfoley
from LinuxQuestions.org on (#6N327)
I have a RAID-5 with smartctl reporting read errors on one of the members (/dev/sdb). Before replacing the drive, I would like to check for and lock-out any bad blocks on that drive. I can remove the drive from being a member of the array.

I could use badblocks to check the drive, but the manpage cautions:
Quote:
If the output of badblocks is going to be fed to the e2fsck or mke2fs programs, it is
important that the block size is properly specified, since the block numbers which are generated are
very dependent on the block size in use by the file system. For this reason, it is strongly recom
mended that users not run badblocks directly, but rather use the -c option of the e2fsck and mke2fs
programs.
The problem here is that the partitions on that drive are Linux RAID Members not ext4, and doing fsck or mkfs is done on the RAID device (/dev/md0), not the drive partitions, so I doubt doing 'mkfs.ext4 -L badBlockFile /dev/md0' is going to work. on a multi-drive device.

Is there some other way of detecting and lockout out bad blocks at the device level?
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments