> David Noel <david.i.noel@gmail.com> writes: >> /zdb is a zfs volume I've created for cvs and postgres. > > zfs eh? What happens if you point initdb at a non-zfs volume? > > (I"m wondering if zfs has issues with the O_DIRECT flag that we'll > probably try to use with pg_xlog files.)
I /boot off of a UFS volume so I created a directory there, chown and chmod'ed it, then ran initdb again. Same error, unfortunately.
David
Did you use ports to install postgresql? What is the version of postgresql and freebsd you are using? I am getting a different output while running the initdb command through the rc script, and it's not using the -D path to initialize the cluster, it falls back to the default location /usr/local/pgsql/data . Setting postgresql_data="/usr/local/pgsql1/data" in /etc/rc.conf makes it initialize at the right location . I did not had to mess with an permissions and the rc commands were all run as root. The above was tested on FreeBSD 9.1 with Postgresql 9.2 on UFS.
On FreeBSD 8.1 with Postgresql 9.1 on UFS installed though ports, it was the same story, except that I had to change ownership to user pgsql for the /usr/local/pgsql1 directory