Daxten Posted April 13, 2016 Share Posted April 13, 2016 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
msgkit Posted April 21, 2016 Share Posted April 21, 2016 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
msgkit Posted April 21, 2016 Share Posted April 21, 2016 I have tired to put chcon -Rt svirt_sandbox_file_t /folder But no luck, returned : operation not supported Sent from my iPhone using Tapatalk Link to comment
Daxten Posted April 22, 2016 Author Share Posted April 22, 2016 I fixed it by running it on a cache-only share and using /mnt/cache/pgdata. But that's just a workaround Link to comment
Daxten Posted June 13, 2016 Author Share Posted June 13, 2016 bumping this up, since it isn't fixed yet and I have another filesystem problem in /mnt/user now and these may be related? http://lime-technology.com/forum/index.php?topic=49736.0 Link to comment
Xixix Posted July 29, 2016 Share Posted July 29, 2016 I had a share that exists only on my cache drive, but using that share in the path for the PGDATA did not work and had the exact same issues. Changing it to /mnt/cache/whatever worked. I don't like it, but it works. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.