Last part of it with two examples is in attachment.
Tejun Heo пишет:
Artem Bokhan wrote:
When I run 'dd if=/dev/sda of=/dev/null skip=9700 bs=1M' and it meets
bad block, it takes about
'/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:02.0/host4/target4:0:0/4:0:0:0/timeout
+ about 10 seconds' to determine I/O error. Until that IO to device is
locked, as I understand. I want to reduce the time of lock as much as
possible.
dd: reading `/dev/sda': Input/output error
240+1 records in
240+1 records out
252575744 bytes (253 MB) copied, 13.7833 s, 18.3 MB/s
Can you post timestamped dmesg?
[ 4199.496484] ata5.00: exception Emask 0x0 SAct 0x3 SErr 0x0 action 0x6 frozen
[ 4199.496520] ata5.00: cmd 60/00:00:00:a8:36/01:00:01:00:00/40 tag 0 ncq 131072 in
[ 4199.496522] res 40/00:08:e0:a7:36/01:00:01:00:00/00 Emask 0x4 (timeout)
[ 4199.496566] ata5.00: status: { DRDY }
[ 4199.496591] ata5.00: cmd 60/00:08:00:a7:36/01:00:01:00:00/40 tag 1 ncq 131072 in
[ 4199.496592] res 40/00:00:e0:a7:36/01:00:01:00:00/00 Emask 0x4 (timeout)
[ 4199.496635] ata5.00: status: { DRDY }
[ 4199.496662] ata5: hard resetting link
[ 4200.295533] ata5: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 4200.375552] ata5.00: max_sectors limited to 256 for NCQ
[ 4200.455551] ata5.00: max_sectors limited to 256 for NCQ
[ 4200.455553] ata5.00: configured for UDMA/133
[ 4200.455558] ata5: EH complete
[ 4200.455513] sd 4:0:0:0: [sde] 1465149168 512-byte hardware sectors (750156 MB)
[ 4200.455513] sd 4:0:0:0: [sde] Write Protect is off
[ 4200.455513] sd 4:0:0:0: [sde] Mode Sense: 00 3a 00 00
[ 4200.455513] sd 4:0:0:0: [sde] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 4201.672540] ata5.00: exception Emask 0x0 SAct 0x3 SErr 0x0 action 0x6 frozen
[ 4201.672573] ata5.00: cmd 60/00:00:00:a7:36/01:00:01:00:00/40 tag 0 ncq 131072 in
[ 4201.672574] res 40/00:08:e0:a7:36/01:00:01:00:00/00 Emask 0x4 (timeout)
[ 4201.672618] ata5.00: status: { DRDY }
[ 4201.672643] ata5.00: cmd 60/00:08:00:a8:36/01:00:01:00:00/40 tag 1 ncq 131072 in
[ 4201.672644] res 40/00:00:e0:a7:36/01:00:01:00:00/00 Emask 0x4 (timeout)
[ 4201.672687] ata5.00: status: { DRDY }
[ 4201.672713] ata5: hard resetting link
[ 4202.508032] ata5: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 4202.588051] ata5.00: max_sectors limited to 256 for NCQ
[ 4202.668051] ata5.00: max_sectors limited to 256 for NCQ
[ 4202.668053] ata5.00: configured for UDMA/133
[ 4202.668057] ata5: EH complete
[ 4202.668013] sd 4:0:0:0: [sde] 1465149168 512-byte hardware sectors (750156 MB)
[ 4202.668013] sd 4:0:0:0: [sde] Write Protect is off
[ 4202.668013] sd 4:0:0:0: [sde] Mode Sense: 00 3a 00 00
[ 4202.668013] sd 4:0:0:0: [sde] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 4203.760548] ata5.00: exception Emask 0x0 SAct 0x2 SErr 0x0 action 0x6 frozen
[ 4203.760581] ata5.00: cmd 60/00:08:00:a7:36/01:00:01:00:00/40 tag 1 ncq 131072 in
[ 4203.760582] res 40/00:00:e0:a7:36/01:00:01:00:00/00 Emask 0x4 (timeout)
[ 4203.760626] ata5.00: status: { DRDY }
[ 4203.760651] ata5: hard resetting link
[ 4204.383548] ata5: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 4204.463561] ata5.00: max_sectors limited to 256 for NCQ
[ 4204.543561] ata5.00: max_sectors limited to 256 for NCQ
[ 4204.543564] ata5.00: configured for UDMA/133
[ 4204.543567] ata5: EH complete
[ 4204.543524] sd 4:0:0:0: [sde] 1465149168 512-byte hardware sectors (750156 MB)
[ 4204.543524] sd 4:0:0:0: [sde] Write Protect is off
[ 4204.543524] sd 4:0:0:0: [sde] Mode Sense: 00 3a 00 00
[ 4204.543524] sd 4:0:0:0: [sde] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 4205.628049] ata5.00: NCQ disabled due to excessive errors
[ 4205.628052] ata5.00: exception Emask 0x0 SAct 0x1 SErr 0x0 action 0x6 frozen
[ 4205.628084] ata5.00: cmd 60/00:00:00:a7:36/01:00:01:00:00/40 tag 0 ncq 131072 in
[ 4205.628085] res 40/00:08:e0:a7:36/01:00:01:00:00/00 Emask 0x4 (timeout)
[ 4205.628129] ata5.00: status: { DRDY }
[ 4205.628154] ata5: hard resetting link
[ 4206.256912] ata5: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 4206.511887] ata5.00: max_sectors limited to 256 for NCQ
[ 4206.591747] ata5.00: max_sectors limited to 256 for NCQ
[ 4206.591750] ata5.00: configured for UDMA/133
[ 4206.591753] ata5: EH complete
[ 4206.591710] sd 4:0:0:0: [sde] 1465149168 512-byte hardware sectors (750156 MB)
[ 4206.591710] sd 4:0:0:0: [sde] Write Protect is off
[ 4206.591710] sd 4:0:0:0: [sde] Mode Sense: 00 3a 00 00
[ 4206.591710] sd 4:0:0:0: [sde] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 4207.608735] ata5.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[ 4207.608768] ata5.00: cmd c8/00:00:00:a7:36/00:00:00:00:00/e1 tag 0 dma 131072 in
[ 4207.608769] res 40/00:08:e0:a7:36/01:00:01:00:00/00 Emask 0x4 (timeout)
[ 4207.608813] ata5.00: status: { DRDY }
[ 4207.608838] ata5: hard resetting link
[ 4208.175534] ata5: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 4208.235553] ata5.00: max_sectors limited to 256 for NCQ
[ 4208.319607] ata5.00: max_sectors limited to 256 for NCQ
[ 4208.319610] ata5.00: configured for UDMA/133
[ 4208.319613] ata5: EH complete
[ 4208.319570] sd 4:0:0:0: [sde] 1465149168 512-byte hardware sectors (750156 MB)
[ 4208.319570] sd 4:0:0:0: [sde] Write Protect is off
[ 4208.319570] sd 4:0:0:0: [sde] Mode Sense: 00 3a 00 00
[ 4208.319570] sd 4:0:0:0: [sde] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 4209.433738] ata5: limiting SATA link speed to 1.5 Gbps
[ 4209.433741] ata5.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[ 4209.433773] ata5.00: cmd c8/00:00:00:a7:36/00:00:00:00:00/e1 tag 0 dma 131072 in
[ 4209.433774] res 40/00:08:e0:a7:36/01:00:01:00:00/00 Emask 0x4 (timeout)
[ 4209.433818] ata5.00: status: { DRDY }
[ 4209.433843] ata5: hard resetting link
[ 4210.027860] ata5: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[ 4210.158577] ata5.00: max_sectors limited to 256 for NCQ
[ 4210.245289] ata5.00: max_sectors limited to 256 for NCQ
[ 4210.245292] ata5.00: configured for UDMA/133
[ 4210.245297] sd 4:0:0:0: [sde] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE,SUGGEST_OK
[ 4210.245301] sd 4:0:0:0: [sde] Sense Key : Aborted Command [current] [descriptor]
[ 4210.245305] Descriptor sense data with sense descriptors (in hex):
[ 4210.245307] 72 0b 00 00 00 00 00 0c 00 0a 80 00 00 00 00 00
[ 4210.245314] 01 36 a7 e0
[ 4210.245317] sd 4:0:0:0: [sde] Add. Sense: No additional sense information
[ 4210.245321] end_request: I/O error, dev sde, sector 20358912
[ 4210.245405] Buffer I/O error on device sde, logical block 2544864
[ 4210.245405] Buffer I/O error on device sde, logical block 2544865
[ 4210.245405] Buffer I/O error on device sde, logical block 2544866
[ 4210.245405] Buffer I/O error on device sde, logical block 2544867
[ 4210.245405] Buffer I/O error on device sde, logical block 2544868
[ 4210.245405] Buffer I/O error on device sde, logical block 2544869
[ 4210.245405] Buffer I/O error on device sde, logical block 2544870
[ 4210.245405] Buffer I/O error on device sde, logical block 2544871
[ 4210.245405] Buffer I/O error on device sde, logical block 2544872
[ 4210.245405] Buffer I/O error on device sde, logical block 2544873
[ 4210.245405] ata5: EH complete
[ 4210.245405] sd 4:0:0:0: [sde] 1465149168 512-byte hardware sectors (750156 MB)
[ 4210.245405] sd 4:0:0:0: [sde] Write Protect is off
[ 4210.245405] sd 4:0:0:0: [sde] Mode Sense: 00 3a 00 00
[ 4210.245405] sd 4:0:0:0: [sde] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 4375.878665] ata5.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[ 4375.878701] ata5.00: cmd c8/00:00:00:a7:36/00:00:00:00:00/e1 tag 0 dma 131072 in
[ 4375.878702] res 40/00:08:e0:a7:36/01:00:01:00:00/00 Emask 0x4 (timeout)
[ 4375.878747] ata5.00: status: { DRDY }
[ 4375.878773] ata5: hard resetting link
[ 4376.677474] ata5: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[ 4376.781136] ata5.00: max_sectors limited to 256 for NCQ
[ 4376.860960] ata5.00: max_sectors limited to 256 for NCQ
[ 4376.860962] ata5.00: configured for UDMA/133
[ 4376.860967] ata5: EH complete
[ 4377.920091] ata5.00: limiting speed to UDMA/100:PIO4
[ 4377.920094] ata5.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[ 4377.920126] ata5.00: cmd c8/00:00:00:a7:36/00:00:00:00:00/e1 tag 0 dma 131072 in
[ 4377.920128] res 40/00:08:e0:a7:36/01:00:01:00:00/00 Emask 0x4 (timeout)
[ 4377.920171] ata5.00: status: { DRDY }
[ 4377.920197] ata5: hard resetting link
[ 4378.506765] ata5: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[ 4378.566651] ata5.00: max_sectors limited to 256 for NCQ
[ 4378.670698] ata5.00: max_sectors limited to 256 for NCQ
[ 4378.670701] ata5.00: configured for UDMA/100
[ 4378.670705] ata5: EH complete
[ 4378.690792] sd 4:0:0:0: [sde] 1465149168 512-byte hardware sectors (750156 MB)
[ 4379.699935] ata5.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[ 4379.699969] ata5.00: cmd c8/00:00:00:a7:36/00:00:00:00:00/e1 tag 0 dma 131072 in
[ 4379.699970] res 40/00:08:e0:a7:36/01:00:01:00:00/00 Emask 0x4 (timeout)
[ 4379.700014] ata5.00: status: { DRDY }
[ 4379.700040] ata5: hard resetting link
[ 4380.470704] ata5: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[ 4380.550291] ata5.00: max_sectors limited to 256 for NCQ
[ 4380.630116] ata5.00: max_sectors limited to 256 for NCQ
[ 4380.630118] ata5.00: configured for UDMA/100
[ 4380.630122] ata5: EH complete
[ 4380.630253] sd 4:0:0:0: [sde] Write Protect is off
[ 4380.630253] sd 4:0:0:0: [sde] Mode Sense: 00 3a 00 00
[ 4381.641298] ata5.00: limiting speed to UDMA/33:PIO4
[ 4381.641301] ata5.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[ 4381.641333] ata5.00: cmd c8/00:00:00:a7:36/00:00:00:00:00/e1 tag 0 dma 131072 in
[ 4381.641334] res 40/00:08:e0:a7:36/01:00:01:00:00/00 Emask 0x4 (timeout)
[ 4381.641378] ata5.00: status: { DRDY }
[ 4381.641403] ata5: hard resetting link
[ 4382.227742] ata5: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[ 4382.287630] ata5.00: max_sectors limited to 256 for NCQ
[ 4382.387411] ata5.00: max_sectors limited to 256 for NCQ
[ 4382.387413] ata5.00: configured for UDMA/33
[ 4382.387416] ata5: EH complete
[ 4383.405274] ata5.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[ 4383.405307] ata5.00: cmd c8/00:00:00:a7:36/00:00:00:00:00/e1 tag 0 dma 131072 in
[ 4383.405308] res 40/00:08:e0:a7:36/01:00:01:00:00/00 Emask 0x4 (timeout)
[ 4383.405352] ata5.00: status: { DRDY }
[ 4383.405377] ata5: hard resetting link
[ 4384.118477] ata5: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[ 4384.178496] ata5.00: max_sectors limited to 256 for NCQ
[ 4384.278496] ata5.00: max_sectors limited to 256 for NCQ
[ 4384.278499] ata5.00: configured for UDMA/33
[ 4384.278502] ata5: EH complete
[ 4384.285352] sd 4:0:0:0: [sde] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 4385.295484] ata5.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[ 4385.295516] ata5.00: cmd c8/00:00:00:a7:36/00:00:00:00:00/e1 tag 0 dma 131072 in
[ 4385.295518] res 40/00:08:e0:a7:36/01:00:01:00:00/00 Emask 0x4 (timeout)
[ 4385.295561] ata5.00: status: { DRDY }
[ 4385.295586] ata5: hard resetting link
[ 4385.871406] ata5: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[ 4385.951127] ata5.00: max_sectors limited to 256 for NCQ
[ 4386.030952] ata5.00: max_sectors limited to 256 for NCQ
[ 4386.030954] ata5.00: configured for UDMA/33
[ 4386.030961] sd 4:0:0:0: [sde] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE,SUGGEST_OK
[ 4386.030964] sd 4:0:0:0: [sde] Sense Key : Aborted Command [current] [descriptor]
[ 4386.030969] Descriptor sense data with sense descriptors (in hex):
[ 4386.030970] 72 0b 00 00 00 00 00 0c 00 0a 80 00 00 00 00 00
[ 4386.030978] 01 36 a7 e0
[ 4386.030981] sd 4:0:0:0: [sde] Add. Sense: No additional sense information
[ 4386.030985] end_request: I/O error, dev sde, sector 20358912
[ 4386.031012] __ratelimit: 22 messages suppressed
[ 4386.031014] Buffer I/O error on device sde, logical block 2544864
[ 4386.031043] Buffer I/O error on device sde, logical block 2544865
[ 4386.031071] Buffer I/O error on device sde, logical block 2544866
[ 4386.031099] Buffer I/O error on device sde, logical block 2544867
[ 4386.031126] Buffer I/O error on device sde, logical block 2544868
[ 4386.031154] Buffer I/O error on device sde, logical block 2544869
[ 4386.031182] Buffer I/O error on device sde, logical block 2544870
[ 4386.031209] Buffer I/O error on device sde, logical block 2544871
[ 4386.031237] Buffer I/O error on device sde, logical block 2544872
[ 4386.031265] Buffer I/O error on device sde, logical block 2544873
[ 4386.031305] ata5: EH complete
[ 4386.041090] sd 4:0:0:0: [sde] 1465149168 512-byte hardware sectors (750156 MB)
[ 4386.041090] sd 4:0:0:0: [sde] Write Protect is off
[ 4386.041090] sd 4:0:0:0: [sde] Mode Sense: 00 3a 00 00
[ 4386.086179] sd 4:0:0:0: [sde] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 4386.101090] sd 4:0:0:0: [sde] 1465149168 512-byte hardware sectors (750156 MB)
[ 4386.101090] sd 4:0:0:0: [sde] Write Protect is off
[ 4386.101090] sd 4:0:0:0: [sde] Mode Sense: 00 3a 00 00
[ 4386.101090] sd 4:0:0:0: [sde] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA