How to configure Komodo Deployments Volumes as absolute or relative paths? #427

Closed
opened 2025-10-31 15:11:38 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @aaro-n on GitHub (Jun 15, 2025).

Problem description

Using komodo's Deployments to deploy the paradedb image, I need to map the /var/lib/postgresql/data in the container to the /home/www/komodo-data/data/postgresql on the host. In the Volumes item, I configure /home/www/komodo-data/data/postgresql:/var/lib/postgresql/data. The /home/www/komodo-data/data/postgresql folder will be created by itself, but the container cannot run.
How to configure postgresql:/var/lib/postgresql/data to run normally, but I need to map the data to an absolute path.

Log

www@debian:~/komodo-data/data$ date
2025年 06月 16日 星期一 07:12:22 CST
www@debian:~/komodo-data/data$ ls
www@debian:~/komodo-data/data$ pwd
/home/www/komodo-data/data
www@debian:~/komodo-data/data$ ls
postgresql
www@debian:~/komodo-data/data$ ls -al
总计 12
drwxr-xr-x 3 www  www  4096  6月16日 07:12 .
drwxr-xr-x 3 www  www  4096  6月16日 06:36 ..
drwxr-xr-x 2 root root 4096  6月16日 07:12 postgresql
initdb: error: could not change permissions of directory "/var/lib/postgresql/data": Operation not permitted
chmod: changing permissions of '/var/lib/postgresql/data': Operation not permitted
initdb: error: could not change permissions of directory "/var/lib/postgresql/data": Operation not permitted
chmod: changing permissions of '/var/lib/postgresql/data': Operation not permitted
initdb: error: could not change permissions of directory "/var/lib/postgresql/data": Operation not permitted
chmod: changing permissions of '/var/lib/postgresql/data': Operation not permitted
initdb: error: could not change permissions of directory "/var/lib/postgresql/data": Operation not permitted
chmod: changing permissions of '/var/lib/postgresql/data': Operation not permitted
initdb: error: could not change permissions of directory "/var/lib/postgresql/data": Operation not permitted
chmod: changing permissions of '/var/lib/postgresql/data': Operation not permitted
initdb: error: could not change permissions of directory "/var/lib/postgresql/data": Operation not permitted
chmod: changing permissions of '/var/lib/postgresql/data': Operation not permitted
initdb: error: could not change permissions of directory "/var/lib/postgresql/data": Operation not permitted
chmod: changing permissions of '/var/lib/postgresql/data': Operation not permitted
initdb: error: could not change permissions of directory "/var/lib/postgresql/data": Operation not permitted
chmod: changing permissions of '/var/lib/postgresql/data': Operation not permitted
initdb: error: could not change permissions of directory "/var/lib/postgresql/data": Operation not permitted
Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/data ... 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 ... 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 ... 

Image

Image

End

Komodo 1.18.1 komodo-periphery latest version, I have checked the documentation and searched for the problem, but no solution was found, or the keywords I searched were wrong?

Originally created by @aaro-n on GitHub (Jun 15, 2025). # Problem description Using komodo's Deployments to deploy the paradedb image, I need to map the `/var/lib/postgresql/data` in the container to the `/home/www/komodo-data/data/postgresql` on the host. In the Volumes item, I configure `/home/www/komodo-data/data/postgresql:/var/lib/postgresql/data`. The `/home/www/komodo-data/data/postgresql` folder will be created by itself, but the container cannot run. How to configure `postgresql:/var/lib/postgresql/data` to run normally, but I need to map the data to an absolute path. # Log ``` www@debian:~/komodo-data/data$ date 2025年 06月 16日 星期一 07:12:22 CST www@debian:~/komodo-data/data$ ls www@debian:~/komodo-data/data$ pwd /home/www/komodo-data/data www@debian:~/komodo-data/data$ ls postgresql www@debian:~/komodo-data/data$ ls -al 总计 12 drwxr-xr-x 3 www www 4096 6月16日 07:12 . drwxr-xr-x 3 www www 4096 6月16日 06:36 .. drwxr-xr-x 2 root root 4096 6月16日 07:12 postgresql ``` ``` initdb: error: could not change permissions of directory "/var/lib/postgresql/data": Operation not permitted chmod: changing permissions of '/var/lib/postgresql/data': Operation not permitted initdb: error: could not change permissions of directory "/var/lib/postgresql/data": Operation not permitted chmod: changing permissions of '/var/lib/postgresql/data': Operation not permitted initdb: error: could not change permissions of directory "/var/lib/postgresql/data": Operation not permitted chmod: changing permissions of '/var/lib/postgresql/data': Operation not permitted initdb: error: could not change permissions of directory "/var/lib/postgresql/data": Operation not permitted chmod: changing permissions of '/var/lib/postgresql/data': Operation not permitted initdb: error: could not change permissions of directory "/var/lib/postgresql/data": Operation not permitted chmod: changing permissions of '/var/lib/postgresql/data': Operation not permitted initdb: error: could not change permissions of directory "/var/lib/postgresql/data": Operation not permitted chmod: changing permissions of '/var/lib/postgresql/data': Operation not permitted initdb: error: could not change permissions of directory "/var/lib/postgresql/data": Operation not permitted chmod: changing permissions of '/var/lib/postgresql/data': Operation not permitted initdb: error: could not change permissions of directory "/var/lib/postgresql/data": Operation not permitted chmod: changing permissions of '/var/lib/postgresql/data': Operation not permitted initdb: error: could not change permissions of directory "/var/lib/postgresql/data": Operation not permitted ``` ``` Data page checksums are disabled. fixing permissions on existing directory /var/lib/postgresql/data ... 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 ... 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 ... ``` ![Image](https://github.com/user-attachments/assets/9f4226f6-90c3-4744-a9e7-d4190611d4bb) ![Image](https://github.com/user-attachments/assets/f01625df-09f9-4bbd-ad91-4945789aa61d) # End Komodo 1.18.1 komodo-periphery latest version, I have checked the documentation and searched for the problem, but no solution was found, or the keywords I searched were wrong?
Author
Owner

@mbecker20 commented on GitHub (Aug 28, 2025):

The absolute mount is correct, however if you run Periphery in container, Periphery also needs to be given 1:1 mount inside and outside container in order to work correctly, like is documented for PERIPHERY_ROOT_DIRECTORY. If you can switch to systemd Periphery, it would also fix the issue.

@mbecker20 commented on GitHub (Aug 28, 2025): The absolute mount is correct, however if you run Periphery in container, Periphery also needs to be given 1:1 mount inside and outside container in order to work correctly, like is documented for PERIPHERY_ROOT_DIRECTORY. If you can switch to systemd Periphery, it would also fix the issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/komodo#427
No description provided.