Linux下“read failed after 0 of 4096 at 0: Input/output error”

简介:

1、故障描述( 在线移除一块被设置为pv格式的硬盘,提示unknown device报道):
/dev/sdb1 /dev/sdc1 /dev/sdd1是组成/dev/vg_test/lvm_test的PV,这里我们模拟/dev/sdd1硬盘被直接断电了

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
[root@docker mnt] # pvdisplay 
   /dev/sdd read  failed after 0 of 4096 at 0: Input /output  error
   /dev/sdd read  failed after 0 of 4096 at 21474770944: Input /output  error
   /dev/sdd read  failed after 0 of 4096 at 21474828288: Input /output  error
   /dev/sdd read  failed after 0 of 4096 at 4096: Input /output  error
   /dev/sdd1 read  failed after 0 of 512 at 21467824128: Input /output  error
   /dev/sdd1 read  failed after 0 of 512 at 21467938816: Input /output  error
   /dev/sdd1 read  failed after 0 of 512 at 0: Input /output  error
   /dev/sdd1 read  failed after 0 of 512 at 4096: Input /output  error
   /dev/sdd1 read  failed after 0 of 2048 at 0: Input /output  error
   Couldn't  find  device with uuid 166hLZ-2POl-GIsv-ELGh-8YVT-Zcoa-ZcLXzp.
   --- Physical volume ---
   PV Name                /dev/sdb1
   VG Name               vg_test
   PV Size               19.99 GiB / not usable 1.43 MiB
   Allocatable            yes  (but full)
   PE Size               4.00 MiB
   Total PE              5118
   Free PE               0
   Allocated PE          5118
   PV UUID               fuQdIY-qkJw-fZJB-AauO-Zqpj-91RI-S1GG0X
    
   --- Physical volume ---
   PV Name                /dev/sdc1
   VG Name               vg_test
   PV Size               19.99 GiB / not usable 1.43 MiB
   Allocatable            yes 
   PE Size               4.00 MiB
   Total PE              5118
   Free PE               5116
   Allocated PE          2
   PV UUID               TRlpMQ-snM6-u24f-cMHa-oiVt-XJ3w-6fjAbp
    
   --- Physical volume ---
   PV Name               unknown device
   VG Name               vg_test
   PV Size               19.99 GiB / not usable 1.43 MiB
   Allocatable            yes 
   PE Size               4.00 MiB
   Total PE              5118
   Free PE               5118
   Allocated PE          0
   PV UUID               166hLZ-2POl-GIsv-ELGh-8YVT-Zcoa-ZcLXzp
1
[root@docker mnt] # vgreduce --removemissing vg_test
1
2
3
4
5
6
7
8
9
10
11
   /dev/sdd read  failed after 0 of 4096 at 0: Input /output  error
   /dev/sdd1 read  failed after 0 of 2048 at 0: Input /output  error
   /dev/sdd read  failed after 0 of 4096 at 21474770944: Input /output  error
   /dev/sdd read  failed after 0 of 4096 at 21474828288: Input /output  error
   /dev/sdd read  failed after 0 of 4096 at 4096: Input /output  error
   /dev/sdd1 read  failed after 0 of 512 at 21467824128: Input /output  error
   /dev/sdd1 read  failed after 0 of 512 at 21467938816: Input /output  error
   /dev/sdd1 read  failed after 0 of 512 at 0: Input /output  error
   /dev/sdd1 read  failed after 0 of 512 at 4096: Input /output  error
   Couldn't  find  device with uuid 166hLZ-2POl-GIsv-ELGh-8YVT-Zcoa-ZcLXzp.
   Wrote out consistent volume group vg_test
1
[root@docker mnt] # vgchange -a y
1
2
3
/dev/sdd read  failed after 0 of 4096 at 0: Input /output  error
  /dev/sdd1 read  failed after 0 of 2048 at 0: Input /output  error
   1 logical volume(s)  in  volume group  "vg_test"  now active
1
[root@docker mnt] # df -h
1
2
3
4
5
6
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3              193G   14G  170G   8% /
tmpfs                 1.9G  228K  1.9G   1%  /dev/shm
/dev/sda1              190M   80M  100M  45%  /boot
/dev/mapper/vg_test-lvm_test
                        20G   28M   19G   1%  /mnt
1
[root@docker mnt] # pvdisplay
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   /dev/sdd read  failed after 0 of 4096 at 0: Input /output  error
   /dev/sdd read  failed after 0 of 4096 at 21474770944: Input /output  error
   /dev/sdd read  failed after 0 of 4096 at 21474828288: Input /output  error
   /dev/sdd read  failed after 0 of 4096 at 4096: Input /output  error
   /dev/sdd1 read  failed after 0 of 512 at 21467824128: Input /output  error
   /dev/sdd1 read  failed after 0 of 512 at 21467938816: Input /output  error
   /dev/sdd1 read  failed after 0 of 512 at 0: Input /output  error
   /dev/sdd1 read  failed after 0 of 512 at 4096: Input /output  error
   /dev/sdd1 read  failed after 0 of 2048 at 0: Input /output  error
   --- Physical volume ---
   PV Name                /dev/sdb1
   VG Name               vg_test
   PV Size               19.99 GiB / not usable 1.43 MiB
   Allocatable            yes  (but full)
   PE Size               4.00 MiB
   Total PE              5118
   Free PE               0
   Allocated PE          5118
   PV UUID               fuQdIY-qkJw-fZJB-AauO-Zqpj-91RI-S1GG0X
    
   --- Physical volume ---
   PV Name                /dev/sdc1
   VG Name               vg_test
   PV Size               19.99 GiB / not usable 1.43 MiB
   Allocatable            yes 
   PE Size               4.00 MiB
   Total PE              5118
   Free PE               5116
   Allocated PE          2
   PV UUID               TRlpMQ-snM6-u24f-cMHa-oiVt-XJ3w-6fjAbp


发现仍旧有I/O的错误出现,跳过重启系统,故障得到解决(这里注意重启前检查fatab信息,看下mount -a是否有报错)。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
[root@docker ~] # pvdisplay 
   --- Physical volume ---
   PV Name                /dev/sdb1
   VG Name               vg_test
   PV Size               19.99 GiB / not usable 1.43 MiB
   Allocatable            yes  (but full)
   PE Size               4.00 MiB
   Total PE              5118
   Free PE               0
   Allocated PE          5118
   PV UUID               fuQdIY-qkJw-fZJB-AauO-Zqpj-91RI-S1GG0X
    
   --- Physical volume ---
   PV Name                /dev/sdc1
   VG Name               vg_test
   PV Size               19.99 GiB / not usable 1.43 MiB
   Allocatable            yes 
   PE Size               4.00 MiB
   Total PE              5118
   Free PE               5116
   Allocated PE          2
   PV UUID               TRlpMQ-snM6-u24f-cMHa-oiVt-XJ3w-6fjAbp










本文转自 冰冻vs西瓜 51CTO博客,原文链接:http://blog.51cto.com/molewan/1748466,如需转载请自行联系原作者
目录
相关文章
|
28天前
|
算法 Linux C++
【Linux系统编程】深入解析Linux中read函数的错误场景
【Linux系统编程】深入解析Linux中read函数的错误场景
202 0
|
1月前
|
存储 Shell Linux
【Shell 命令集合 文件管理】Linux 读取命令 read命令使用指南
【Shell 命令集合 文件管理】Linux 读取命令 read命令使用指南
36 0
|
2月前
|
存储 安全 Linux
|
5月前
|
Ubuntu Linux
Win10 Ubuntu子系统(内嵌ubuntu18.04)运行32bit Linux原生程序 解决Exec format error错误
Win10 Ubuntu子系统(内嵌ubuntu18.04)运行32bit Linux原生程序 解决Exec format error错误
119 0
|
3月前
|
存储 Linux Shell
Linux中的计划任务—Crontab调度一次性执行的任务at/batch
Linux中的计划任务—Crontab调度一次性执行的任务at/batch
125 0
|
4月前
|
Kubernetes Java Linux
Linux|操作系统|Error: Could not create the Java Virtual Machine 报错的解决思路
Linux|操作系统|Error: Could not create the Java Virtual Machine 报错的解决思路
455 0
|
6月前
|
关系型数据库 MySQL Linux
【Linux环境】centos安装mysql5.7.26报 ./mysqld: error while loading shared libraries: libaio.so.1: cannot op
【Linux环境】centos安装mysql5.7.26报 ./mysqld: error while loading shared libraries: libaio.so.1: cannot op
116 0
|
16天前
|
Linux 开发者
Linux文件编程(open read write close函数)
通过这些函数,开发者可以在Linux环境下进行文件的读取、写入和管理。 买CN2云服务器,免备案服务器,高防服务器,就选蓝易云。百度搜索:蓝易云
84 4
|
4月前
|
关系型数据库 Linux Shell
Linux|奇怪的知识|一次性任务at命令的使用
Linux|奇怪的知识|一次性任务at命令的使用
38 0
|
4月前
|
存储 Linux
Linux文件编程(open read write close函数)
Linux文件编程(open read write close函数)
80 0