-
Notifications
You must be signed in to change notification settings - Fork 427
Boltdb breaks drive with (panic: invalid page type:) or (panic: above high water mark)
@odeke says that boltdb is present to locally keep a copy of remote metadata information about each file so that it can detect conflicts as well as give it more information when a file changes.
There are two options,
- restores the boltdb libraries and file into a working state.
- removes the corrupt / broken boltdb file.
For those who are pulling a fresh code base on a new system using
go get -u github.com/odeke-em/drive/cmd/drive
You may encounter error reported in the following issues.
- #824 boltdb panics with
above high water mark
on drive pull - #828, #844 panic: invalid page type: X: X
- #839 Pull fails with status 404
These can simply be solved by forcing the version of boltdb that is used.
$ cd $GOPATH/src/github.com/boltdb/bolt && git reset --hard 852d3024fa8d89dcc9a715bab6f4dcd7d59577dd
$ drive-gen
Then doing a new fresh drive init to pull the google drive account that you are interested in.
$ cd ~/Documents
$ mkdir new_drive_dir $ cd new_drive_dir
$ drive init
Please use whichever paths make sense for your setup instead of "~/Documents" and "new_dirve_dir" Paste the URL into a web browser, copy initialisation token back into prompt.
A drive pull now will correctly initialize the path
$ drive pull
As per this issue 844 You can also# remove your boltdb database file. cd to your drive directory
$ cd ~/Documents
$ cd new_drive_dir
$ rm .gd/drivedb
This option should not be used as you are working around the why that the system is supposed to work. Please update the wiki with your findings as to how this is working for you.