I'm rather new to Linux, about 5 months on Ubuntu as server and secondary OS, so please bear with me.
I have a server box running Ubuntu 8.10 Desktop Edition and I've been having a problem with hard disk activity causing the system to lag badly, mouse and everything.
I have a 160GB PATA hard drive (ATA100 controller) with multiple partitions including NTFS.
The motherboard is a Shuttle AK32L with a VIA VT8233 southbridge.
After finding out about hdparm and testing the drive, I've found that it was running on udma2.
Code:sudo hdparm -Tt /dev/sda /dev/sda: Timing cached reads: 176 MB in 2.01 seconds = 87.41 MB/sec Timing buffered disk reads: 8 MB in 3.69 seconds = 2.17 MB/secI tried switching it back to udma5...Code:sudo hdparm -I /dev/sda /dev/sda: ATA device, with non-removable media Model Number: SAMSUNG SP1614N Serial Number: S016J10X509293 Firmware Revision: TM100-24 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: 268435455 LBA48 user addressable sectors: 312581808 device size with M = 1024*1024: 152627 MBytes device size with M = 1000*1000: 160041 MBytes (160 GB) 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 56min for SECURITY ERASE UNIT. 56min for ENHANCED SECURITY ERASE UNIT. HW reset results: CBLID- above Vih Device num = 0 determined by CSEL Checksum: correct
Modified /etc/modules:Code:sudo hdparm -X69 /dev/sda /dev/sda: setting xfermode to 69 (UltraDMA mode5) HDIO_DRIVE_CMD(setxfermode) failed: Input/output error
Added to /etc/hdparm.conf:Code:fuse lp #custom start amd74xx mousedev psmouse via82cxxx piix ide-core #ide-generic ide-disk ide-cd #custom end
After rebooting, DMA was back up at udma5.Code:/dev/sda { dma = on io32_support = 1 write_cache = on }
Code:sudo hdparm -i /dev/sda /dev/sda: Model=SAMSUNG SP1614N , FwRev=TM100-24, SerialNo=S016J10X509293 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs } RawCHS=16383/16/63, TrkSize=34902, SectSize=554, ECCbytes=4 BuffType=DualPortCache, BuffSize=8192kB, MaxMultSect=16, MultSect=?16? CurCHS=65535/1/63, CurSects=4128705, LBA=yes, LBAsects=312581808 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 modeThen when I tried copying a large folder from an NTFS partition to an ext3 partition, a file encountered an I/O error, and that's when it went back to udma2. It appears to be a specific file causing the error, in this case it's a map for a Half-Life 2 mod which I was planning to set up a server, so it's easily replaceable.Code:sudo hdparm -Tt /dev/sda /dev/sda: Timing cached reads: 448 MB in 2.01 seconds = 223.26 MB/sec Timing buffered disk reads: 170 MB in 3.03 seconds = 56.03 MB/sec
Anyway, basically what I'm asking, is there a way to prevent DMA from switching to a slower mode when it encounters an I/O error on a file? Or if not that, is there at least a way to switch it back to udma5 without rebooting? The I/O errors appear (I'm hoping) to be isolated file corruption rather than a problem with the actual hardware, something bound to happen to anyone from time to time. It works perfectly fine on udma5 until it hits a bad file and switches to udma2.
Also does anyone have suggestions for tools to check and fix drive/file problems?
Let me know if any more info is needed, I don't want to fill the first post with too many unnecessary details.



Adv Reply

Bookmarks