Go-ethereum: No space left on device

Created on 19 Dec 2017  路  5Comments  路  Source: ethereum/go-ethereum

Hello,

System information

Geth version: 1.7.2-stable-1db4ecdc
OS & Version: Ubuntu 16.04

Problem

I was running my node in --syncmode fast mode and the block size was small until the node was fully synced. When the node got synced and started import new chain segments after some time I've received No space left on device error, although amount of free space on disk after finishing syncing node was bigger then synced blockchain size, and that free space simply was taken by next 200 000 blocks (against 4 500 000 blocks which were downloaded while node was syncing).

So, does node stop fast syncing when blockchain got synced and start importing blocks in their fool size? If yes - is there any opportunity to remove irrelevant data to free some space without removing and re-syncing blockchain?

Most helpful comment

Is there a feature request for database trimming/ purging historical states on a live geth instance?

All 5 comments

So, does node stop fast syncing when blockchain got synced

Yes. There should be a message pertaining to the fact, with default log level messages. Should also be printed on geth launch.

and start importing blocks in their fool size?

A fast sync imports full blocks, too; what it doesn't import is historical (archive) states. So, for example, you wouldn't be able to look up the balance of an account at a particular past block.

is there any opportunity to remove irrelevant data to free some space without removing and re-syncing blockchain?

Trimming the database (aka purging historical states) on a "live" geth is not currently possible AFAIK.

As a rough estimate, the blockchain itself plus historical states is currently growing at ~ 25 GiB/week for me (running geth 1.7.3).

You could plan accordingly, and try using geth export, geth removedb, and geth import - although I personally haven't tried this yet, so can't say anything on the size of the exported blockchain file (and whether it includes states).

Is there a feature request for database trimming/ purging historical states on a live geth instance?

disk always full, only with fast sync, it is over 40G in one day. is the data really big, or the sync will increase additional data ?

So, as I understand, there isn't any nice solution for now when using geth. When geth node is synced - it imports new blocks with historical (archive) states and the size of db will grow very fast and storage will get trashed quite fast. So, there are 2 solutions which I have found:

  1. When you are getting out of storage you can run geth removedb and start to sync node again. (not very usable);
  2. Use Parity node for syncing blockchain. When node will be synced it will import new blocks in the same size as while it was syncing depending on arguments you will pass to parity.

Here is a link which describes possible arguments and estimated storage amount it will take while syncing:
https://ethereum.stackexchange.com/questions/28541/current-disk-space-requirements-for-a-pruned-parity-node/31195#31195

You can choose any :)
I'm using parity --tracing on --fat-db on.
Also, if you need to interact with blockchain use geth attach or any other framework (Truffle e. g.).

I wanted to raise this issue again as I mistakenly ran geth without the --gcmode flag set to full.

Whenever I start geth the client exits with the error "No space left on device".

Are there any options for me other than syncing again from the beginning?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

keitaj picture keitaj  路  3Comments

phpsamsb picture phpsamsb  路  3Comments

AdrianScott picture AdrianScott  路  3Comments

362228416 picture 362228416  路  3Comments

VenusHu picture VenusHu  路  3Comments