etcd-io / bbolt

An embedded key/value database for Go.
https://go.etcd.io/bbolt
MIT License
8.24k stars 641 forks source link

'invalid argument' error while opening database on qemu/9p_virtio shared file system #102

Closed jooola closed 5 months ago

jooola commented 6 years ago

I tried to store a db on a 9p_virtio shared file system but it throw me a 'invalid argument' error. The db file gets created but seems it don't like something related to the file system. Running on a regular file system works just fine.

Running on debian 9 a qemu/kvm virtual machine, sharing file system with host trough 9p_virtio module, in 'mapped' mode.

Here is my fstab :

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/vda2 during installation
UUID=f3905f5b-7c6f-4093-b4c5-2f5c31037113 /               ext4    errors=remount-ro 0       1
# swap was on /dev/vda1 during installation
UUID=9cd015f1-ce56-41c6-9f41-bc0048f9f053 none            swap    sw              0       0
# Host share (data-stk-oo)
data-stk-oo /mnt/storkshare 9p rw,sync,dirsync,relatime,trans=virtio,version=9p2000.L 0 0

The only logs I get from go is invalid argument :

2018/06/11 10:19:09 Info:  Starting the server ...
2018/06/11 10:19:09 Info:  Checking data folders
2018/06/11 10:19:09 Info:  Loading database
2018/06/11 10:19:09 Info:  No database found, creating new one
2018/06/11 10:19:09 Fatal: invalid argument
cenkalti commented 1 year ago

"invalid argument" error comes from mmap call. I am not sure if p9 filesystem have mmap support. If not, it's not possible to use bbolt on that.

Related https://github.com/etcd-io/bbolt/issues/258

jmhbnz commented 10 months ago

Discussed during sig-etcd triage meeting. @ahrtr should we close this in favor of the more detailed tracking issue for plan 9 https://github.com/etcd-io/bbolt/issues/587?

ahrtr commented 10 months ago

It should be a feature request, please refer to https://github.com/etcd-io/bbolt/issues/665