Network Drive (NAS) Support #26939

issue byjlw openend this issue on January 20, 2023
  1. byjlw commented at 8:34 pm on January 20, 2023: none
    Would be great if I we could use an smb drive as the data drive.
  2. byjlw added the label Feature on Jan 20, 2023
  3. willcl-ark commented at 8:37 pm on January 20, 2023: contributor
    Hey @byjlw, what exactly did you have in mind here? Can you not mount the smb drive and use as it the datadir for some reason?
  4. byjlw commented at 9:54 pm on January 20, 2023: none

    No, it results in lock errors. This was the best context on the issue I’ve found so far

    https://bitcoin.stackexchange.com/questions/60541/is-it-possible-to-use-bitcoin-core-on-mac-os-sierra-saving-the-data-on-the-netwo

    5

    +50 Core (more specific levelDB, the database library used) does not support network drives. Also, the UTXO access (chainstate) must be as fast as possible and should run on an internal drive, ideally an SSD.

  5. willcl-ark commented at 10:16 pm on January 20, 2023: contributor

    Thanks, I didn’t know.

    Also seems like there are some workarounds in this closed issue. The context there also indicates that outside of advising that you symlink old .dat block files to the smb drive (via custom script) there is not much that we can do about it in Core due to levelDB limitations.

    That said, I’d re-iterate what was said in that thread: you really don’t want your chainstate database ($DATADIR/chainstate) or block index ($DATADIR/blocks/index) on a slow networked disk as fast access is needed for these, but raw block (blk*.dat) and maybe their undo files (rev*.dat), which comprise the bulk of a node’s storage requriements, are probably ok on a networked drive.

  6. byjlw commented at 10:28 pm on January 20, 2023: none
    Yes, agree on storage speed. In my case though, it’s RAID SSD disks on a 1000mb/s network, so faster than most single internal storage solutions.
  7. willcl-ark commented at 3:58 pm on January 24, 2023: contributor

    I don’t have an smb drive to test with, but I did test with an nfs NAS that running with the -blocksdir=/path/to/network/drive option appears to work without issue. Therefore I can see two potential solutions for you:

    1. Run bitcoind with the datadir on an internal disk, and use option -blocksdir=... to configure blocks and their associated revision files to be stored on your networked RAID array, which will only leave a few 10’s of GB on your internal drive.

    2. Periodically stopping bitcoind and transferring the blk*.dat and rev*.dat files onto your network drive using one of the scripts found in issue #7981.

    If you feel that the -blocksdir option solves your problem then feel free to close this issue. If you think there should be another resolution then let us know and leave it open.

  8. byjlw commented at 5:53 pm on January 25, 2023: none
    Thanks I’ll try this out
  9. fanquake commented at 11:11 am on February 24, 2023: member
    @byjlw What’s the status of this / result of your testing?
  10. fanquake added the label Questions and Help on Feb 24, 2023
  11. byjlw commented at 12:41 pm on February 24, 2023: none
    Came up with a different solution. Will close this issue.
  12. byjlw closed this on Feb 24, 2023

  13. bitcoin locked this on Feb 24, 2024

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-21 15:12 UTC

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