Thread: Newbie [CentOS 5.2] service postgresql initdb
While going through http://wiki.postgresql.org/wiki/Detailed_installation_guides and typing service postgresql start as root I got "/var/lib/pgsql/data is missing. Use "service postgresql initdb" to initialize the cluster first." When I run service postgresql initdb I get "se: [FAILED]". However, /var/lib/pqsql/data is created and user postgres owns it. But then I run service postgresql start and the very same error occurs.. Daneel
Daneel <dan@dan.dan> writes: > When I run > service postgresql initdb > I get > "se: [FAILED]". > However, /var/lib/pqsql/data is created and user postgres owns it. Is there anything in /var/lib/pgsql/pgstartup.log ? How about the main /var/log/messages file? regards, tom lane
Daneel escribió: > While going through > http://wiki.postgresql.org/wiki/Detailed_installation_guides > and typing > service postgresql start > as root I got > "/var/lib/pgsql/data is missing. Use "service postgresql initdb" to > initialize the cluster first." > > When I run > service postgresql initdb > I get > "se: [FAILED]". > However, /var/lib/pqsql/data is created and user postgres owns it. > > But then I run > service postgresql start > and the very same error occurs.. As root: # mv /var/lib/pqsql/data /var/lib/pqsql/data.old # service postgresql initdb # service postgresql start See what /var/lib/pqsql/data.old contains. Maybe an old DB Cluster?
On Tue, Aug 12, 2008 at 9:25 AM, Daneel <dan@dan.dan> wrote: > While going through > http://wiki.postgresql.org/wiki/Detailed_installation_guides > and typing > service postgresql start > as root I got > "/var/lib/pgsql/data is missing. Use "service postgresql initdb" to > initialize the cluster first." > > When I run > service postgresql initdb > I get > "se: [FAILED]". > However, /var/lib/pqsql/data is created and user postgres owns it. > > But then I run > service postgresql start > and the very same error occurs.. Is /var/lib/pgsql/data a sym link to some other drive? It's likely you're being bitten by SELinux. either disable it (google is your friend) or reconfigure it to allow postgres to access the other drive as a service.
PLEASE DON'T WRITE TO THIS LIST WITH A FAKE EMAIL ADDRESS. It's been discussed before, but it's rude and counterproductive. Just set up a filter / account that drops everything coming in, but don't stick the rest of us with your broken email behaviour On Tue, Aug 12, 2008 at 9:25 AM, Daneel <dan@dan.dan> wrote: > While going through > http://wiki.postgresql.org/wiki/Detailed_installation_guides > and typing > service postgresql start > as root I got > "/var/lib/pgsql/data is missing. Use "service postgresql initdb" to > initialize the cluster first." > > When I run > service postgresql initdb > I get > "se: [FAILED]". > However, /var/lib/pqsql/data is created and user postgres owns it. > > But then I run > service postgresql start > and the very same error occurs.. > > Daneel > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general >
Scott Marlowe wrote: > PLEASE DON'T WRITE TO THIS LIST WITH A FAKE EMAIL ADDRESS. > > It's been discussed before, but it's rude and counterproductive. Just > set up a filter / account that drops everything coming in, but don't > stick the rest of us with your broken email behaviour I'm sorry, just followed a guide setting up newsgroups. I've put it right. I also didn't see that it could cause any difficulties to others. Daneel > > On Tue, Aug 12, 2008 at 9:25 AM, Daneel <dan@dan.dan> wrote: >> While going through >> http://wiki.postgresql.org/wiki/Detailed_installation_guides >> and typing >> service postgresql start >> as root I got >> "/var/lib/pgsql/data is missing. Use "service postgresql initdb" to >> initialize the cluster first." >> >> When I run >> service postgresql initdb >> I get >> "se: [FAILED]". >> However, /var/lib/pqsql/data is created and user postgres owns it. >> >> But then I run >> service postgresql start >> and the very same error occurs.. >> >> Daneel >> >> -- >> Sent via pgsql-general mailing list (pgsql-general@postgresql.org) >> To make changes to your subscription: >> http://www.postgresql.org/mailpref/pgsql-general >> >
Scott Marlowe wrote: > On Tue, Aug 12, 2008 at 9:25 AM, Daneel <dan@dan.dan> wrote: >> While going through >> http://wiki.postgresql.org/wiki/Detailed_installation_guides >> and typing >> service postgresql start >> as root I got >> "/var/lib/pgsql/data is missing. Use "service postgresql initdb" to >> initialize the cluster first." >> >> When I run >> service postgresql initdb >> I get >> "se: [FAILED]". >> However, /var/lib/pqsql/data is created and user postgres owns it. >> >> But then I run >> service postgresql start >> and the very same error occurs.. > > Is /var/lib/pgsql/data a sym link to some other drive? No, it didn't. It's likely > you're being bitten by SELinux. either disable it (google is your > friend) or reconfigure it to allow postgres to access the other drive > as a service. > I going to learn more about SELinux later after I learn more Linux basics and get them in common for me. Thank you anyway Daneel
On Tue, 2008-08-12 at 17:25 +0200, Daneel wrote: > > When I run > service postgresql initdb > I get > "se: [FAILED]". > However, /var/lib/pqsql/data is created and user postgres owns it. > > But then I run > service postgresql start > and the very same error occurs.. Anything in /var/lib/pgsql/pgstartup.log file? -- Devrim GÜNDÜZ devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr http://www.gunduz.org