Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I had three drives in LVM: a 2 TB drive and two 1 TB drives (added later). One of the 1 TB drives -- I believe the third one -- has died. Spanning all three drives was an XFS partition.

Reading: http://www.novell.com/coolsolutions/appnote/19386.html I see that one way of handling this is to replace the dead drive and copy the metadata over. However, I am currently not in possession of a 1 TB drive and can not readily acquire one.

Given this, what are my options? There was nothing important on the drives (if there was I would have them in RAID 1) but I would not mind attempting a recovery. Is there a simple way of forcing LVM to go with just two drives and NUL out anything else? (So that fsck can do its thing.)

share|improve this question

1 Answer 1

up vote 0 down vote accepted

You can use dmsetup to create a fake ioerror device that just returns error for every read. Then use of lvm -P will allow you to operate on the working devices and will substitute /dev/ioerror for the missing one. This will allow you to get at your data that resides on the working drives, with IO error for the portions that reside on the missing drive.

See http://e2salvage.sourceforge.net/florian2.html for step by step instructions on creating the /dev/ioerror. From there, use lvm as normal but use -P to say it's okay to accept partial success.

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.