5

I'm trying to run bitmonerod in a VirtualBox VM with --data-dir pointing to a directory in a shared folder from the host system. I get this error:

enter image description here

If I do the same in the host system, using the same directory in the shared folder, it works. It also works when copying the entire data dir of bitmonerod into the VM (which I want to avoid). Both host and guest are the same Linux distro (OpenSuSE Leap 42.1). Im running the official 0.9.4 binaries.

I have no clue what is the property of a shared folder that makes lmdb unhappy. It can't be a permission problem as I can read and write to the shared folder from within the VM.

| improve this question | | | | |
8

This will not work. VirtualBox shared folders don't support mmap, which is required for LMDB (and BDB).

| improve this answer | | | | |
  • For anyone wondering about a completely unrelated alternative solution, if networking is available, one could use Autofs/SSHFS as a confirmed working solution. Other protocols will also most likely work (NFS, Samba, etc.) though I have not confirmed those two. – anonimal Sep 28 '16 at 12:57
  • 2
    Note that LMDB docs state explicitly, use on networked filesystems is not supported. Make sure you don't try to use the files from two machines at once. – hyc Sep 28 '16 at 23:00
  • Thanks for clarifying, hyc; I've spent almost no time with LMDB so I jumped to conclusions. "Do not use LMDB databases on remote filesystems, even between processes on the same host. This breaks flock() on some OSes, possibly memory map sync, and certainly sync between programs on different hosts". But does this apply to FUSE (or any virtual layer)? I imagine so because "between processes" implies "between processes by the same user"; so flock() would be inevitable? – anonimal Sep 30 '16 at 20:32
  • 2
    I have no idea what else may break, that doc note was not an exhaustive list. The fundamental point for LMDB is that most remote filesystems will break one way or another. – hyc Oct 2 '16 at 7:10
6

I personally use an external hard drive to store the blockchain and get virtual box to capture the device so it can be recognised by the VB OS. It works very well as an alternative to storing the blockchain on the virtual OS itself.

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.