Nous avons eu une défaillance de disque sur un serveur et l'avons remplacé avant de retirer le lecteur de LVM.
Le serveur dispose de 4 disques physiques (PV), chacun avec son propre groupe de volumes (VG). Chaque VG a 2 volumes logiques ou plus (LV). Maintenant LVM se plaint du disque manquant. Nous avons donc un VG (vg04) avec deux LV qui sont devenus orphelins que nous devons éliminer du système.
Le problème est que chaque fois que nous exécutons une commande LVM, nous obtenons ces erreurs de lecture qui ont échoué:
# lvscan
/dev/vg04/swap: read failed after 0 of 4096 at 4294901760: Input/output error
/dev/vg04/swap: read failed after 0 of 4096 at 4294959104: Input/output error
/dev/vg04/swap: read failed after 0 of 4096 at 0: Input/output error
/dev/vg04/swap: read failed after 0 of 4096 at 4096: Input/output error
/dev/vg04/vz: read failed after 0 of 4096 at 995903864832: Input/output error
/dev/vg04/vz: read failed after 0 of 4096 at 995903922176: Input/output error
/dev/vg04/vz: read failed after 0 of 4096 at 0: Input/output error
/dev/vg04/vz: read failed after 0 of 4096 at 4096: Input/output error
# vgreduce vg04 --removemissing --force
/dev/vg04/swap: read failed after 0 of 4096 at 4294901760: Input/output error
/dev/vg04/swap: read failed after 0 of 4096 at 4294959104: Input/output error
/dev/vg04/swap: read failed after 0 of 4096 at 0: Input/output error
/dev/vg04/swap: read failed after 0 of 4096 at 4096: Input/output error
/dev/vg04/vz: read failed after 0 of 4096 at 995903864832: Input/output error
/dev/vg04/vz: read failed after 0 of 4096 at 995903922176: Input/output error
/dev/vg04/vz: read failed after 0 of 4096 at 0: Input/output error
/dev/vg04/vz: read failed after 0 of 4096 at 4096: Input/output error
Volume group "vg04" not found
# vgchange -a n /dev/vg04
/dev/vg04/swap: read failed after 0 of 4096 at 4294901760: Input/output error
/dev/vg04/swap: read failed after 0 of 4096 at 4294959104: Input/output error
/dev/vg04/swap: read failed after 0 of 4096 at 0: Input/output error
/dev/vg04/swap: read failed after 0 of 4096 at 4096: Input/output error
/dev/vg04/vz: read failed after 0 of 4096 at 995903864832: Input/output error
/dev/vg04/vz: read failed after 0 of 4096 at 995903922176: Input/output error
/dev/vg04/vz: read failed after 0 of 4096 at 0: Input/output error
/dev/vg04/vz: read failed after 0 of 4096 at 4096: Input/output error
Volume group "vg04" not found
# lvchange -a n /dev/vg04/vz
/dev/vg04/swap: read failed after 0 of 4096 at 4294901760: Input/output error
/dev/vg04/swap: read failed after 0 of 4096 at 4294959104: Input/output error
/dev/vg04/swap: read failed after 0 of 4096 at 0: Input/output error
/dev/vg04/swap: read failed after 0 of 4096 at 4096: Input/output error
/dev/vg04/vz: read failed after 0 of 4096 at 995903864832: Input/output error
/dev/vg04/vz: read failed after 0 of 4096 at 995903922176: Input/output error
/dev/vg04/vz: read failed after 0 of 4096 at 0: Input/output error
/dev/vg04/vz: read failed after 0 of 4096 at 4096: Input/output error
Volume group "vg04" not found
Skipping volume group vg04
Les VG et LV manquants ne sont pas importants, nous voulons juste les supprimer.
Comme vous pouvez le voir, nous avons essayé toutes les suggestions faites jusqu'à présent sans succès.
La sortie de «lvm dumpconfig» peut être vérifiée sur http://pastebin.com/MHiBzrLJ