I have an LVM logical volume spread over eight separate physical volumes on Amazon AWS. The logical volume is formatted using ext3.

One of my physical volumes has failed. Is there any way to recover some or all of the data from the remaining volumes?



I was able to more-or-less recover the remaining data by doing the following:

  1. Add a new physical volume to use as a replacement for the failed physical volume.
  2. Use vgscan to determine the UUID of the missing (failed) physical volume.
  3. Use pvcreate --uuid [uuid of failed volume] to add the new physical volume and to give it the same uuid and device descriptor as the failed one.
  4. Use vgcfgrestore [the volume group name] to restore the volume group descriptor (may or may not be needed.)
  5. Use vgchange -ay [the volume group name] to activate the volume group.
  6. Run e2fsck -y [the logical volume] to fix any errors; there will be a lot of them.
  7. Run mount [the logical volume] [desired mount point] and voilà! I found my remaining data!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.