Author

Topic: Bitcoin-QT, reindex or build all new blockchain (Read 1968 times)

soy
legendary
Activity: 1428
Merit: 1013
December 18, 2013, 07:24:14 PM
#3
Went to backup my wallet.  Had difficulty getting it saved to a USB drive.  Ended up copying it as root.  That was two days ago.  Have been on terminal rather than KDE so didn't notice the client wasn't keeping up to date.  Today it was 2 day behind when I went back to KDE.  It didn't catch up.  I checked the debug log and was getting a lot of orphaned blocks.

I deleted peers.dat but that didn't help.

I've started reindexing, currently 123 weeks behind.  I wonder if I'm making a mistake and should instead rebuild the blockchain.  I'm wondering if when I get to 2 days behind I'll start running into the orphaned blocks problem again.

Woke up this morning to 78 weeks behind but a large notification System error: Database corrupted.

Just looked in my ./.bitcoin directory and see a ./.lock file from about the past.  Deleted it but still get Database corrupted.

Rebooted, restarted Bitcoin-QT, am now at 78 weeks behind and apparently sync'ing.  So, the hidden file ./.lock, located with ls -la, may have been the bug.  Presently at 77 weeks behind.  Wish I had found that lock file before commencing a reindex.....

reindex failed.  Have deleted all files except wallet.dat, which has coins, and restarted building the blockchain.

Well, that failed.  At 64 weeks behind I got a System error: Database corrupted.  How can that be?  The only file left was the wallet.dat, including all the subdirectories.

Guess I'll have to go to a backup wallet.dat and try building with that.

Wonder if it could be the hard drive.  Previously the hard drive was two partitions.  I used gparted to grow the volume to double the partition size.  Right now it's only showing usage of 13%.

debug.log says CDB() : can't open database file wallet.dat, error 2       bitcoin in a Runaway exception

removed the lock, killed the process, ran bitcoind -salvagewallet and am retrying

Okay, so I then restarted Bitcoin-QT with the -salvagewallet switch.  It loaded the wallet.dat file, verified blocks, rescanned, and opened at 64 weeks behind.  This isn't a backup wallet it's the original.  It has restarted building the blockchain at the point it had come up with the wallet.dat error 2.

Oh well, somehow it started building a new wallet and the contents changed from unconfirmed some btc to unconfirmed 0.00btc but it is down to 55 weeks.  Time to swap the wallet.dat out for a backup copy and start again is my guess.  ...muddling my way thru.

loading block index...
verifying blocks...
loading wallet...
rescanning....
done...
synchronizing 55 weeks behind and showing transaction history and unconfirmed balance....now if it gets to present day eventually all well and good.


So, I've learned that if a backup wallet.dat is put into the bitcoin directory and Bitcoin-QT restarted, a whole new blockchain isn't downloaded, all that happens is that the blockchain is rescanned which is much quicker than downloading the blockchain.  This makes cold storage seem a more reasonable option.

-----

Odd.  Up in the middle of the night and checked the progression of the blockchain.  It was okay but the Ubuntu had a message displayed about some gnome applet failing to load and did I want to delete it.  I just ignored the message and went back to bed.  This morning the desktop was clear, no Bitcoin-QT but also no taskbar.  I rebooted and Bitcoin-QT came up with a corrupt wallet message.  Killed the Bitcoin-QT, deleted the wallet.dat, deleted the peers.dat (the last messages in the debug.log were regarding something like repeated flushing of peers.dat), removed the lock file and replaced the wallet.dat with the backup copy from earlier this month.  At this point ps aux could find no instance of Bitcoin and the lock file had been removed.  Rebooting should not have restarted Bitcoin-QT as it was shut down and not running.  So, I rebooted and let things settle after logging in.  Low and behold an instance of Bitcoin-QT did open, the wallet had the proper amount of btc as unconfirmed, and blockchain building recommenced and is ongoing now.

Some hours later it has again come up with database corrupted.  Will try with a new wallet so see if the error is introduced by the wallet.dat.

--------------------

Blockchain download is so slow I'm wondering if it's de facto depreciated.

--------------------

Got down to 30 weeks, saw the post to get the daily blockchain and put it in the blocks directory after deleting as directed and reindexing, then found reindexing was really no quicker than downloading bootstrap.dat file and loading from that.  But in deleting and restarting I put myself back and seem to be redoing work.  It is slow going.  *Big mistake deleting an existing blockchain.*
soy
legendary
Activity: 1428
Merit: 1013
Went to backup my wallet.  Had difficulty getting it saved to a USB drive.  Ended up copying it as root.  That was two days ago.  Have been on terminal rather than KDE so didn't notice the client wasn't keeping up to date.  Today it was 2 day behind when I went back to KDE.  It didn't catch up.  I checked the debug log and was getting a lot of orphaned blocks.

I deleted peers.dat but that didn't help.

I've started reindexing, currently 123 weeks behind.  I wonder if I'm making a mistake and should instead rebuild the blockchain.  I'm wondering if when I get to 2 days behind I'll start running into the orphaned blocks problem again.

Woke up this morning to 78 weeks behind but a large notification System error: Database corrupted.

Just looked in my ./.bitcoin directory and see a ./.lock file from about the past.  Deleted it but still get Database corrupted.

Rebooted, restarted Bitcoin-QT, am now at 78 weeks behind and apparently sync'ing.  So, the hidden file ./.lock, located with ls -la, may have been the bug.  Presently at 77 weeks behind.  Wish I had found that lock file before commencing a reindex.....

reindex failed.  Have deleted all files except wallet.dat, which has coins, and restarted building the blockchain.
soy
legendary
Activity: 1428
Merit: 1013
Went to backup my wallet.  Had difficulty getting it saved to a USB drive.  Ended up copying it as root.  That was two days ago.  Have been on terminal rather than KDE so didn't notice the client wasn't keeping up to date.  Today it was 2 day behind when I went back to KDE.  It didn't catch up.  I checked the debug log and was getting a lot of orphaned blocks.

I deleted peers.dat but that didn't help.

I've started reindexing, currently 123 weeks behind.  I wonder if I'm making a mistake and should instead rebuild the blockchain.  I'm wondering if when I get to 2 days behind I'll start running into the orphaned blocks problem again.
Jump to: