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@dockermnt] #pvdisplay /dev/sdd : read failedafter0of4096at0:Input /output error /dev/sdd : read failedafter0of4096at21474770944:Input /output error /dev/sdd : read failedafter0of4096at21474828288:Input /output error /dev/sdd : read failedafter0of4096at4096:Input /output error /dev/sdd1 : read failedafter0of512at21467824128:Input /output error /dev/sdd1 : read failedafter0of512at21467938816:Input /output error /dev/sdd1 : read failedafter0of512at0:Input /output error /dev/sdd1 : read failedafter0of512at4096:Input /output error /dev/sdd1 : read failedafter0of2048at0:Input /output error Couldn't find devicewithuuid166hLZ-2POl-GIsv-ELGh-8YVT-Zcoa-ZcLXzp. ---Physicalvolume--- PVName /dev/sdb1 VGNamevg_test PVSize19.99GiB/notusable1.43MiB Allocatable yes (butfull) PESize4.00MiB TotalPE5118 FreePE0 AllocatedPE5118 PVUUIDfuQdIY-qkJw-fZJB-AauO-Zqpj-91RI-S1GG0X ---Physicalvolume--- PVName /dev/sdc1 VGNamevg_test PVSize19.99GiB/notusable1.43MiB Allocatable yes PESize4.00MiB TotalPE5118 FreePE5116 AllocatedPE2 PVUUIDTRlpMQ-snM6-u24f-cMHa-oiVt-XJ3w-6fjAbp ---Physicalvolume--- PVNameunknowndevice VGNamevg_test PVSize19.99GiB/notusable1.43MiB Allocatable yes PESize4.00MiB TotalPE5118 FreePE5118 AllocatedPE0 PVUUID166hLZ-2POl-GIsv-ELGh-8YVT-Zcoa-ZcLXzp 1 [root@dockermnt] #vgreduce--removemissingvg_test 1 2 3 4 5 6 7 8 9 10 11 /dev/sdd : read failedafter0of4096at0:Input /output error /dev/sdd1 : read failedafter0of2048at0:Input /output error /dev/sdd : read failedafter0of4096at21474770944:Input /output error /dev/sdd : read failedafter0of4096at21474828288:Input /output error /dev/sdd : read failedafter0of4096at4096:Input /output error /dev/sdd1 : read failedafter0of512at21467824128:Input /output error /dev/sdd1 : read failedafter0of512at21467938816:Input /output error /dev/sdd1 : read failedafter0of512at0:Input /output error /dev/sdd1 : read failedafter0of512at4096:Input /output error Couldn't find devicewithuuid166hLZ-2POl-GIsv-ELGh-8YVT-Zcoa-ZcLXzp. Wroteoutconsistentvolumegroupvg_test 1 [root@dockermnt] #vgchange-ay 1 2 3 /dev/sdd : read failedafter0of4096at0:Input /output error /dev/sdd1 : read failedafter0of2048at0:Input /output error 1logicalvolume(s) in volumegroup "vg_test" nowactive 1 [root@dockermnt] #df-h 1 2 3 4 5 6 FilesystemSizeUsedAvailUse%Mountedon /dev/sda3 193G14G170G8%/ tmpfs1.9G228K1.9G1% /dev/shm /dev/sda1 190M80M100M45% /boot /dev/mapper/vg_test-lvm_test 20G28M19G1% /mnt 1 [root@dockermnt] #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 failedafter0of4096at0:Input /output error /dev/sdd : read failedafter0of4096at21474770944:Input /output error /dev/sdd : read failedafter0of4096at21474828288:Input /output error /dev/sdd : read failedafter0of4096at4096:Input /output error /dev/sdd1 : read failedafter0of512at21467824128:Input /output error /dev/sdd1 : read failedafter0of512at21467938816:Input /output error /dev/sdd1 : read failedafter0of512at0:Input /output error /dev/sdd1 : read failedafter0of512at4096:Input /output error /dev/sdd1 : read failedafter0of2048at0:Input /output error ---Physicalvolume--- PVName /dev/sdb1 VGNamevg_test PVSize19.99GiB/notusable1.43MiB Allocatable yes (butfull) PESize4.00MiB TotalPE5118 FreePE0 AllocatedPE5118 PVUUIDfuQdIY-qkJw-fZJB-AauO-Zqpj-91RI-S1GG0X ---Physicalvolume--- PVName /dev/sdc1 VGNamevg_test PVSize19.99GiB/notusable1.43MiB Allocatable yes PESize4.00MiB TotalPE5118 FreePE5116 AllocatedPE2 PVUUIDTRlpMQ-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 ---Physicalvolume--- PVName /dev/sdb1 VGNamevg_test PVSize19.99GiB/notusable1.43MiB Allocatable yes (butfull) PESize4.00MiB TotalPE5118 FreePE0 AllocatedPE5118 PVUUIDfuQdIY-qkJw-fZJB-AauO-Zqpj-91RI-S1GG0X ---Physicalvolume--- PVName /dev/sdc1 VGNamevg_test PVSize19.99GiB/notusable1.43MiB Allocatable yes PESize4.00MiB TotalPE5118 FreePE5116 AllocatedPE2 PVUUIDTRlpMQ-snM6-u24f-cMHa-oiVt-XJ3w-6fjAbp 本文转自 冰冻vs西瓜 51CTO博客,原文链接:http://blog.51cto.com/molewan/1748466,如需转载请自行联系原作者