[Linux Kernel] SCSI Medium Error 시 SD 5회 retry 관련 문의

oldkyeom의 이미지

안녕하세요. 문의드릴게 있어서 글 남겨봅니다.

현재 badblocks Opensource를 크로스컴파일하여 개발중인 arm 보드에서 베드블록 검사를 하려고 하고 있습니다.

실제로 sda 에 배드블록이 다수 발생한 HDD를 arm 보드에 연결한 후 badblocks read 검사를 하게되면

drivers/scsi/sd.h 에 SD_MAX_RETRIES 만큼 Ata Error Handling(ATA Link Reset 으로 추정) 이 처리된 후

scsi device Error 가 처리되면서 배드블록 갯수가 증가합니다.

이때 ATA Link Reset을 반복하는 동안에 시간이 상당히 걸립니다.

그래서 Linux PC에서는 어떨가 테스트를 해보니 Badblock이 빠르게 검출됩니다.

제가 사용하는 보드에서 badblocks 를 빨리 돌아가게 할 수 있는 방법이 있을까요?
(실제로 SD_MAX_RETRIES 를 0으로 바꾸어 테스트해보니, PC 에서 돌린것과 거의 동일하게 시간이 소요됩니다)

[발생로그]
0.11% done (2128558 / 1953514583), 3:23:47 elapsed. (1145/0/0 errors)
badblock : 2128558 found
ata1.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
ata1.01: failed command: READ DMA
ata1.01: cmd c8/00:08:58:f5:40/00:00:00:00:00/e0 tag 0 dma 4096 in
res 51/40:08:58:f5:40/00:00:00:00:00/e0 Emask 0x9 (media error)
ata1.01: status: { DRDY ERR }
ata1.01: error: { UNC }
ata1.01: configured for UDMA/133
ata1: EH complete
ata1.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
ata1.01: failed command: READ DMA
ata1.01: cmd c8/00:08:58:f5:40/00:00:00:00:00/e0 tag 0 dma 4096 in
res 51/40:08:58:f5:40/00:00:00:00:00/e0 Emask 0x9 (media error)
ata1.01: status: { DRDY ERR }
ata1.01: error: { UNC }
ata1.01: configured for UDMA/133
ata1: EH complete
ata1.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
ata1.01: failed command: READ DMA
ata1.01: cmd c8/00:08:58:f5:40/00:00:00:00:00/e0 tag 0 dma 4096 in
res 51/40:08:58:f5:40/00:00:00:00:00/e0 Emask 0x9 (media error)
ata1.01: status: { DRDY ERR }
ata1.01: error: { UNC }
ata1.01: configured for UDMA/133
ata1: EH complete
ata1.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
ata1.01: failed command: READ DMA
ata1.01: cmd c8/00:08:58:f5:40/00:00:00:00:00/e0 tag 0 dma 4096 in
res 51/40:08:58:f5:40/00:00:00:00:00/e0 Emask 0x9 (media error)
ata1.01: status: { DRDY ERR }
ata1.01: error: { UNC }
ata1.01: configured for UDMA/133
ata1: EH complete
usb 2-2: USB disconnect, device number 73
ata1.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
ata1.01: failed command: READ DMA
ata1.01: cmd c8/00:08:58:f5:40/00:00:00:00:00/e0 tag 0 dma 4096 in
res 51/40:08:58:f5:40/00:00:00:00:00/e0 Emask 0x9 (media error)
ata1.01: status: { DRDY ERR }
ata1.01: error: { UNC }
ata1.01: configured for UDMA/133
sd 0:1:0:0: [sda] Unhandled sense code
sd 0:1:0:0: [sda] Result: hostbyte=0x00 driverbyte=0x08
sd 0:1:0:0: [sda] Sense Key : 0x3 [current] [descriptor]
Descriptor sense data with sense descriptors (in hex):
72 03 11 04 00 00 00 0c 00 0a 80 00 00 00 00 00
00 40 f5 58
sd 0:1:0:0: [sda] ASC=0x11 ASCQ=0x4
sd 0:1:0:0: [sda] CDB: cdb[0]=0x28: 28 00 00 40 f5 58 00 00 08 00
end_request: I/O error, dev sda, sector 4257112
Buffer I/O error on device sda, logical block 532139
ata1: EH complete
0.11% done (2128559 / 1953514583), 3:23:57 elapsed. (1146/0/0 errors)

익명 사용자의 이미지

혹시 하드는 2.5인치인가요, 3.5인치인가요? 그리고 하드에 전원 공급은 어떻게 하고 있나요? ARM 보드 SoC 종류는 무엇인가요?

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.