Code Monkey home page Code Monkey logo

Comments (3)

Istador avatar Istador commented on June 2, 2024

docker run -d --shm-size="10G" -e DOWNLOAD_PBF=https://planet.openstreetmap.org/pbf/planet-latest.osm.pbf -e PGPASSWORD=${PGPASSWORD} -e "OSM2PGSQL_EXTRA_ARGS=-C 40096" -e "FLAT_NODES=enabled" -v /osm-data:/data/database/ -v osm-tiles:/data/tiles/ tileserver import

NOT an explanation for the error, but -v osm-tiles:/data/tiles/ should be -v /osm-tiles:/data/tiles/ instead, if you want it saving to the extra partition that you created and that is mounted to /osm-tiles. Otherwise it saves to /var/lib/docker/volumes/....

(Unless you created the osm-tiles named volume manually with providing a mount point, but because you didn't seem to do that for /osm-data I assume you made a mistake here.)


Interestingly it says:

No space left on device: '/data/style/data'

/data/style/data is not part of the mounted volumes for /data/database/ or /data/tiles/ and is therefore part of the containers internal storage.

So the issue seems to be related to the root partition oar_ubuntu-root that holds the containers (/var/lib/docker/containers/...). Seemingly it doesn't have enough space to hold some temporary files downloaded in a later stage of the import (the main import of the planet.osm is already done).

Note: the ~75 GB planet-latest.osm.pbf was also downloaded into the container to /data/region.osm.pbf and resides on the root partition.

Note: you don't execute docker run with the --rm parameter, so it doesn't automatically delete containers and their internal storage automatically, so you need to do that manually.


An improvement to this image to prevent this error would be to add the following code to the run.sh after the osm2pgsql step of the import to clean up the temporarily downloaded files after the main import step:

# clean up downloaded files
if [ -n "${DOWNLOAD_PBF:-}" ]; then
    rm /data/region.osm.pbf
    if [ -n "${DOWNLOAD_POLY:-}" ]; then
        rm /data/region.poly
    fi
fi

from openstreetmap-tile-server.

Shadow-shadown avatar Shadow-shadown commented on June 2, 2024

Is there anyway that I can mount it to a volume or the temporary remove commands on top will be a better solution ..?

from openstreetmap-tile-server.

Istador avatar Istador commented on June 2, 2024

You could download the file before and then mount it as described in the readme.

    -v /absolute/path/to/luxembourg.osm.pbf:/data/region.osm.pbf \

Otherwise you'd need to modify the run.sh yourself and build a new image.

I created PR #420 to fix this, but I don't believe it will be merged anytime soon. The last update to this project was 10 months ago.

from openstreetmap-tile-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.