Error handling after Linux online removal of HDD under vsphere virtual machine (based on LVM)

Source: Internet
Author: User
Tags uuid

1) fault description (VMware virtual machine, after removing a piece of hard disk set to PV format, prompt unknown device error):

Description:/dev/sdb1/dev/sdc1/dev/sdd1 is the PV that makes up/dev/vg_test/lvm_test, here we simulate/DEV/SDD1 Drive is directly powered off

[[Email protected] 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

2) Process steps:

[[email protected] mnt]# vgreduce --removemissing vg_test  /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[[email protected] mnt]# vgchange -a y  /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[[email  protected] mnt]# df -hFilesystem             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

Tests show that the entire process does not affect the data run in/MNT

[[Email protected] 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   --- 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&nbsp Size               4.00 mib   Total PE               5118  free pe                5116  allocated pe          2   PV UUID                trlpmq-snm6-u24f-cmha-oivt-xj3w-6fjabp

found that there are still I/O errors appearing, Find the right downtime window, restart the system, and solve the problem (note here to check the Fstab information before restarting, to see if there is an error mount-a).

[[email protected] ~]# 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 &nbsP 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

In this way, the system has no error message.


This article is from the "Frozen vs watermelon" blog, so be sure to keep this source http://molewan.blog.51cto.com/287340/1900161

Error handling after Linux online removal of HDD under vsphere virtual machine (based on LVM)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.