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内核中,凡是挂载(或者说“映射” ...
随机推荐
- icon的使用
在前端页面设计时,不免使用的就是图标,下面就我使用图标icon分享一下经验 1.icon插件,现在比较好的是bootstrap自带的,fontawesome,链接地址:http://fontaweso ...
- MySQL字段自增自减的SQL语句
MySQL的自增语句大家应该都很熟悉 也很简单 update `info` set `comments` = `comments`+1 WHERE `id` = 32 这样就可以了,但是有时候我们会涉 ...
- [JS思路]运动框架思路
匀速运动的思路一: 1.先清除动画,再加载动画 2.方向dir有正值和负值,可以通过 目标值 > 当前值 往右移动,即正数 目标值 < 当前值 往右移动,即负数 来进行判断:dir = ...
- PAT 团体程序设计天梯赛-练习集 L1-008. 求整数段和
给定两个整数A和B,输出从A到B的所有整数以及这些数的和. 输入格式: 输入在一行中给出2个整数A和B,其中-100<=A<=B<=100,其间以空格分隔. 输出格式: 首先顺序输出 ...
- <? extends T>和<? super T>
转自:Java泛型中extends和super的区别? 另,问题来源:Java 泛型 <? super T> 中 super 怎么 理解?与 extends 有何不同? <? ext ...
- 第三章:基本HTML结构
1.每个html 文档都应包含以下基本成分: <!DOCTYPE html> <!-- html5的顶部声明,声明这是一个html5的文档- ...
- JavaScript的DOM(文档对象)基础语法总结1
---恢复内容开始--- 前言:HTML文档可以说由节点构成的集合,DOM节点有: 1). 元素节点:上图中<html>.<body>.<p>等都是元素节点,即标签 ...
- HDU 1407 测试你是否和LTC水平一样高(枚举)
测试你是否和LTC水平一样高 Problem Description 大家提到LTC都佩服的不行,不过,如果竞赛只有这一个题目,我敢保证你和他绝对在一个水平线上!你的任务是:计算方程x^2+y^2+z ...
- icheck.min.js 选中效果
遍历所有 checkbox 如果是选中的用 绿色 如果未选中用 灰色 //check控件属性 $('input').each(function() { var self = $(this); var ...
- DryIoc mvc 项目集成
据IOC性能测试排名,DryIoc是目前运行性能最好的依赖注入组件. 详情参考:https://bitbucket.org/dadhi/dryioc/ 下面一步一步搭建我们的DryIoc 的mvc项目 ...