Обсуждение: initdb, separate fileystem?

Поиск
Список
Период
Сортировка

initdb, separate fileystem?

От
Neil Conway
Дата:
Hi all, (Cc: me on responses please)

I've got Postgres (v7.1.2) installed on HPUX 11.11. My Postgres install
is in /opt/pgsql. I'd like to setup the data directory to be
/pgsql-data. Because this directory is a mount of a separate filesystem,
HPUX has created a "lost+found" directory in it. When I run "initdb -D
/pgsql-data", I get:

-----
This database system will be initialized with username "postgres".
This user will own all the data files and must also own the server
process.

initdb: The directory /pgsql-data exists but is not empty.
If you want to create a new database system, either remove or empty
the directory /pgsql-data or run initdb with
an argument other than /pgsql-data.
-----

The only content of /pgsql-data is the "lost+found" directory (which is
empty).

Is this a bug? Other than making the data directory somewhere else, how
can I get this to work? It seems like Postgres should, _at least_, let
me override it's (paranoid) behavior.

Thanks in advance,

Neil

P.S. As I mentioned before, please Cc: me on responses. I'd use the
archives, but they seem to be at least partially broken: you can't
search them, for one thing. Is this a known issue?

--
Neil Conway <neilconway@rogers.com>
PGP Key ID: DB3C29FC


Re: initdb, separate fileystem?

От
Tom Lane
Дата:
Neil Conway <nconway@klamath.dyndns.org> writes:
> I've got Postgres (v7.1.2) installed on HPUX 11.11. My Postgres install
> is in /opt/pgsql. I'd like to setup the data directory to be
> /pgsql-data. Because this directory is a mount of a separate filesystem,
> HPUX has created a "lost+found" directory in it. When I run "initdb -D
> /pgsql-data", I get: [ a complaint ]

Make a subdirectory /pgsql-data/data, and point initdb at that.

> Is this a bug?

I don't think so.  initdb should be paranoid about overwriting valid
data, and I don't really see that it's worth making a special case for
lost+found, when the one-more-subdirectory answer is so easy.

            regards, tom lane