NFS mount for data directory of postgresql 9.5 container

Open
#213 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
docker, postgresql

Research direction

Start with the PostgreSQL 9.5 environment variables and volumes documentation linked in the issue, then inspect the supplied Docker command, NFS export settings, and setfacl failure. Reproduce the mount and permission behavior with the stated image. Done means documenting a supported configuration or confirming the limitation and its required workaround.

Written by the indexing model from the issue text.

Description

Trying to share NFS mount from host machine, as data directory to postgresql 9.5 container

run command:

docker run -d  --name postgres -v /srv/db2/cccp/:/var/lib/pgsql/data -p 5432:5432 -e "POSTGRESQL_USER=cccp" -e "POSTGRESQL_PASSWORD=cccp" -e "POSTGRESQL_DATABASE=cccp" registry.centos.org/sclo/postgresql-95-centos7

here /srv/db2/cccp/ is NFS share mounted on the host system.

NFS server exports a directory with config
/nfsshare *(rw,sync,no_subtree_check,all_squash,anonuid=0,anongid=0)

the docs mentions using setfacl command to work around with postgresql container dir ownership behavior, however while running setfacl command as mentioned, it prompts Operation Not Permitted.

[root@client ~]# setfacl -m u:26:-wx /srv/db2/cccp/
setfacl: /srv/db2/cccp/: Operation not supported

Note: Changing NFS server config to have uid=26 works for postgresql container, however, how does one manage UID/GID consistency all over the place then?

Dominant language
PLpgSQL
Stars
178
Forks
220
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sclorg/postgresql-container

All issues in sclorg/postgresql-container

Similar issues

More Databases issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.