datadir on plan9 filesystem #3641

issue ViliusSutkus89 openend this issue on February 7, 2014
  1. ViliusSutkus89 commented at 6:18 pm on February 7, 2014: none

    Plan9 has a network file system called 9p. Also really handy when trying to share storage between Host OS and virtualized guests in Qemu environment. Kinda like NFS, but less bloat.

    Apparently bitcoind doesn’t like this file system, I assume it’s because of lacking file locking capabilities in leveldb on 9p… or something.

    Anyways, would be awesome if debug.log would at least give an error message on why this is failing.

    debug.log: 2014-02-07 10:54:46 Bitcoin version v0.8.6.0-g03a7d67-beta () 2014-02-07 10:54:46 Using OpenSSL version OpenSSL 1.0.1f 6 Jan 2014 2014-02-07 10:54:46 Default data directory /var/lib/bitcoin/.bitcoin 2014-02-07 10:54:46 Using data directory /var/lib/bitcoin/.bitcoin 2014-02-07 10:54:46 Using at most 125 connections (1024 file descriptors available) 2014-02-07 10:54:46 Using 4 threads for script verification 2014-02-07 10:54:46 init message: Verifying wallet… 2014-02-07 10:54:46 dbenv.open LogDir=/var/lib/bitcoin/.bitcoin/database ErrorFile=/var/lib/bitcoin/.bitcoin/db.log 2014-02-07 10:54:46 Bound to 0.0.0.0:8333 2014-02-07 10:54:46 init message: Loading block index… 2014-02-07 10:54:46 Opening LevelDB in /var/lib/bitcoin/.bitcoin/blocks/index 2014-02-07 10:54:46 : Error opening block database. Do you want to rebuild the block database now? 2014-02-07 10:54:46 Shutdown : In progress… 2014-02-07 10:54:46 Flush(false) 2014-02-07 10:54:46 DBFlush(false) ended 1ms 2014-02-07 10:54:46 StopNode() 2014-02-07 10:54:47 Flushed 0 addresses to peers.dat 520ms 2014-02-07 10:54:47 Flush(true) 2014-02-07 10:54:47 DBFlush(true) ended 1ms 2014-02-07 10:54:47 Shutdown : done

  2. scintill commented at 5:56 am on February 17, 2014: none

    You might be able to get a better idea of the error by running strace bitcoind and looking for an error code before it writes “Error opening block database.” I also suspect LevelDB and/or bitcoin are requesting some special flags when they open the file, which are not supported by 9p, or networked FS in general.

    Running with datadir over a network may not be advisable for heavy production use. But perhaps you are not in such a situation, or others can vouch it works OK.

  3. laanwj commented at 1:27 pm on February 17, 2014: member
    This is really an issue for upstream leveldb. If leveldb doesn’t support that file system we can’t either.
  4. ViliusSutkus89 commented at 8:45 pm on February 25, 2014: none

    scintill, thanks for the hint.

    Turns out virtfs doesn’t like mmaps which are writeable and MAP_SHARED. May dig deeper, but this is kind of a rabbit hole.

    Definitely NOTOURBUG from bitcoin perspective.

  5. ViliusSutkus89 closed this on Feb 25, 2014

  6. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-22 06:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me