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

Docker volume mount bug #579

Closed
heamaral opened this issue May 12, 2019 · 2 comments
Closed

Docker volume mount bug #579

heamaral opened this issue May 12, 2019 · 2 comments
Labels
question Usability question, not directly related to an error with the image

Comments

@heamaral
Copy link

heamaral commented May 12, 2019

#560 This is not environment issue and should be fixed asap.
We cannot run any database containers if some file flags are not replicated to mount destinations.

I hit the same issue running postgres container. When postgres tries to fsync files to mounted volume, it shows some errors:

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 /var/lib/postgresql/data/pgdata ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
initdb: could not fsync file "/var/lib/postgresql/data/pgdata/base/1": Invalid argument
initdb: could not fsync file "/var/lib/postgresql/data/pgdata/base/12406": Invalid argument
initdb: could not fsync file "/var/lib/postgresql/data/pgdata/base/12407": Invalid argument
initdb: could not fsync file "/var/lib/postgresql/data/pgdata/base": Invalid argument
initdb: could not fsync file "/var/lib/postgresql/data/pgdata/global": Invalid argument
initdb: could not fsync file "/var/lib/postgresql/data/pgdata/pg_clog": Invalid argument
initdb: could not fsync file "/var/lib/postgresql/data/pgdata/pg_commit_ts": Invalid argument
initdb: could not fsync file "/var/lib/postgresql/data/pgdata/pg_dynshmem": Invalid argument
initdb: could not fsync file "/var/lib/postgresql/data/pgdata/pg_logical/mappings": Invalid argument
initdb: could not fsync file "/var/lib/postgresql/data/pgdata/pg_logical/snapshots": Invalid argument
initdb: could not fsync file "/var/lib/postgresql/data/pgdata/pg_logical": Invalid argument
initdb: could not fsync file "/var/lib/postgresql/data/pgdata/pg_multixact/members": Invalid argument
initdb: could not fsync file "/var/lib/postgresql/data/pgdata/pg_multixact/offsets": Invalid argument
initdb: could not fsync file "/var/lib/postgresql/data/pgdata/pg_multixact": Invalid argument
initdb: could not fsync file "/var/lib/postgresql/data/pgdata/pg_notify": Invalid argument
initdb: could not fsync file "/var/lib/postgresql/data/pgdata/pg_replslot": Invalid argument
initdb: could not fsync file "/var/lib/postgresql/data/pgdata/pg_serial": Invalid argument
initdb: could not fsync file "/var/lib/postgresql/data/pgdata/pg_snapshots": Invalid argument
initdb: could not fsync file "/var/lib/postgresql/data/pgdata/pg_stat": Invalid argument
initdb: could not fsync file "/var/lib/postgresql/data/pgdata/pg_stat_tmp": Invalid argument
initdb: could not fsync file "/var/lib/postgresql/data/pgdata/pg_subtrans": Invalid argument
initdb: could not fsync file "/var/lib/postgresql/data/pgdata/pg_tblspc": Invalid argument
initdb: could not fsync file "/var/lib/postgresql/data/pgdata/pg_twophase": Invalid argument
initdb: could not fsync file "/var/lib/postgresql/data/pgdata/pg_xlog/archive_status": Invalid argument
initdb: could not fsync file "/var/lib/postgresql/data/pgdata/pg_xlog": Invalid argument
initdb: could not fsync file "/var/lib/postgresql/data/pgdata": Invalid argument
initdb: could not fsync file "/var/lib/postgresql/data/pgdata/pg_tblspc": Invalid argument
WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
syncing data to disk ... ok
Success. You can now start the database server using:
pg_ctl -D /var/lib/postgresql/data/pgdata -l logfile start
waiting for server to start....FATAL: data directory "/var/lib/postgresql/data/pgdata" has wrong ownership
HINT: The server must be started by the user that owns the data directory.
pg_ctl: could not start server
Examine the log output.
stopped waiting
@wglambert wglambert added the question Usability question, not directly related to an error with the image label May 13, 2019
@wglambert
Copy link

This issue isn't really in our realm, you'd want to find the relevant Docker/Moby issues for more information on the specifics and support status of your environment. These repos are for the Official-Images, not Docker itself.
Your error is different from the one you're linking to: could not fsync file . . . Invalid argument compared to Permission denied

You haven't given any information as to your setup/environment so there isn't really anything I can link you to other than a couple results for your fsync error https://forums.docker.com/t/trying-to-get-postgres-to-work-on-persistent-windows-mount-two-issues/12456/2
cytopia/devilbox#187 (comment)

@tianon
Copy link
Member

tianon commented May 13, 2019

Yeah, what we meant in that previous thread is that it is not something we can fix in the image, which is why we closed the issue that's filed on this image. This is something that needs to be fixed in Docker, Linux, Hyper-V, PostgreSQL, or some combination of the aforementioned.

@tianon tianon closed this as completed May 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Usability question, not directly related to an error with the image
Projects
None yet
Development

No branches or pull requests

3 participants