12.3. Removing lost LVM physical volumes from a volume group
If a physical volume fails, you can activate the remaining physical volumes in the volume group and remove all the logical volumes that used that physical volume from the volume group.
Procédure
Activate the remaining physical volumes in the volume group:
vgchange --activate y --partial myvg
# vgchange --activate y --partial myvgCopy to Clipboard Copied! Toggle word wrap Toggle overflow Check which logical volumes will be removed:
vgreduce --removemissing --test myvg
# vgreduce --removemissing --test myvgCopy to Clipboard Copied! Toggle word wrap Toggle overflow Remove all the logical volumes that used the lost physical volume from the volume group:
vgreduce --removemissing --force myvg
# vgreduce --removemissing --force myvgCopy to Clipboard Copied! Toggle word wrap Toggle overflow Optional: If you accidentally removed logical volumes that you wanted to keep, you can reverse the
vgreduceoperation:vgcfgrestore myvg
# vgcfgrestore myvgCopy to Clipboard Copied! Toggle word wrap Toggle overflow AvertissementIf you remove a thin pool, LVM cannot reverse the operation.