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内核中,凡是挂载(或者说“映射” ...
随机推荐
- 项目管理-SVN服务器的搭建
Subversion是优秀的版本控制工具,其具体的的优点和详细介绍,这里就不再多说. 首先来下载和搭建SVN服务器. 现在Subversion已经迁移到apache网站上了,下载地址: http:// ...
- 以Jar形式为Web项目提供资源文件
以Jar形式为Web项目提供资源文件 http://www.webjars.org/ Web前端使用了越来越多的JS或CSS如jQuery, Backbone.js 和Twitter Bootstra ...
- Linux增加swap分区大小
1. 查看当前分区情况 free -m 2. 增加 swap 大小, 2G 左右 dd if=/dev/zero of=/var/swap bs=1024 count=2048000 3. 设置交换文 ...
- Java知识补充
1.SUN,为standford university network 2.java的标志位咖啡,java本意为南美的一种咖啡.因为oak已被注册 3.JDK为java se development ...
- RTL-SDR基础环境安装
安装 cmake and libusb apt-get install cmake apt-get -dev 安装 RTL-SDR sudo apt-get install rtl-sdr kali已 ...
- Glusterfs[转]
原文地址:http://support.huawei.com/ecommunity/bbs/10253434.html 1. GlusterFS概述 GlusterFS是Scale-Out存 ...
- C#指定某用户对某文夹件的访问权限
using System.Security.AccessControl; //设置myFloder文件夹的iis访问权限 string userAccount = @&q ...
- React 相关资料
learncodeacademy/react-js-tutorials MobX
- OpenGL多视口
#include <gl/glew.h> #include <gl/freeglut.h> #include <iostream> ; ; float rtri = ...
- kettle连接Hbase中数据导入(8)
http://wiki.pentaho.com/display/BAD/Loading+Data+into+HBase 1)下载样本文件 到官网去下载