From: Greg Spiegelberg <gspiegelberg@cranel.com>
To: Postgres Admin List <pgsql-admin@postgresql.org>
Subject: Moving Database Directory
Date: Thu, 13 Nov 2003 16:48:07 -0500
Message-ID: <3FB3FC17.7020602@cranel.com> (raw)
Hiya,
I have an interesting problem and haven't found an answer yet on
Google.
On systemA we have a LUN from our SAN mounted as /data and one instance
of 7.3.4 with many databases. Each database has it's own PGDATA
directory: /data/dbA1 for dbA1 database. /data/dbA2 for dbA2 and so on.
The default PGDATA for systemA, which pg_hba.conf, template0, etc lives
is /data/systemA.
Via Sistina GFS systemB has the same LUN mounted as /data, runs it's own
7.3.4 database with using /data/systemB for pg_hba.conf, template0, etc
and has databases dbB1 and dbB2 under /data/dbB1 and /data/dbB2
respectively.
This works. Sistina GFS manages block allocation and everything so the
systems don't see anything out of the ordinary.
Here's the curveball / question.
Is there a way to "deport" a database on systemA and "import" it on
systemB without having to do a pg_dump/pg_restore? Basically ask
the database on systemA to stop using dbA1 under /data/dbA1 then tell
systemB to use the database already at /data/dbA1.
I know I could take postgres down completely on systemA and start it
up on systemB but that would migrate all databases, I want to do only
one, and effectively cut my resources in half on systemB.
I figure the answer will be "no" due to OID number issues, but what say
you Admins?
While I'm here, anyone have experience with Sistina GFS? This is
completely theoretical right now and we're looking at Sistina GFS to
consolidate our storage and make better use of the space we have.
TIA,
Greg
--
Greg Spiegelberg
Sr. Product Development Engineer
Cranel, Incorporated.
Phone: 614.318.4314
Fax: 614.431.8388
Email: gspiegelberg@Cranel.com
Cranel. Technology. Integrity. Focus.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: gspiegelberg@cranel.com
Subject: Re: Moving Database Directory
In-Reply-To: <3FB3FC17.7020602@cranel.com>
References: <3FB3FC17.7020602@cranel.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox