# badblocks and softraid

## SeeksTheMoon

I use a softraid mirror with two identical SATA disks, each containing one partition (sda1 and sdb1). The resulting md device uses ext4 as filesystem.

Today smartd sent me an email with the following content:

 *Quote:*   

> SMART error (CurrentPendingSector) detected on host
> 
> The following warning/error was logged by the smartd daemon:
> 
> Device: /dev/sda [SAT], 1 Currently unreadable (pending) sectors
> ...

 

The syslog says

 *Quote:*   

> Jul 15 04:15:52 [kernel] ata1.00: exception Emask 0x0 SAct 0x7ff SErr 0x0 action 0x0
> 
> Jul 15 04:15:52 [kernel] ata1.00: irq_stat 0x40000009
> 
> Jul 15 04:15:52 [kernel] ata1.00: cmd 60/d0:00:6f:17:cc/00:00:aa:00:00/40 tag 0 ncq 106496 in
> ...

 

I know that badblocks (which is running right now) will find the errorblock, but all the howtos I found (like http://smartmontools.sourceforge.net/badblockhowto.html) use badblocks on a single drive to find the block and exclude it in the filesystem but in my case there is the raid layer between the drives and the filesystem so I don't think it's wise to manipulate the filesystem in this case, which means I cannot use debugfs or fsck.

What can I do now?

----------

## SeeksTheMoon

oh, I'm sorry, in this case it is actually a raid5 with three identical drives and I bought them one week ago (and I didn't copy data to these new drives, only created the raid and filesystem), but the rest I wrote still applies

----------

