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,如需转载请自行联系原作者
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值