Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permission denied "/data/database/postgres" on import with nfs mount volume #431

Open
StoneEngineer opened this issue Aug 27, 2024 · 0 comments

Comments

@StoneEngineer
Copy link

StoneEngineer commented Aug 27, 2024

Permission denied (/data/database/postgres) when using external PV (persistant volume) mount.
It works with Docker osm-data volume. Luxemburg is ok, but Europe is too big. Fills whole VM, then fails.

Docker Compose:

    volumes:
      # original Docker volume NOT USED because it will fill complete VM!
      # - osm-data:/data/database
      # PV mount
      - /mnt/nfs_pv_swarm/osm/data/database:/data/database
      - /mnt/nfs_pv_swarm/osm/data/tiles:/data/tiles
      - /mnt/nfs_pv_swarm/osm/data/style:/data/style
      # OSM Region Europe
      - /mnt/nfs_pv_swarm/osm/europe-latest.osm.pbf:/data/region.osm.pbf

Docker Swarm Container service log:

+ '[' import == import ']'
+ mkdir -p /data/database/postgres/
+ chown renderer: /data/database/
+ chown -R postgres: /var/lib/postgresql /data/database/postgres/
+ '[' '!' -f /data/database/postgres/PG_VERSION ']'
+ sudo -u postgres /usr/lib/postgresql/16/bin/pg_ctl -D /data/database/postgres/ initdb -o '--locale C.UTF-8'
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
initdb: error: could not access directory "/data/database/postgres": Permission denied
The database cluster will be initialized with locale "C.UTF-8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
pg_ctl: database system initialization failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant