NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

So I ran the Nominatim setup script to import planet data into postgres with the following command:

./utils/setup.php --osm-file /postgres/OpenStreetMaps/planetfile/planet-latest.osm.pbf --all --osm2pgsql-cache 18000

And after several hours, the script failed with the following error message:

Processing: Node(2027272k 226.0k/s) Way(197726k 11.57k/s) Relation(0 0.00/s)COPY_END for COPY planet_osm_ways FROM STDIN;
 failed: ERROR:  could not extend file "base/18495/21039.22": wrote only 4096 of 8192 bytes at block 2954348
HINT:  Check free disk space.
CONTEXT:  COPY planet_osm_ways, line 156111299: "192204006      {2027680220,2027680175,2027680161,2027680104,2027680021,2027679996,2027679945,2027679899,2..."

Error occurred, cleaning up
osm2pgsql SVN version 0.81.0 (64bit id space)

ERROR: Error executing external command: /postgres/OpenStreetMaps/Nominatim-2.0.1/osm2pgsql/osm2pgsql -lsc -O gazetteer --hstore -C 18000 -d nominatim /postgres/OpenStreetMaps/planetfile/planet-latest.osm.pbf
Error executing external command: /postgres/OpenStreetMaps/Nominatim-2.0.1/osm2pgsql/osm2pgsql -lsc -O gazetteer --hstore -C 18000 -d nominatim /postgres/OpenStreetMaps/planetfile/planet-latest.osm.pbf

I'm not sure what's going on.. something about "free disk space"? I'm working on a machine with several TB of disk space. Any help would be appreciated, thanks!

asked 01 Oct '13, 19:24

baekacaek's gravatar image

baekacaek
176121317
accept rate: 0%


Your disk might be partitioned. Make sure that you actually have ~ 700 GB of disk space available at the location where your postgresql tries to save the data to. In a standard Ubuntu setup that would be /var/lib/postgresql, so you'd want to type

df /var/lib/postgresql

and check that the numbers in the "Available" column is larger than 700 million.

permanent link

answered 01 Oct '13, 20:23

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

2

Thanks! apparently the postgres directory only had ~60GB of space.

(01 Oct '13, 22:09) baekacaek

I have the same problem, the mount /var/lib/postgresql has only the capacity of 10 Gb and I dont have the admin rights to increase the size. But i have an another mount where IT has over 2TB of diskspace. How do I change the configuration of postgresql to use a different mount?

permanent link

answered 07 Dec '13, 20:53

Ironknight's gravatar image

Ironknight
10112
accept rate: 0%

you ought to be able to add a new tablespace using CREATE TABLESPACE bla LOCATION mount-point. The directory needs to have +x persmission for the owner of the postgres database, usually postgres. You can then make the new tablespace the default tablespace for the database or explicitly allocate tables to that tablespace.

(08 Dec '13, 10:25) SK53 ♦

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×689
×263

question asked: 01 Oct '13, 19:24

question was seen: 13,051 times

last updated: 08 Dec '13, 10:25

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum