device-mapper: multipath: Failing path recovery【转载】
digoal 2016-04-05 10:09:42 浏览180 评论0
摘要: 由于扇区损坏导致多路径设备failed. 现象如下 : # dmesg : device-mapper: multipath: Failing path 8:128. qla2xxx 0000:07:00.1: scsi(1:0:0:1): Mid-layer underflow detecte...
device-mapper: multipath: Failing path 8:128.
qla2xxx 0000:07:00.1: scsi(1:0:0:1): Mid-layer underflow detected (40000 of 40000 bytes)...returning error status.
qla2xxx 0000:07:00.1: scsi(1:0:0:1): Mid-layer underflow detected (40000 of 40000 bytes)...returning error status.
qla2xxx 0000:07:00.1: scsi(1:0:0:1): Mid-layer underflow detected (40000 of 40000 bytes)...returning error status.
qla2xxx 0000:07:00.1: scsi(1:0:0:1): Mid-layer underflow detected (40000 of 40000 bytes)...returning error status.
qla2xxx 0000:07:00.1: scsi(1:0:0:1): Mid-layer underflow detected (40000 of 40000 bytes)...returning error status.
qla2xxx 0000:07:00.1: scsi(1:0:0:1): Mid-layer underflow detected (40000 of 40000 bytes)...returning error status.
sd 1:0:0:1: SCSI error: return code = 0x00070000
end_request: I/O error, dev sda, sector 3870947799
device-mapper: multipath: Failing path 8:0.
sd 0:0:0:1: SCSI error: return code = 0x08000002
sdi: Current: sense key: Medium Error
Add. Sense: Unrecovered read error
Info fld=0x0
end_request: I/O error, dev sdi, sector 3870947799
# multipath -ll
msa2vd01vol01 (3600c0ff000xxxxxxf810394c01000000) dm-0 HP,MSA2312fc
[size=1.8T][features=1 queue_if_no_path][hwhandler=0][rw]
\_ round-robin 0 [prio=50][enabled]
\_ 0:0:0:1 sdi 8:128 [failed][ready]
\_ round-robin 0 [prio=10][enabled]
\_ 1:0:0:1 sda 8:0 [failed][ready]
echo 1 > /sys/block/sda/device/delete
echo 1 > /sys/block/sdi/device/delete
echo "- - -" > /sys/class/scsi_host/${HBA}/scan, 如下
echo "- - -" > /sys/class/scsi_host/host0/scan
echo "- - -" > /sys/class/scsi_host/host1/scan
# multipath -v2
: checker msg is "readsector0 checker reports path is down"
reload: msa2vd01vol01 (3600c0ff000xxxxxxf810394c01000000) HP,MSA2312fc
[size=1.8T][features=0][hwhandler=0][n/a]
\_ round-robin 0 [prio=50][undef]
\_ 0:0:0:1 sda 8:0 [undef][ready]
\_ round-robin 0 [prio=10][undef]
\_ 1:0:0:1 sde 8:64 [undef][ready]
# dmesg :
Vendor: HP Model: MSA2312fc Rev: M112
Type: Direct-Access ANSI SCSI revision: 05
SCSI device sda: 3902343744 512-byte hdwr sectors (1998000 MB)
sda: Write Protect is off
sda: Mode Sense: 93 00 00 08
SCSI device sda: drive cache: write back
SCSI device sda: 3902343744 512-byte hdwr sectors (1998000 MB)
sda: Write Protect is off
sda: Mode Sense: 93 00 00 08
SCSI device sda: drive cache: write back
sda: sda1
sd 0:0:0:1: Attached scsi disk sda
sd 0:0:0:1: Attached scsi generic sg1 type 0
Vendor: HP Model: MSA2312fc Rev: M112
Type: Direct-Access ANSI SCSI revision: 05
SCSI device sde: 3902343744 512-byte hdwr sectors (1998000 MB)
sde: Write Protect is off
sde: Mode Sense: 93 00 00 08
SCSI device sde: drive cache: write back
SCSI device sde: 3902343744 512-byte hdwr sectors (1998000 MB)
sde: Write Protect is off
sde: Mode Sense: 93 00 00 08
SCSI device sde: drive cache: write back
sde: sde1
sd 1:0:0:1: Attached scsi disk sde
sd 1:0:0:1: Attached scsi generic sg6 type 0
# multipath -ll
msa2vd01vol01 (3600c0ff000xxxxxxf810394c01000000) dm-0 HP,MSA2312fc
[size=1.8T][features=1 queue_if_no_path][hwhandler=0][rw]
\_ round-robin 0 [prio=50][enabled]
\_ 0:0:0:1 sda 8:0 [active][ready]
\_ round-robin 0 [prio=10][enabled]
\_ 1:0:0:1 sde 8:64 [active][ready]
fsck -v -p /dev/mapper/msa2vd01vol01p1
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem UUID: 63d08b38-6214-4a28-8f3e-0b8fd9c1734e
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery sparse_super large_file
Default mount options: (none)
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 243908608
Block count: 487791627
Reserved block count: 24389581
Free blocks: 117876429
Free inodes: 243257871
First block: 0
Block size: 4096
Fragment size: 4096
Reserved GDT blocks: 907
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 16384
Inode blocks per group: 512
Filesystem created: Wed Jul 21 19:10:23 2010
Last mount time: Tue May 14 07:38:24 2013
Last write time: Tue May 14 07:38:24 2013
Mount count: 1
Maximum mount count: 36
Last checked: Mon May 13 22:19:35 2013
Check interval: 15552000 (6 months)
Next check after: Sat Nov 9 22:19:35 2013
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 128
Journal inode: 8
Default directory hash: tea
Group 14766: (Blocks 483852288-483885055)
Block bitmap at 483852288 (+0), Inode bitmap at 483852289 (+1)
Inode table at 483852290-483852801 (+2)
1027 free blocks, 16384 free inodes, 0 directories
Free blocks: 483855860-483856886
Free inodes: 241926145-241942528
使用badblocks检查坏块.
badblocks -v -b 4096 -o ./badblocks.20130514 /dev/sda 483868480 483868460
定位到坏块为483868476
# cat badblocks.20130514
483868476
接下来是修复 :
# dd if=/dev/sda of=./badblock483868476.data bs=4096 skip=483868476 count=1
dd: reading `/dev/sda': Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.003665 seconds, 0.0 kB/s
如果读出数据来了, 那么可以将数据回写进行修复.
dd if=./badblock483868476.data of=/dev/sda seek=483868476 bs=4096 count=1
多遍尝试后如果数据无法读取, 则可以采用覆写的方法修复. 直接放弃这个数据块.
badblocks -f -v -w -b 4096 /dev/sda 483868477 483868476
/dev/sda is apparently in use by the system; badblocks forced anyway.
Checking for bad blocks in read-write mode
From block 483868476 to 483868477
Testing with pattern 0xaa: done
Reading and comparing: done
Testing with pattern 0x55: done
Reading and comparing: done
Testing with pattern 0xff: done
Reading and comparing: done
Testing with pattern 0x00: done
Reading and comparing: done
Pass completed, 0 bad blocks found.
再次检测已无坏块 :
# badblocks -v -b 4096 /dev/sda 483868480 483868460
Checking blocks 483868460 to 483868480
Checking for bad blocks (read-only test): done
Pass completed, 0 bad blocks found.
ZERO_DAMAGED_PAGES = true
ERROR: ZLIB uncompress failed (detail: 'The compressed data was corrupted', output buffer length 32568, compressed length 12136, (block count 3651)) (gp_compress.c:355) (seg4 slice1 dw-host37-if2:51001 pid=5024)
【参考】
4. dumpe2fs
device-mapper: multipath: Failing path recovery-博客-云栖社区-阿里云
https://yq.aliyun.com/articles/18067
device-mapper: multipath: Failing path recovery【转载】的更多相关文章
- Device Mapper Multipath(DM-Multipath)
Device Mapper Multipath(DM-Multipath)能够将server节点和存储阵列之间的多条I/O链路配置为一个单独的设备.这些I/O链路是由不同的线缆.交换机.控制器组成的S ...
- Linux 内核中的 Device Mapper 机制
本文结合具体代码对 Linux 内核中的 device mapper 映射机制进行了介绍.Device mapper 是 Linux 2.6 内核中提供的一种从逻辑设备到物理设备的映射框架机制,在该机 ...
- Device Mapper 代码分析
Device Mapper(DM)是Linux 2.6全面引入的块设备新构架,通过DM可以灵活地管理系统中所有的真实或虚拟的块设备. DM以块设备的形式注册到Linux内核中,凡是挂载(或者说&quo ...
- [转] Linux 内核中的 Device Mapper 机制
本文结合具体代码对 Linux 内核中的 device mapper 映射机制进行了介绍.Device mapper 是 Linux 2.6 内核中提供的一种从逻辑设备到物理设备的映射框架机制,在该机 ...
- Linux kernel device mapper
Device Mapper 是 Linux2.6 内核中支持逻辑卷管理的通用设备映射机制,它为实现用于存储资源管理的块设备驱动提供了一个高度模块化的内核架构,如图 1. 图1 Device Mappe ...
- Linux系统中的Device Mapper学习
在linux系统中你使用一些命令时(例如nmon.iostat 如下截图所示),有可能会看到一些名字为dm-xx的设备,那么这些设备到底是什么设备呢,跟磁盘有什么关系呢?以前不了解的时候,我也很纳闷. ...
- 使用 Device Mapper来改变Docker容器的大小
作者:Jérôme Petazzoni ( Docker 布道师) 译者:Mark Shao ( EMC 中国高级工程师) 如果在 CentOS . REHL . Fedor 或者其他默认没有 AUF ...
- Docker Device Mapper 使用 direct-lvm
一.Device Mapper: loop-lvm 默认 CentOS7 下 Docker 使用的 Device Mapper 设备默认使用 loopback 设备,后端为自动生成的稀疏文件,如下 ...
- flashcache中应用device mapper机制
Device Mapper(DM)是Linux 2.6全面引入的块设备新构架,通过DM可以灵活地管理系统中所有的真实或虚拟的块设备. DM以块设备的形式注册到Linux内核中,凡是挂载(或者说“映射” ...
随机推荐
- iOS开发富文本
NSMutableAttributedString * attributedStr = [[NSMutableAttributedString alloc] initWithString:@" ...
- Apache httpd.conf配置详解
常用配置指令说明 1. ServerRoot:服务器的基础目录,一般来说它将包含conf/和logs/子目录,其它配置文件的相对路径即基于此目录.默认为安装目录,不需更改. 语法:ServerRoot ...
- hdu 5469 Antonidas(树的分治+字符串hashOR搜索+剪枝)
题目链接:hdu 5469 Antonidas 题意: 给你一颗树,每个节点有一个字符,现在给你一个字符串S,问你是否能在树上找到两个节点u,v,使得u到v的最短路径构成的字符串恰好为S. 题解: 这 ...
- 安卓请求服务器js文件下载到本地,版本号就下载
<?phpreturn array('CJ_V' => 'v0.15',) <script src="/js/reserve.js?<?=C('CJ_V')?> ...
- Android ListView 无法响应onItemClick事件
当在布局文件中加入了Button.ImageButton.CheckBox.RadioButton等控件(也就是Button或者Checkable的子类控件)的时候,listView是无法响应onIt ...
- 从零开始学Axure原型设计(高级篇)
如果你熟悉了Axure的部件库,那么你可以得心应手地画出心目中产品的线框图:如果你会用Axure的母版.动态面板功能,那么你应该能够画出一些简单网站的原型图:但只有你精通了Axure的条件逻辑.变量. ...
- 玩玩RMI
今天在看代理设计模式,java中远程代理的实现一定会用到RMI的,很久没有温习过RMI的知识了,今天就重新过一遍这个知识点来让自己加深印象,构建一个简单的RMI小程序需要用到一下几个类: java.r ...
- 五指cms模版基础
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- Lua手册中的string.len 不解
Lua手册中的string.len (s) 接收一个字符串,返回其长度. 空串 "" 的长度为 0 . 内嵌零也统计在内,因此 "a\000bc\000" 的长 ...
- TimeJob权限问题 拒绝访问
internal void RenameWithoutValidation(string value) { if (value == null) throw new ArgumentNullE ...