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

Cannot open files in csi mounted volume. #64

Open
blmhemu opened this issue Jun 10, 2022 · 1 comment
Open

Cannot open files in csi mounted volume. #64

blmhemu opened this issue Jun 10, 2022 · 1 comment

Comments

@blmhemu
Copy link

blmhemu commented Jun 10, 2022

Background:
Followed the deploy/nomad and got the csi up and running.
But when trying to run a postgres docker instance, by using a csi volume, I am getting the following error:

2022-06-12 14:36:10.686 UTC [39] LOG:  could not open file "pg_wal/000000010000000000000001": No such file or directory
2022-06-12 14:36:10.687 UTC [39] FATAL:  could not open file "pg_wal/000000010000000000000001": No such file or directory
child process exited with exit code 1

Here is the nomad volume

id        = "postgres"
name      = "postgres"
type      = "csi"
plugin_id = "seaweedfs"

capacity_min = "20GiB"
capacity_max = "20GiB"

capability {
  access_mode     = "multi-node-multi-writer"
  attachment_mode = "file-system"
}

# Optional: for 'nomad volume create', specify mount options to validate for
# 'attachment_mode = "file-system". Registering an existing volume will record
# but ignore these fields.
mount_options {
  mount_flags = ["rw"]
}

parameters {
  # Available options: https://github.com/seaweedfs/seaweedfs-csi-driver/blob/master/pkg/driver/mounter_seaweedfs.go
  collection = "postgres"
  replication = "000"
  path = "/buckets/postgres"
}

In the filer, I could see the folder pg_wal (and disappears later as postgres fails to initialize and cleans-up the data)

As a side note, I tested the volume with other docker container and was able to create and read files. So something specific to postgres or databases in general ?

@blmhemu blmhemu changed the title Postgres giving error when using csi. Cannot write files to csi mounted volume. Jun 10, 2022
@blmhemu blmhemu closed this as completed Jun 11, 2022
@blmhemu blmhemu reopened this Jun 12, 2022
@blmhemu
Copy link
Author

blmhemu commented Jun 13, 2022

Feels it might have to do something with fsync
Ref: Parallels/docker-machine-parallels#71

@blmhemu blmhemu changed the title Cannot write files to csi mounted volume. Cannot open files in csi mounted volume. Jun 13, 2022
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