Автор Тема: Сломанный UDMA  (Прочитано 1982 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн daniel

  • Новичок форума
  • Topic Author
  • Сообщений: 3
Сломанный UDMA
« : 03 Декабрь 2012, 23:01:44 »
Здравствуйте!

Имеется старенький IDE жесткий диск SAMSUNG SP0802N у которого имеются проблемы с UDMA. Я отключил поддержку UDMA в BIOS'е для данного диска, т.к. если ее включить то grub стартует раз через раз, а если и стартует то через n-ое кол-во времени. Но ОС при этом загружается долго и ругается на этот жесткий диск.

Вот вывод команды kern.log | greep ata (последняя загрузка)
Spoiler: ShowHide

Dec  4 06:00:36 home kernel: [    0.000000]  BIOS-e820: 000000005fff3000 - 0000000060000000 (ACPI data)
Dec  4 06:00:36 home kernel: [    0.000000]   #0 [0000000000 - 0000001000]   BIOS data page ==> [0000000000 - 0000001000]
Dec  4 06:00:36 home kernel: [    0.000000] Memory: 1550040k/1572800k available (2506k kernel code, 21284k reserved, 1326k data, 380k init, 667592k high mem)
Dec  4 06:00:36 home kernel: [    0.000000]       .data : 0xc1272b9b - 0xc13be4c4   (1326 kB)
Dec  4 06:00:36 home kernel: [    0.702538] Write protecting the kernel read-only data: 920k
Dec  4 06:00:36 home kernel: [    0.804886] libata version 3.00 loaded.
Dec  4 06:00:36 home kernel: [    1.152098] ata_piix 0000:00:1f.1: version 2.13
Dec  4 06:00:36 home kernel: [    1.160219] ata_piix 0000:00:1f.1: PCI INT A -> Link[LNKC] -> GSI 9 (level, low) -> IRQ 9
Dec  4 06:00:36 home kernel: [    1.160303] ata_piix 0000:00:1f.1: setting latency timer to 64
Dec  4 06:00:36 home kernel: [    1.171727] scsi0 : ata_piix
Dec  4 06:00:36 home kernel: [    1.180949] scsi1 : ata_piix
Dec  4 06:00:36 home kernel: [    1.182451] ata1: PATA max UDMA/100 cmd 0x1f0 ctl 0x3f6 bmdma 0xf000 irq 14
Dec  4 06:00:36 home kernel: [    1.182457] ata2: PATA max UDMA/100 cmd 0x170 ctl 0x376 bmdma 0xf008 irq 15
Dec  4 06:00:36 home kernel: [    1.364476] ata2.00: ATA-6: WDC WD800JB-00JJC0, 05.01C05, max UDMA/100
Dec  4 06:00:36 home kernel: [    1.364484] ata2.00: 156301488 sectors, multi 16: LBA
Dec  4 06:00:36 home kernel: [    1.364679] ata2.01: HPA detected: current 156365903, native 156368016
Dec  4 06:00:36 home kernel: [    1.364687] ata2.01: ATA-7: SAMSUNG SP0802N, TK200-04, max UDMA/100
Dec  4 06:00:36 home kernel: [    1.364691] ata2.01: 156365903 sectors, multi 16: LBA48
Dec  4 06:00:36 home kernel: [    1.372361] ata2.00: configured for UDMA/100
Dec  4 06:00:36 home kernel: [    1.380360] ata2.01: configured for UDMA/100
Dec  4 06:00:36 home kernel: [    1.406779] ata1.00: HPA detected: current 156299375, native 156301488
Dec  4 06:00:36 home kernel: [    1.406787] ata1.00: ATA-7: ST3802110A, 3.AAJ, max UDMA/100
Dec  4 06:00:36 home kernel: [    1.406792] ata1.00: 156299375 sectors, multi 16: LBA48
Dec  4 06:00:36 home kernel: [    1.406995] ata1.01: ATA-7: SAMSUNG SP0802N, TK200-04, max UDMA/100
Dec  4 06:00:36 home kernel: [    1.407001] ata1.01: 156368016 sectors, multi 16: LBA48
Dec  4 06:00:36 home kernel: [    1.473396] ata1.00: configured for UDMA/100
Dec  4 06:00:36 home kernel: [    1.480361] ata1.01: configured for UDMA/100
Dec  4 06:00:36 home kernel: [   31.816041] ata2: lost interrupt (Status 0x58)
Dec  4 06:00:36 home kernel: [   31.820005] ata2: drained 2048 bytes to clear DRQ.
Dec  4 06:00:36 home kernel: [   31.820512] ata2.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
Dec  4 06:00:36 home kernel: [   31.820572] ata2.01: failed command: READ DMA
Dec  4 06:00:36 home kernel: [   31.820626] ata2.01: cmd c8/00:08:00:00:00/00:00:00:00:00/f0 tag 0 dma 4096 in
Dec  4 06:00:36 home kernel: [   31.820727] ata2.01: status: { DRDY }
Dec  4 06:00:36 home kernel: [   36.860025] ata2: link is slow to respond, please be patient (ready=0)
Dec  4 06:00:36 home kernel: [   41.844026] ata2: device not ready (errno=-16), forcing hardreset
Dec  4 06:00:36 home kernel: [   41.844037] ata2: soft resetting link
Dec  4 06:00:36 home kernel: [   42.024367] ata2.00: configured for UDMA/100
Dec  4 06:00:36 home kernel: [   42.032364] ata2.01: configured for UDMA/100
Dec  4 06:00:36 home kernel: [   42.032374] ata2.01: device reported invalid CHS sector 0
Dec  4 06:00:36 home kernel: [   42.032394] ata2: EH complete
Dec  4 06:00:36 home kernel: [   72.816057] ata2: lost interrupt (Status 0x58)
Dec  4 06:00:36 home kernel: [   72.820011] ata2: drained 2048 bytes to clear DRQ.
Dec  4 06:00:36 home kernel: [   72.820466] ata2.01: limiting speed to UDMA/66:PIO4
Dec  4 06:00:36 home kernel: [   72.820473] ata2.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
Dec  4 06:00:36 home kernel: [   72.820532] ata2.01: failed command: READ DMA
Dec  4 06:00:36 home kernel: [   72.820587] ata2.01: cmd c8/00:08:00:00:00/00:00:00:00:00/f0 tag 0 dma 4096 in
Dec  4 06:00:36 home kernel: [   72.820689] ata2.01: status: { DRDY }
Dec  4 06:00:36 home kernel: [   77.860025] ata2: link is slow to respond, please be patient (ready=0)
Dec  4 06:00:36 home kernel: [   82.844029] ata2: device not ready (errno=-16), forcing hardreset
Dec  4 06:00:36 home kernel: [   82.844040] ata2: soft resetting link
Dec  4 06:00:36 home kernel: [   83.024377] ata2.00: configured for UDMA/100
Dec  4 06:00:36 home kernel: [   83.032364] ata2.01: configured for UDMA/66
Dec  4 06:00:36 home kernel: [   83.032373] ata2.01: device reported invalid CHS sector 0
Dec  4 06:00:36 home kernel: [   83.032393] ata2: EH complete
Dec  4 06:00:36 home kernel: [  113.816045] ata2: lost interrupt (Status 0x58)
Dec  4 06:00:36 home kernel: [  113.820005] ata2: drained 2048 bytes to clear DRQ.
Dec  4 06:00:36 home kernel: [  113.820514] ata2.01: limiting speed to UDMA/33:PIO4
Dec  4 06:00:36 home kernel: [  113.820521] ata2.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
Dec  4 06:00:36 home kernel: [  113.820581] ata2.01: failed command: READ DMA
Dec  4 06:00:36 home kernel: [  113.820636] ata2.01: cmd c8/00:08:00:00:00/00:00:00:00:00/f0 tag 0 dma 4096 in
Dec  4 06:00:36 home kernel: [  113.820737] ata2.01: status: { DRDY }
Dec  4 06:00:36 home kernel: [  118.860025] ata2: link is slow to respond, please be patient (ready=0)
Dec  4 06:00:36 home kernel: [  123.844026] ata2: device not ready (errno=-16), forcing hardreset
Dec  4 06:00:36 home kernel: [  123.844037] ata2: soft resetting link
Dec  4 06:00:36 home kernel: [  124.024379] ata2.00: configured for UDMA/100
Dec  4 06:00:36 home kernel: [  124.032379] ata2.01: configured for UDMA/33
Dec  4 06:00:36 home kernel: [  124.032389] ata2.01: device reported invalid CHS sector 0
Dec  4 06:00:36 home kernel: [  124.032409] ata2: EH complete
Dec  4 06:00:36 home kernel: [  154.816039] ata2: lost interrupt (Status 0x58)
Dec  4 06:00:36 home kernel: [  154.820004] ata2: drained 2048 bytes to clear DRQ.
Dec  4 06:00:36 home kernel: [  154.820445] ata2.01: limiting speed to PIO4
Dec  4 06:00:36 home kernel: [  154.820452] ata2.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
Dec  4 06:00:36 home kernel: [  154.820511] ata2.01: failed command: READ DMA
Dec  4 06:00:36 home kernel: [  154.820567] ata2.01: cmd c8/00:08:00:00:00/00:00:00:00:00/f0 tag 0 dma 4096 in
Dec  4 06:00:36 home kernel: [  154.820698] ata2.01: status: { DRDY }
Dec  4 06:00:36 home kernel: [  159.860025] ata2: link is slow to respond, please be patient (ready=0)
Dec  4 06:00:36 home kernel: [  164.844026] ata2: device not ready (errno=-16), forcing hardreset
Dec  4 06:00:36 home kernel: [  164.844037] ata2: soft resetting link
Dec  4 06:00:36 home kernel: [  165.024376] ata2.00: configured for UDMA/100
Dec  4 06:00:36 home kernel: [  165.032363] ata2.01: configured for PIO4
Dec  4 06:00:36 home kernel: [  165.032373] ata2.01: device reported invalid CHS sector 0
Dec  4 06:00:36 home kernel: [  165.032392] ata2: EH complete
Dec  4 06:00:36 home kernel: [  165.617788] EXT4-fs (sda2): mounted filesystem with ordered data mode
Dec  4 06:00:36 home kernel: [  175.877962] EXT4-fs (dm-7): mounted filesystem with ordered data mode
Dec  4 06:00:36 home kernel: [  175.969069] EXT4-fs (dm-8): mounted filesystem with ordered data mode
Dec  4 06:00:36 home kernel: [  176.073380] EXT4-fs (dm-6): mounted filesystem with ordered data mode
Dec  4 06:00:36 home kernel: [  176.148756] EXT4-fs (dm-2): mounted filesystem with ordered data mode
Dec  4 06:00:36 home kernel: [  176.304628] EXT4-fs (dm-5): mounted filesystem with ordered data mode
Dec  4 06:00:36 home kernel: [  176.394470] EXT4-fs (dm-3): mounted filesystem with ordered data mode
Dec  4 06:00:36 home kernel: [  176.521983] EXT4-fs (dm-4): mounted filesystem with ordered data mode
Dec  4 06:00:36 home kernel: [  176.727880] EXT4-fs (dm-9): mounted filesystem with ordered data mode
Dec  4 06:00:36 home kernel: [  176.910926] EXT4-fs (dm-0): mounted filesystem with ordered data mode
Dec  4 06:00:36 home kernel: [  177.084271] EXT4-fs (dm-1): mounted filesystem with ordered data mode


Если я правильно понимаю данный вывод, то тут ядро переключает режим работы жесткого диска и диск нормально работает только в режиме PIO4 что и не удивительно. По сути проблему долгой загрузки можно решить, принудительно задав режим PIO4 по умолчанию. Как это сделать?

Проблема точно в железе т.к. у меня два диска этой модели и UDMA не работает только на одном. Можно ли вылечить, т.е. завести режим UDMA на этом диске?
Примечание: пожалуйста не предлагайте замену жесткого диска это крайняя мера.

Может пригодиться вывод hdparm -iIv /dev/disk/by-id/ata-SAMSUNG_SP0802N_S00JJ40XB55782
Spoiler: ShowHide

/dev/disk/by-id/ata-SAMSUNG_SP0802N_S00JJ40XB55782:
 multcount     = 16 (on)
 IO_support    =  1 (32-bit)
 readonly      =  0 (off)
 readahead     = 256 (on)
 geometry      = 9733/255/63, sectors = 156365903, start = 0

 Model=SAMSUNG SP0802N, FwRev=TK200-04, SerialNo=S00JJ40XB55782
 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
 RawCHS=16383/16/63, TrkSize=34902, SectSize=554, ECCbytes=4
 BuffType=DualPortCache, BuffSize=2048kB, MaxMultSect=16, MultSect=16
 CurCHS=65535/1/63, CurSects=4128705, LBA=yes, LBAsects=156365903
 IORDY=on/off, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4
 DMA modes:  mdma0 mdma1 mdma2
 UDMA modes: udma0 udma1 *udma2 udma3 udma4 udma5
 AdvancedPM=no WriteCache=enabled
 Drive conforms to: ATA/ATAPI-7 T13 1532D revision 0:  ATA/ATAPI-1,2,3,4,5,6,7

 * signifies the current active mode


ATA device, with non-removable media
        Model Number:       SAMSUNG SP0802N                         
        Serial Number:      S00JJ40XB55782     
        Firmware Revision:  TK200-04
Standards:
        Used: ATA/ATAPI-7 T13 1532D revision 0
        Supported: 7 6 5 4
Configuration:
        Logical         max     current
        cylinders       16383   65535
        heads           16      1
        sectors/track   63      63
        --
        CHS current addressable sectors:    4128705
        LBA    user addressable sectors:  156365903
        LBA48  user addressable sectors:  156365903
        Logical/Physical Sector size:           512 bytes
        device size with M = 1024*1024:       76350 MBytes
        device size with M = 1000*1000:       80059 MBytes (80 GB)
        cache/buffer size  = 2048 KBytes (type=DualPortCache)
Capabilities:
        LBA, IORDY(can be disabled)
        Standby timer values: spec'd by Standard, no device specific minimum
        R/W multiple sector transfer: Max = 16  Current = 16
        Recommended acoustic management value: 254, current value: 0
        DMA: mdma0 mdma1 mdma2 udma0 udma1 *udma2 udma3 udma4 udma5
             Cycle time: min=120ns recommended=120ns
        PIO: pio0 pio1 pio2 pio3 pio4
             Cycle time: no flow control=240ns  IORDY flow control=120ns
Commands/features:
        Enabled Supported:
                SMART feature set
                Security Mode feature set
           *    Power Management feature set
           *    Write cache
           *    Look-ahead
           *    Host Protected Area feature set
           *    WRITE_BUFFER command
           *    READ_BUFFER command
           *    DOWNLOAD_MICROCODE
                SET_MAX security extension
                Automatic Acoustic Management feature set
           *    48-bit Address feature set
           *    Device Configuration Overlay feature set
           *    Mandatory FLUSH_CACHE
           *    FLUSH_CACHE_EXT
           *    SMART error logging
           *    SMART self-test
Security:
        Master password revision code = 65534
                supported
        not     enabled
        not     locked
        not     frozen
        not     expired: security count
                supported: enhanced erase
        28min for SECURITY ERASE UNIT. 28min for ENHANCED SECURITY ERASE UNIT.
HW reset results:
        CBLID- above Vih
        Device num = 1 determined by the jumper
Checksum: correct


Модель материнской платы Epox EP-4PEA800
Чипсет i845PE
ОС Debian 6.0.6, ядро 2.6.32-5-686.

Примечание: Так же не уместна критика по поводу возраста оборудования.
« Последнее редактирование: 03 Декабрь 2012, 23:33:27 от daniel »
 


Оффлайн qupl

  • Главный модератор
  • Ветеран
  • *****
  • Сообщений: 5008
  • memento mori
  • Jabber: qupl@jabber.ru
Re: Сломанный UDMA
« Ответ #1 : 04 Декабрь 2012, 06:57:31 »
Яндекс говорит, что эти параметры при загрузке ядра должны помочь
generic.all_generic_ide=1
 ide=nodma

Оффлайн daniel

  • Новичок форума
  • Topic Author
  • Сообщений: 3
Re: Сломанный UDMA
« Ответ #2 : 04 Декабрь 2012, 20:17:52 »
generic.all_generic_ide=1
 ide=nodma

Я так понимаю это отключит DMA для всех IDE  интерфейсах, желательно конечно отключить DMA только на одном устройстве.

Передача этих параметров не меняет результат.
« Последнее редактирование: 05 Декабрь 2012, 06:06:43 от daniel »
 

Теги: