Bitcoin Core 28.0 (Flatpak Linux Mint) pointing or saving blockchain to external drives does not work #31188

issue Urpferd openend this issue on October 30, 2024
  1. Urpferd commented at 7:42 pm on October 30, 2024: none

    Is there an existing issue for this?

    • I have searched the existing issues

    Current behaviour

    • bitcoin core 28.0 (flatpak) won’t save data (blockchain nor chainstate) to external drive
    • dialogue box for creating path to save blockchain to save elsewhere will never appear
    • changing config file doesn’t change anything but continue to save to home directory

    Expected behaviour

    saving or continuing blockchain on external harddrive

    Steps to reproduce

    1. Fresh install of Linux Mint 22.0
    2. Install via mintinstall (flatpak) bitcoin core 28.0
    3. Saving or continuing of blockchain to external drive doesn’t work, everything gets saved to home directory for example: /home/USERNAME/.var/app/org.bitcoincore.bitcoin-qt
    4. Configuration via bitcoin.config (datadir = /media/USERNAME/EXTERNALDRIVE) doesn’t work, download will always fall back to home directory
    5. Overriding flatpak in terminal with command doesn’t change anything: sudo flatpak override org.bitcoincore.bitcoin-qt –filesystem=/media/USERNAME/EXTERNALDRIVE

    Relevant log output

    No response

    How did you obtain Bitcoin Core

    Package manager

    What version of Bitcoin Core are you using?

    28.0

    Operating system and version

    Linux Mint 22.0, (6.2.9)

    Machine specifications

    Dell Latitude E7240, Intel© Core™ i5-4310U CPU, SSD 128GB

  2. maflcko added the label Questions and Help on Oct 31, 2024
  3. 0xB10C commented at 12:08 pm on October 31, 2024: contributor

    Are you sure your configuration file is read? The file should be named bitcoin.conf and not bitcoin.config. You can see the bitcoin.conf configurations being logged at the start of the debug.log during startup?

    For example, for me it shows:

    0...
    1Default data directory /home/user/.bitcoin
    2Using data directory /home/user/.bitcoin/signet
    3Config file: /home/user/.bitcoin/bitcoin.conf
    4Config file arg: [main] prune="550"
    5Config file arg: [main] rest="1"
    6Config file arg: [main] prune="0"
    7...
    
  4. Urpferd commented at 5:26 pm on October 31, 2024: none

    Thank you so much, good catch, it is my bad! Although I don’t know when this change into .config might have happened, weird. I don’t remember creating this file but copy pasting.

    Blocks get now written on external drive but not the other data.

    Unfortunately, it seems some command-line argument switches path back to default datadir, is there any way to change this?

    It would be so much easier for less tech savvy people and normies being able to adjust paths through GUI like other software does.

     0##in my debug.log##
     1...
     2Default data directory /home/USERNAME/.bitcoin
     3Using data directory /home/USERNAME/.var/app/org.bitcoincore.bitcoin-qt/data
     4Config file: /home/USERNAME/.var/app/org.bitcoincore.bitcoin-qt/data/bitcoin.conf
     5Config file arg: blocksdir="/media/USERNAME/DRIVE/BTC/data"
     6Config file arg: datadir="/media/USERNAME/DRIVE/BTC"
     7Command-line arg: datadir="/home/USERNAME/.var/app/org.bitcoincore.bitcoin-qt/data"
     8...
     9
    10##my bitcoin.conf arguments are:##
    11datadir=/media/USERNAME/DRIVE/BTC
    12blocksdir=/media/USERNAME/DRIVE/BTC/data
    
  5. willcl-ark commented at 1:03 pm on November 28, 2024: member

    I can’t reproduce this:

    image

    Running the following correctly locates the datadir on an external drive:

    0mkdir -p /mnt/bulk/flatpak
    1sudo flatpak override --system org.bitcoincore.bitcoin-qt --filesystem=/mnt/bulk
    2flatpak run org.bitcoincore.bitcoin-qt -datadir=/mnt/bulk/flatpak
    

    Are you doing something different to me here?

    In any case, I don’t this there is any issue with Bitcoin Core (or the flatpak), and this issue can likely be closed.

  6. willcl-ark commented at 1:38 pm on November 28, 2024: member

    In fact, I am going to close this now, as I think this is all expected behaviour. Command line options take precedence over config file arguments, and so in your case:

    0Config file arg: blocksdir="/media/USERNAME/DRIVE/BTC/data"
    1Config file arg: datadir="/media/USERNAME/DRIVE/BTC"
    2Command-line arg: datadir="/home/USERNAME/.var/app/org.bitcoincore.bitcoin-qt/data"
    

    The command line -datadir="/home/USERNAME/.var/app/org.bitcoincore.bitcoin-qt/data arg is correctly overriding the config file option datadir="/media/USERNAME/DRIVE/BTC.

    Let me know if I’ve missed something and we need to re-open this.

  7. willcl-ark closed this on Nov 28, 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