ioctl error when opening database on external hard drive #10787

issue dszakallas openend this issue on July 10, 2017
  1. dszakallas commented at 9:19 pm on July 10, 2017: none

    Describe the issue

    IO error when opening block database on NTFS partition of external hard drive on macOS.

    Can you reliably reproduce the issue?

    Yes.

    If so, please list the steps to reproduce below:

    1. Delete database:
    0david@mac:/Volumes/SAMSUNG/Ledgers% rm -rf BitCoinCore
    

    2. Open BitCoin-Qt. On Welcome Screen choose Use a custom data directory: /Volumes/SAMSUNG/Ledgers/BitCoinCore and click OK. 3. Wild alert box appears: image Click OK.

    Expected behaviour

    Should start creating the block database I guess. Never made it through this step.

    Actual behaviour

    image :(

    Contents of debug.log:

     02017-07-10 21:05:54 Bitcoin version v0.14.2
     12017-07-10 21:05:54 InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1
     22017-07-10 21:05:54 Assuming ancestors of block 00000000000000000013176bf8d7dfeab4e1db31dc93bc311b436e82ab226b90 have valid signatures.
     32017-07-10 21:05:54 Default data directory /Users/david/Library/Application Support/Bitcoin
     42017-07-10 21:05:54 Using data directory /Volumes/SAMSUNG/Ledgers/BitCoinCore
     52017-07-10 21:05:54 Using config file /Volumes/SAMSUNG/Ledgers/BitCoinCore/bitcoin.conf
     62017-07-10 21:05:54 Using at most 125 automatic connections (2560 file descriptors available)
     72017-07-10 21:05:54 Using 32 MiB out of 32 requested for signature cache, able to store 1048576 elements
     82017-07-10 21:05:54 Using 2 threads for script verification
     92017-07-10 21:05:54 scheduler thread start
    102017-07-10 21:05:54 Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010)
    112017-07-10 21:05:54 Using wallet wallet.dat
    122017-07-10 21:05:54 init message: Verifying wallet...
    132017-07-10 21:05:54 CDBEnv::Open: LogDir=/Volumes/SAMSUNG/Ledgers/BitCoinCore/database ErrorFile=/Volumes/SAMSUNG/Ledgers/BitCoinCore/db.log
    142017-07-10 21:05:54 Bound to [::]:8333
    152017-07-10 21:05:54 Bound to 0.0.0.0:8333
    162017-07-10 21:05:54 Cache configuration:
    172017-07-10 21:05:54 * Using 2.0MiB for block index database
    182017-07-10 21:05:54 * Using 8.0MiB for chain state database
    192017-07-10 21:05:54 * Using 440.0MiB for in-memory UTXO set (plus up to 286.1MiB of unused mempool space)
    202017-07-10 21:05:54 init message: Loading block index...
    212017-07-10 21:05:54 Opening LevelDB in /Volumes/SAMSUNG/Ledgers/BitCoinCore/blocks/index
    222017-07-10 21:05:54 IO error: /Volumes/SAMSUNG/Ledgers/BitCoinCore/blocks/index/000001.dbtmp: Inappropriate ioctl for device
    232017-07-10 21:07:06 init message: Loading block index...
    242017-07-10 21:07:06 Wiping LevelDB in /Volumes/SAMSUNG/Ledgers/BitCoinCore/blocks/index
    252017-07-10 21:07:06 Opening LevelDB in /Volumes/SAMSUNG/Ledgers/BitCoinCore/blocks/index
    262017-07-10 21:07:06 IO error: /Volumes/SAMSUNG/Ledgers/BitCoinCore/blocks/index/000001.dbtmp: Inappropriate ioctl for device
    

    What version of bitcoin-core are you using?

    Official binary, v0.14.2

    Machine specs:

    • OS: macOS Sierra
    • CPU: -
    • RAM: -
    • Disk size: -
    • Disk Type (HD/SDD): HDD

    Any extra information that might be useful in the debugging process.

    I am using Paragon NTFS for Mac driver to enable writing to the drive. Didn’t encounter any problems with other software so far.

  2. jonasschnelli commented at 8:08 am on July 11, 2017: contributor

    It seems that NTFS causes troubles (leveldb internal): #6606 #6528

    Ideally you try to store the leveldb database on an internal disk (~3GB). You can symlink out the block-files (the large part).

    Whats the reason to use NTFS on a Mac (third party drivers smell after causing troubles)?

  3. David-Griffiths commented at 8:17 am on July 11, 2017: none

    Just had this issue.

    Installed, downloaded blockchain then closed. Opened the client back up, encrypted my wallet. It crashed then wouldn’t load aything from network drive with the same error.

    If your network path is: \someplace\bitcoin

    And install dir is: C:\Program Files\Bitcoin

    Then client tries to lock a non existant file. Line from the log:

    2017-07-11 07:59:34 IO error: C:\Program Files\Bitcoin\someplace\bitcoin\blocks\index\LOCK: Could not lock file. 2017-07-11 07:59:37 scheduler thread interrupt 2017-07-11 07:59:37 Shutdown: In progress… 2017-07-11 07:59:37 Shutdown: done

    I created a symlink from the default data path: C:\Users\MyUser\AppData\Roaming\Bitcoin

    To the network drive, then added the datadir param to a shortcut of the bitcoin exe: “C:\Program Files\Bitcoin\bitcoin-qt.exe” -datadir=“C:\Users\MyUser\AppData\Roaming\Bitcoin”

    It still wants to do a full re-sync of the blockchain, but it opens now.

  4. jonasschnelli commented at 8:19 am on July 11, 2017: contributor
    @Andy-Baker: That is a different one 2017-07-11 07:59:34 IO error: C:\Program Files\Bitcoin\someplace\bitcoin\blocks\index\LOCK: Could not lock file.
  5. dszakallas commented at 8:25 am on July 11, 2017: none
    @jonasschnelli The HDD was used with a Windows machine earlier, and didn’t take the time to convert to HFS yet. I think I’ll do so.
  6. laanwj added the label MacOSX on Jul 13, 2017
  7. laanwj added the label Upstream on Jul 13, 2017
  8. laanwj commented at 12:47 pm on July 13, 2017: member
    Yes, this is an upstream issue with leveldb. Symlinking the block files indeed works.
  9. jimhashhq commented at 6:47 pm on July 25, 2017: none
    For partitioning bitcoin $datadir files amongst internal/external drives, I recently created a candidate doc: https://github.com/jimhashhq/bitcoin/blob/3c0377db483c50c5a9aecfc4684d6329951a1c7c/doc/file-partition.md This outlines which $datadir folders need to be on the internal drive and how to set up the “blocks” folder on an external drive. It seemed apropos this topic so I wanted to mention.
  10. MarcoFalke commented at 7:57 pm on May 8, 2020: member
    Is this still an issue with a recent version of Bitcoin Core? If yes, what are the steps to reproduce?
  11. MarcoFalke closed this on May 8, 2020

  12. MarcoFalke locked this on Feb 15, 2022

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

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