Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

Thanks!

share|improve this question

1 Answer 1

up vote 0 down vote accepted

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!
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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