High iowait三, 06/11/2019 - 10:57 的修訂版本

修訂版本可以讓你追蹤文章的多個版本的不同之處。

 

 

 


 

# 當 High iowait 時

# Centos 7 message log

Oct 31 20:03:38 backup1 kernel: ata4.00: failed command: READ FPDMA QUEUED
Oct 31 20:03:38 backup1 kernel: ata4.00: cmd 60/08:e0:10:11:be/00:00:52:00:00/40 tag 28 ncq 4096 in#012         res 50/00:08:a0:11:be/00:00
:52:00:00/40 Emask 0x10 (ATA bus error)
Oct 31 20:03:38 backup1 kernel: ata4.00: status: { DRDY }

... 一堆堆重復 Error ...

Oct 27 14:15:06 backup1 kernel: ata4: hard resetting link
Oct 27 14:15:06 backup1 kernel: ata4: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
Oct 27 14:15:06 backup1 kernel: ata4.00: configured for UDMA/133
Oct 27 14:15:06 backup1 kernel: sd 4:0:0:0: [sdd] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Oct 27 14:15:06 backup1 kernel: sd 4:0:0:0: [sdd] Sense Key : Illegal Request [current] [descriptor]
Oct 27 14:15:06 backup1 kernel: sd 4:0:0:0: [sdd] Add. Sense: Unaligned write command
Oct 27 14:15:06 backup1 kernel: sd 4:0:0:0: [sdd] CDB: Read(16) 88 00 00 00 00 00 52 7d d9 10 00 00 00 08 00 00
Oct 27 14:15:06 backup1 kernel: blk_update_request: I/O error, dev sdd, sector 1383979280
Oct 27 14:15:06 backup1 kernel: sd 4:0:0:0: [sdd] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Oct 27 14:15:06 backup1 kernel: sd 4:0:0:0: [sdd] Sense Key : Illegal Request [current] [descriptor]
Oct 27 14:15:06 backup1 kernel: sd 4:0:0:0: [sdd] Add. Sense: Unaligned write command
Oct 27 14:15:06 backup1 kernel: sd 4:0:0:0: [sdd] CDB: Read(16) 88 00 00 00 00 00 52 7d d9 20 00 00 00 08 00 00
Oct 27 14:15:06 backup1 kernel: blk_update_request: I/O error, dev sdd, sector 1383979296
Oct 27 14:15:06 backup1 kernel: ata4: EH complete

 


找出 Sata 的 Disk

 

ls -l /sys/block/sd*

lrwxrwxrwx 1 root root 0 Nov  4 10:36 /sys/block/sda -> ../devices/pci0000:00/0000:00:17.0/ata1/host1/target1:0:0/1:0:0:0/block/sda
lrwxrwxrwx 1 root root 0 Nov  4 10:36 /sys/block/sdb -> ../devices/pci0000:00/0000:00:17.0/ata4/host4/target4:0:0/4:0:0:0/block/sdb
lrwxrwxrwx 1 root root 0 Nov  4 10:36 /sys/block/sdc -> ../devices/pci0000:00/0000:00:17.0/ata5/host5/target5:0:0/5:0:0:0/block/sdc
lrwxrwxrwx 1 root root 0 Nov  4 10:37 /sys/block/sdd -> ../devices/pci0000:00/0000:00:01.0/0000:01:00.0/host0/target0:2:0/0:2:0:0/block/sdd
lrwxrwxrwx 1 root root 0 Nov  4 10:37 /sys/block/sde -> ../devices/pci0000:00/0000:00:01.0/0000:01:00.0/host0/target0:2:1/0:2:1:0/block/sde

Script

ls -l /sys/block/sd* | sed -n 's/.*\(sd.\) -.*\(ata.*\)\/h.*/\2 => \1/p'

output

ata1 => sda
ata4 => sdb
ata5 => sdc