0

I've run into an issue where a bitcoin partition reached 100%.

I created a new partition and try to move the whole Bitcoin directory over, but I seem to be handicapped by "no space left on device" errors.

enter image description here

nyc1_04 is my new mounted volume. I've started the copy process which eventually failed with "no space left on device" and now all operations seem to fail.

i've already tried apt autoremove and apt-get clean.

what are some files i could delete in existing Bitcoin core folder to free up a little space but make it rebuildable when service restarts?

Sonic Soul
  • 171
  • 3
  • 9

1 Answers1

2

Depending on your requirements, you can run in prune mode:

$ bitcoind -prune <max-MiB>

-prune= Reduce storage requirements by enabling pruning (deleting) of old blocks. This allows the pruneblockchain RPC to be called to delete specific blocks, and enables automatic pruning of old blocks if a target size in MiB is provided. This mode is incompatible with -txindex and -rescan. Warning: Reverting this setting requires re-downloading the entire blockchain. (default: 0 = disable pruning blocks, 1 = allow manual pruning via RPC, 550 = automatically prune block files to stay under the specified target size in MiB)

see https://bitcoin.stackexchange.com/a/37497/60443

JBaczuk
  • 7,388
  • 1
  • 13
  • 34
  • hi thanks i am trying to avoid prune mode. I have the necessary space just need to move / copy my blocks to the new mounted volume. also not sure the service would start with prune mode considering i am getting the error on every operation because no space is left – Sonic Soul Aug 27 '18 at 15:51
  • it seems the OS needs a little space even for moving files out, which is why it is not letting me move out of 100% full volume – Sonic Soul Aug 27 '18 at 15:53
  • Oh, that doesn't match the title of your question. Are you sure about that assumption, that it's referring to the local disk and not the new volume? How is it formatted? – JBaczuk Aug 27 '18 at 15:59
  • the title means, can i manually delete some blocks to free up space.

    as for the new mounted volue, it appears to have 330 gigs free space

    /dev/sda ext4 348G 67M 330G 1% /mnt/volume_nyc1_04

    – Sonic Soul Aug 27 '18 at 16:26
  • although you may be onto something! when i try to copy files to the new volume i get this error:

    cannot create regular file '/mnt/volume-nyc1-04/Bitcoin/Bitcoin/blocks/blk01342.dat': No space left on device

    – Sonic Soul Aug 27 '18 at 16:36
  • i tried re-formatting it and attempting another copy, it seems to be in progress, let's hope it succeeds :| im just confused how that filling up seems to have also filled up the main 80GB partition?! – Sonic Soul Aug 27 '18 at 16:45
  • i moved to a bigger volume. that all succeeded but now when i try to start the service it fails.

    Process: 1690 ExecStart=/usr/bin/bitcoind -daemon -pid=/mnt/volume-nyc1-04/Bitcoin/bitcoind.pid -conf=/home/bitcoin/.bitcoin/bitcoin.conf -datadir=/mnt/volume-nyc1-04/Bitcoin (code=exited, status=1/FAILURE)

    – Sonic Soul Aug 27 '18 at 18:12
  • think i figured it out. was access issue since i used root acct to map/move data and new folders were not accessible :) whew.. – Sonic Soul Aug 27 '18 at 19:01
  • glad you got it working! – JBaczuk Aug 27 '18 at 19:02