Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: opentmpfiles-setup won'tt start caused by postgresql (Read 125 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

opentmpfiles-setup won'tt start caused by postgresql

i have migrated 2 notebooks from archlinux to artix. On both opentmpfiles-setup failed to start because of postgresql:

Code: [Select]
$ sudo rc-service opentmpfiles-setup start
 * Setting up tmpfiles.d entries ...
chattr: Die Operation wird nicht unterst├╝tzt beim Setzen der Flags in /var/lib/postgres/data                                             [ !! ]
 * ERROR: opentmpfiles-setup failed to start

My first thaught to remove unneeded postgresql is only suitable on the 2 notebooks, but i want to migrate a server running davical and other services too. Davical needs postgresql.
So i followed this thread and changed the shell of user postgres to /bin/bash and ran initdb. On 1 notebook both opentmpfiles-setup as well as postgresql are starting fine now, on the other only postgresql starts. opentmpfiles-setup fails with the same error.

/var/lib/postgres is owned by root, mode 755. /var/lib/postgres/data and files in this dir are owned by postgres, mode 700 on both.

what can cause this different behaviour?

Re: opentmpfiles-setup won'tt start caused by postgresql

Reply #1
there is an open issue at github describing a similat error: https://github.com/OpenRC/opentmpfiles/issues/2

i used the solution of LW-archlinux from 2 May 2017:
Quote
$ less /usr/lib/tmpfiles.d/postgresql.conf
d /var/lib/postgres/data 700 postgres postgres
h /var/lib/postgres/data -   -        -        - +C

# mkdir /etc/tmpfiles.d
# cp /usr/lib/tmpfiles.d/postgresql.conf /etc/tmpfiles.d/

# nano /etc/tmpfiles.d/postgresql.conf
d /var/lib/postgres/data 700 postgres postgres
# h /var/lib/postgres/data -   -        -        - +C
# 20200225 prevent chattr-error

After reboot opentmpfiles-setup has started correctly in runlevel boot.
I don't know, if this an appropriate solution. So i don't mark this thread as solved, as long as nobody has reviewed.

Edit 19.03.2020: postgresql and davical are running without any problems since editing /etc/tmpfiles.d/postgresql.conf -> i'll mark topic as solved