Skip to content

Issue with lost+found dir and mounting parent folder (/var/lib/postgres) as volume #952

Closed
@Torkolis

Description

@Torkolis

According to this: https://www.postgresql.org/message-id/12168.1312921709%40sss.pgh.pa.us
it is not possible to mount "data" dir directly as for example longhorn volume in kubernetes so I should mount the parent folder, but according to
https://github.com/docker-library/postgres/blob/master/14/alpine/Dockerfile
line 155 VOLUME /var/lib/postgresql/data
it does not work to mount it, because then it only contains an empty "data" folder (next to the lost+found one) and the actuall database is then mounted separately into an anonymous volume and therefore lost on container restart.
So what is the solution?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions