Hacker News new | ask | show | jobs
by AlexSW 1284 days ago
How did you get it out of RAM so cleanly?
1 comments

It wasn't clean, I had to manually parse it out of /proc and triple check the math before committing it with fdisk.
I had something like this happen once -- a company I was at had these old RAID arrays that we kept limping along while we waited for budget to buy ones from a company that hadn't ceased to exist, and at some point a disk failed in some way that caused the RAID system to lose its internal partition table information (to my recollection... it's been awhile).

I could still access the block devices, but couldn't instantiate the logical volumes, and dumping dd chunks showed that there was data there... so I wrote some code to scan the disk for ext2 magic numbers, and once I found them did some math on paper to find the partition boundaries and very... carefully... recreate them. I have a photo of the piece of paper here: https://www.flickr.com/photos/jedwards/4494268626/

Do you have a blog post about this with more details somewhere?
Haha, posted the same message at the same time. Great minds think alike ;]
I don't have one right now, but maybe soon!
Looking forward to it...
That's pretty hard core. Any resources you recommend to understand the steps involved? Maybe a write-up by yourself?