Jump to content

Postgres and filesystem rights


Daxten

Recommended Posts

Hi,

I have a problem running the official postgres docker image with PGDATA set.

 

/usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -it --name="Postgres" --net="bridge" --privileged="true" -e POSTGRES_PASSWORD="pw" -e PGDATA="/data" -e TZ="America/Los_Angeles" -p 5432:5432/tcp -v "/mnt/user/appdata/pgdata/":"/data":rw postgres:9.4

 

Output:

root@Appserver:~# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -it --name="Postgres" --net="bridge" --privileged="true" -e POSTGRES_PASSWORD="pw" -e PGDATA="/data" -e TZ="America/Los_Angeles" -p 5432:5432/tcp -v "/mnt/user/appdata/pgdata/":"/data":rw postgres:9.4

The files belonging to this database system will be owned by user "postgres".

This user must also own the server process.

 

The database cluster will be initialized with locale "en_US.utf8".

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.

 

fixing permissions on existing directory /data ... ok

creating subdirectories ... ok

selecting default max_connections ... 100

selecting default shared_buffers ... 128MB

selecting dynamic shared memory implementation ... posix

creating configuration files ... ok

creating template1 database in /data/base/1 ... LOG:  could not link file "pg_xlog/xlogtemp.23" to "pg_xlog/000000010000000000000001": Function not implemented

FATAL:  could not open file "pg_xlog/000000010000000000000001": No such file or directory

child process exited with exit code 1

initdb: removing contents of data directory "/data"

 

Someone can help me with this? It's working without PGDATA, but that's not an option for me since I need persistence storage ;) tested it with 9.4 and latest, both are not working

Link to comment

I get the same problem as u ! Couldn't figure out if that's the security context for docker to work on "/data"

 

Since I create the folder, once I attempt to start docker Postgres the folder will be locked. Until being unlock by "chmod 777 /folder/"

 

But anyway, I couldn't start the persistence storage here, help wanted

 

 

Sent from my iPhone using Tapatalk

Link to comment
  • 1 month later...
  • 1 month later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...