However great LVM is in Linux, allowing one to span single „partition” over several hard drives, if the underlying „drives” are real hard drives and not RAID volumes, You can get pretty fucked when one of those disks fails.
It took me several hours of googling around and trials to find out how to recover as much data as is possible (meaning: all the data that is on remaining disks, the data on failed drive is obviously lost). So let’s try to add a short and working recipe to Google.
- You do NOT have to pvcreate any bogus empty PVs with fake UUIDs to replace the failed drive. LVM2 can be used in „partial” mode without all the drives.
- To use partial mode, You need to create /dev/ioerror device like this (I use Ubuntu, in other distros it might be different):
nano filename
to create a text file where a single line „0 9999999999 error” sans quotes should be placeddmsetup create ioerror filename
to create a device LVM will read instead of missing PVln -s /dev/mapper/ioerror /dev/ioerror
so it’s just where LVM will look for it
- After ioerror is created, just activate your volume group in partial mode using
vgchange -P -ay VOLNAME
- Mount it (it will mount in read only mode) and copy your precious data
Cheers to these guys who finally written something I could use instead of pvcreate and bogus hard drives discussions.
Many thanks for this. Your plan to give something back to google worked, and I’ve recovered the files I couldn’t access from my LVM (-1 disk), after the backups had also failed. This is a much simpler solution than the others I’d found elsewhere.
Not bad at all fellas and gaalsl. Thanks.
Normally I’m against killing but this article slaughtered my ignorance.
slamfu “It’s still hard to believe only 8 Democrats and 1 Republican voted against the repeal.”Yea, its votes like that that remind me we have a problem not just with the GOP, but many of the spineless dems who are also either bought and paid for by the Wall St. donors or are too stupid to do the right thing.
polgara: a few of them are copyrighted… when i got one like that i just hit “reload” and took the next one!szarek (will): i LIKE it!jenty: yours is very cool!preposterous ponderings: yeah this one did… teeheemalicious intent: i’ll be right there!s.c.g: ‘s awesome when it works out so well! i did a few of them…
That’s a nicely made answer to a challenging question
إبداع يا مØÂمود، أشكرك!هل من المقرر نشر تلك المذكرات؟ هل توجد مذكرات أخرى يمكن الاستعانة بها للتعر٠على ذلك التاريخ؟