Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: Keninishna on January 31, 2013, 08:13:56 AM



Title: need help recovering a wallet.dat off a corrupt vmdk file
Post by: Keninishna on January 31, 2013, 08:13:56 AM
ok so I have a ubuntu vm that I ran bitcoind on and took several snapshots in esx a year later or esx won't boot the vm saying the vmdk file is corrupt. I managed to copy the vmdk files off the server using linux vmfs tools but still can't access the vmdk files with vmware. The base image loads up fine but doesnt have the wallet file and none of the snapshot delta files will load. Any ideas on how to get the wallet file? I know makomk has a linux wallet recovery program however I don't think I can mount the linux virtual disk. I'll throw some one a few btc if they can help me get my wallet.dat as thanks.


Title: Re: need help recovering a wallet.dat off a corrupt vmdk file
Post by: notme on January 31, 2013, 08:17:39 AM
ok so I have a ubuntu vm that I ran bitcoind on and took several snapshots in esx a year later or esx won't boot the vm saying the vmdk file is corrupt. I managed to copy the vmdk files off the server using linux vmfs tools but still can't access the vmdk files with vmware. The base image loads up fine but doesnt have the wallet file and none of the snapshot delta files will load. Any ideas on how to get the wallet file? I know makomk has a linux wallet recovery program however I don't think I can mount the linux virtual disk. I'll throw some one a few btc if they can help me get my wallet.dat as thanks.

https://bitcointalk.org/index.php?topic=25091.0

I think that should work as long as you give it the vmdk file instead of a block device.  If not, setup a loopback device and use that.


Title: Re: need help recovering a wallet.dat off a corrupt vmdk file
Post by: Bitsky on January 31, 2013, 08:46:58 AM
Any idea how the vmdk got corrupted?

Since a vmdk is just a disk, you can use fdisk/sfdisk/parted to dump the partition table and use that information to calculate the offsets you need to loop-mount them.


Title: Re: need help recovering a wallet.dat off a corrupt vmdk file
Post by: Keninishna on January 31, 2013, 09:18:27 AM
Any idea how the vmdk got corrupted?

Since a vmdk is just a disk, you can use fdisk/sfdisk/parted to dump the partition table and use that information to calculate the offsets you need to loop-mount them.

well vmware was giving me some errors about the virtual swap files so I had to manually assign the ram reservations to the vm and it booted up the vm but froze at some point, after that i was getting errors from vmware trying to boot it and it would'nt even let me copy the vmdk files off the raid array. All my other vms that i was running started crashing and giving disk errors. Not sure what went wrong because the raid array is reporting fine. Thanks for the guidance though, i'll look into loop mounting the vmdk then I should be able to run makomk's recovery.


Title: Re: need help recovering a wallet.dat off a corrupt vmdk file
Post by: Bitsky on January 31, 2013, 12:38:22 PM
Even if your raid looks fine, I would let the raid controller do a complete verify and check the SMART status of each disk. Maybe the controller had already resynced after an error appeared.
Are you by any chance over-allocating resources? Maybe your vm-storage ran out of disk space and when your vm requested swap it blew up.
Or, if you are using network storage (NFS, iSCSI, FC) the connection went away; which is essentially just like a disappearing drive. The OS will panic and the disks will be in an inconsistent state.
If you find a vswp file, try renaming it, booting and re-renaming it again.
You did not backup your vm's to another storage, right?

Also, I don't think you need to mount a drive to run that python tool which tries to recover keys. If you succeed mounting the partitions however, you can simply copy your wallet. The python tool only dumps the keys it can find if I remember correctly (it's somewhat like a brute-force search).


Title: Re: need help recovering a wallet.dat off a corrupt vmdk file
Post by: notme on February 02, 2013, 10:33:44 PM
Even if your raid looks fine, I would let the raid controller do a complete verify and check the SMART status of each disk. Maybe the controller had already resynced after an error appeared.
Are you by any chance over-allocating resources? Maybe your vm-storage ran out of disk space and when your vm requested swap it blew up.
Or, if you are using network storage (NFS, iSCSI, FC) the connection went away; which is essentially just like a disappearing drive. The OS will panic and the disks will be in an inconsistent state.
If you find a vswp file, try renaming it, booting and re-renaming it again.
You did not backup your vm's to another storage, right?

Also, I don't think you need to mount a drive to run that python tool which tries to recover keys. If you succeed mounting the partitions however, you can simply copy your wallet. The python tool only dumps the keys it can find if I remember correctly (it's somewhat like a brute-force search).

I only meant to set up the loopback to run the tool on in case it wanted an actual block device instead of a file.  You are right there is no need to mount it.