Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open leveldb failed IO error: /XX/XX/XX invalid argument #281

Closed
jetliwei123 opened this issue Mar 26, 2015 · 9 comments
Closed

Open leveldb failed IO error: /XX/XX/XX invalid argument #281

jetliwei123 opened this issue Mar 26, 2015 · 9 comments

Comments

@jetliwei123
Copy link

hi, I met Invalid argument when I use leveldb on the cifs file system, could you please help me? thanks
I mount a cifs path on my linux machine, and then run my leveldb program, and the leveldb open failed with "Open leveldb fialed IO error: /XX/XX/XX Invalid argument" and the path is the cifs path.
Is the leveldb did not support cifs file system? looking forward your reply!
In addition: I just do leveldb::db::Open in the code, no other operator. Thanks!
BTW: after confirm, the IO error report from function SyncDirIfManifest env_posix.cc, when do fsync(fd), the error is reported.

@tfarina
Copy link

tfarina commented Apr 17, 2015

You may want to try asking on the leveldb mailing list as well.

https://groups.google.com/forum/#!forum/leveldb

@dtm-labs
Copy link

I don't think you should run leveldb on cifs. There may be many filesystem issue there, like fsync, performance, symbol link.

@cupuyc
Copy link

cupuyc commented Sep 14, 2016

I saw similar issue in VirtualBox in shared folder. Maybe it is relevant.
Level/levelup#222
Solved by moving DB to root partition.

@RobertDiebels
Copy link

Having the same issue. Trying to run a Docker container which uses leveldb internally. I used a volume which connects a folder in the container to one on my host OS.

I saw similar issue in VirtualBox in shared folder.

Might be worth noting that running Docker on windows requires the Docker Quickstart Terminal. Which in turn creates shared folders so the containers can access them.

Setup
OS: Windows 10
LevelDB version: goleveldb 8c81ea47d4c41a385645e133e15510fc6a2a74b4 (github.com/syndtr/goleveldb)
Docker version: 17.05.0-ce

@adam-azarchs
Copy link
Contributor

Windows does not permit memory-mapping of files on network shares, so I don't think this is something that will ever work - memory-mapping seems pretty fundamental to the architecture of leveldb.

VMs such as VirtualBox and the windows Docker host (which uses a Linux VM, unlike docker on Linux which is not a VM) expose the host drives as CIFS shares.

@cmumford
Copy link
Contributor

@adam-azarchs leveldb has no requirement for memory mapping and it is entirely possible to use an Env that does no mapped file I/O. I think the real problem with network shares is file locking which leveldb relies on to ensure exclusive database access. This either does not work, or can be problematic depending on the platform.

@adam-azarchs
Copy link
Contributor

OK, my mistake then. I know it's used in the posix env, but hadn't paid enough attention to the fallback options. But yes, support for file locking on network shares (including nfs, where leveldb still works) is inconsistent at best.

@Suor
Copy link

Suor commented Aug 28, 2019

Why is this closed? Does LevelDB officially not work on CIFS?

@pwnall
Copy link
Member

pwnall commented Aug 28, 2019

You can write your own Env subclass that adds supports for special cases like CIFS. We don't plan to implement more complex locking in the Env implementations that ship with LevelDB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants