Обсуждение: [Q] createdb for existing directory

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

[Q] createdb for existing directory

От
"Roderick A. Anderson"
Дата:
Typically when I want to place a database on a different partition I
create it then copy all the stuff from the new databases directory(s) to
the new partition followed by a mount.  I check things out and then
unmount the partition remove all the stuff in the database directories,
remount, and then update /etc/fstab for the system.

   Seems to work but it is a kludgy method to do it.  What I'd like to do
is mount the partition before doing a createdb.

Will this work with 7.1?  (I'm writing up some instructions that I'd like
to not have to change later.)


TIA,
Rod
--
Roderick A. Anderson
raanders@altoplanos.net               Altoplanos Information Systems, Inc.
Voice: 208.765.6149                            212 S. 11th Street, Suite 5
FAX: 208.664.5299                                  Coeur d'Alene, ID 83814


Re: [Q] createdb for existing directory

От
Alfred Perlstein
Дата:
* Roderick A. Anderson <raanders@altoplanos.net> [001016 11:38] wrote:
> Typically when I want to place a database on a different partition I
> create it then copy all the stuff from the new databases directory(s) to
> the new partition followed by a mount.  I check things out and then
> unmount the partition remove all the stuff in the database directories,
> remount, and then update /etc/fstab for the system.
>
>    Seems to work but it is a kludgy method to do it.  What I'd like to do
> is mount the partition before doing a createdb.
>
> Will this work with 7.1?  (I'm writing up some instructions that I'd like
> to not have to change later.)

huh?  How are you copying to an unmounted partition?

Afaik you need the device node to be mounted before you can write to
it.

--
-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
"I have the heart of a child; I keep it in a jar on my desk."

Re: [Q] createdb for existing directory

От
"Roderick A. Anderson"
Дата:
On Mon, 16 Oct 2000, Alfred Perlstein wrote:

> huh?  How are you copying to an unmounted partition?

Sorry I left that step out of the description.  I usually mount it to some
dumy point long enough to copy the files then unmount it and mount it to
the database directory.


Rod
--
Roderick A. Anderson
raanders@altoplanos.net               Altoplanos Information Systems, Inc.
Voice: 208.765.6149                            212 S. 11th Street, Suite 5
FAX: 208.664.5299                                  Coeur d'Alene, ID 83814


Re: [Q] createdb for existing directory

От
Alfred Perlstein
Дата:
* Roderick A. Anderson <raanders@altoplanos.net> [001016 12:32] wrote:
> On Mon, 16 Oct 2000, Alfred Perlstein wrote:
>
> > huh?  How are you copying to an unmounted partition?
>
> Sorry I left that step out of the description.  I usually mount it to some
> dumy point long enough to copy the files then unmount it and mount it to
> the database directory.

You could use a symlink and just keep using a different mountpoint.

postgresql should follow a symlink for the -D datadir option.

--
-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
"I have the heart of a child; I keep it in a jar on my desk."