Unix Technical Forum

SEO

vBulletin Search Engine Optimization


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Admins

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 08:09 AM
Campbell, Lance
 
Posts: n/a
Default Installing Postgres

OS: redhat linux

Version of PostgreSQL: 8.2.4



I had a group that now manages our server set up a directory/partition
for us to put postgreSQL into. The directory is called pgsql_data. The
directory is more than a regular directory. It contains a subdirectory
called "lost+found". I would assume this is a logical partition. I
tried installing postgreSQL directly into this directory but it failed
since there is a file in this directory, "lost+found". Is there a way
around this? Worst case scenario I will create a subdirectory called
data and put the install in there. I would have preferred to put it
directly into the pgsql_data. There would be no other files that would
have gone into the directory/partition other than postgreSQL. Would it
be possible for me to install postgreSQL into a sub directory of
pgsql_data and then move the files up a directory into pgsql_data?



Thanks,



Lance Campbell

Project Manager/Software Architect

Web Services at Public Affairs

University of Illinois

217.333.0382

http://webservices.uiuc.edu




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 08:09 AM
Joshua D. Drake
 
Posts: n/a
Default Re: Installing Postgres

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Campbell, Lance wrote:
> OS: redhat linux
>
> Version of PostgreSQL: 8.2.4
>
>
>
> I had a group that now manages our server set up a directory/partition
> for us to put postgreSQL into. The directory is called pgsql_data. The
> directory is more than a regular directory. It contains a subdirectory
> called "lost+found". I would assume this is a logical partition. I
> tried installing postgreSQL directly into this directory but it failed
> since there is a file in this directory, "lost+found". Is there a way
> around this? Worst case scenario I will create a subdirectory called
> data and put the install in there. I would have preferred to put it


It is probably an ownership issue. If this is linux the mount is
probably owned by root. Create a sub directory in pgsql_data that is
owned by postgres called pgsql and install it in there.

Sincerely,

Joshua D. Drake

> directly into the pgsql_data. There would be no other files that would
> have gone into the directory/partition other than postgreSQL. Would it
> be possible for me to install postgreSQL into a sub directory of
> pgsql_data and then move the files up a directory into pgsql_data?




>
>
>
> Thanks,
>
>
>
> Lance Campbell
>
> Project Manager/Software Architect
>
> Web Services at Public Affairs
>
> University of Illinois
>
> 217.333.0382
>
> http://webservices.uiuc.edu
>
>
>
>



- --

=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 24x7/Emergency: +1.800.492.2240
PostgreSQL solutions since 1997 http://www.commandprompt.com/
UNIQUE NOT NULL
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGzbpEATb/zqfZUUQRAjxKAJ43ucUbt5G5GmxzlqJ8tmHrOxfGfwCaAsj1
F4Rq/EaDnM7ZB691p2R+mAo=
=U+lm
-----END PGP SIGNATURE-----

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-10-2008, 08:09 AM
Campbell, Lance
 
Posts: n/a
Default Re: Installing Postgres

This is not an ownership issue. It does try to install PostgreSQL. It
complains because there is a file or directory in the directory where I
am installing PostgreSQL to. The same thing will happen if I create a
directory called XYZ and place a file or directory inside of XYZ and
then try to install the database.

Thanks,

Lance Campbell
Project Manager/Software Architect
Web Services at Public Affairs
University of Illinois
217.333.0382
http://webservices.uiuc.edu


-----Original Message-----
From: Joshua D. Drake [mailto:jd@commandprompt.com]
Sent: Thursday, August 23, 2007 11:48 AM
To: Campbell, Lance
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] Installing Postgres

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Campbell, Lance wrote:
> OS: redhat linux
>
> Version of PostgreSQL: 8.2.4
>
>
>
> I had a group that now manages our server set up a directory/partition
> for us to put postgreSQL into. The directory is called pgsql_data.

The
> directory is more than a regular directory. It contains a

subdirectory
> called "lost+found". I would assume this is a logical partition. I
> tried installing postgreSQL directly into this directory but it failed
> since there is a file in this directory, "lost+found". Is there a way
> around this? Worst case scenario I will create a subdirectory called
> data and put the install in there. I would have preferred to put it


It is probably an ownership issue. If this is linux the mount is
probably owned by root. Create a sub directory in pgsql_data that is
owned by postgres called pgsql and install it in there.

Sincerely,

Joshua D. Drake

> directly into the pgsql_data. There would be no other files that

would
> have gone into the directory/partition other than postgreSQL. Would

it
> be possible for me to install postgreSQL into a sub directory of
> pgsql_data and then move the files up a directory into pgsql_data?




>
>
>
> Thanks,
>
>
>
> Lance Campbell
>
> Project Manager/Software Architect
>
> Web Services at Public Affairs
>
> University of Illinois
>
> 217.333.0382
>
> http://webservices.uiuc.edu
>
>
>
>



- --

=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 24x7/Emergency: +1.800.492.2240
PostgreSQL solutions since 1997 http://www.commandprompt.com/
UNIQUE NOT NULL
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGzbpEATb/zqfZUUQRAjxKAJ43ucUbt5G5GmxzlqJ8tmHrOxfGfwCaAsj1
F4Rq/EaDnM7ZB691p2R+mAo=
=U+lm
-----END PGP SIGNATURE-----

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-10-2008, 08:09 AM
Joshua D. Drake
 
Posts: n/a
Default Re: Installing Postgres

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Campbell, Lance wrote:
> This is not an ownership issue. It does try to install PostgreSQL. It
> complains because there is a file or directory in the directory where I
> am installing PostgreSQL to. The same thing will happen if I create a
> directory called XYZ and place a file or directory inside of XYZ and
> then try to install the database.


*sigh*

How about an actual error message and the *exact* command you are typing.

Sincerely,

Joshua D. Drake

>
> Thanks,
>
> Lance Campbell
> Project Manager/Software Architect
> Web Services at Public Affairs
> University of Illinois
> 217.333.0382
> http://webservices.uiuc.edu
>
>
> -----Original Message-----
> From: Joshua D. Drake [mailto:jd@commandprompt.com]
> Sent: Thursday, August 23, 2007 11:48 AM
> To: Campbell, Lance
> Cc: pgsql-admin@postgresql.org
> Subject: Re: [ADMIN] Installing Postgres
>
> Campbell, Lance wrote:
>> OS: redhat linux

>
>> Version of PostgreSQL: 8.2.4

>
>
>
>> I had a group that now manages our server set up a directory/partition
>> for us to put postgreSQL into. The directory is called pgsql_data.

> The
>> directory is more than a regular directory. It contains a

> subdirectory
>> called "lost+found". I would assume this is a logical partition. I
>> tried installing postgreSQL directly into this directory but it failed
>> since there is a file in this directory, "lost+found". Is there a way
>> around this? Worst case scenario I will create a subdirectory called
>> data and put the install in there. I would have preferred to put it

>
> It is probably an ownership issue. If this is linux the mount is
> probably owned by root. Create a sub directory in pgsql_data that is
> owned by postgres called pgsql and install it in there.
>
> Sincerely,
>
> Joshua D. Drake
>
>> directly into the pgsql_data. There would be no other files that

> would
>> have gone into the directory/partition other than postgreSQL. Would

> it
>> be possible for me to install postgreSQL into a sub directory of
>> pgsql_data and then move the files up a directory into pgsql_data?

>
>
>
>
>
>> Thanks,

>
>
>
>> Lance Campbell

>
>> Project Manager/Software Architect

>
>> Web Services at Public Affairs

>
>> University of Illinois

>
>> 217.333.0382

>
>> http://webservices.uiuc.edu

>
>
>
>
>
>


- --

=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 24x7/Emergency: +1.800.492.2240
PostgreSQL solutions since 1997 http://www.commandprompt.com/
UNIQUE NOT NULL
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGzbzBATb/zqfZUUQRAr7DAJwJXFJr5Olz8Ebs2Ku08Sv9izXymACgqUOv
f/ZsOvjGr4rpHj7KjcSUzAI=
=Z3Iu
-----END PGP SIGNATURE-----

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-10-2008, 08:09 AM
Campbell, Lance
 
Posts: n/a
Default Re: Installing Postgres

Command I use to initialize the database with:

/usr/bin/initdb -D /abc/def/pgsql_data

Response:

The files belonging to this database system will be owned by user
"my_user".
This user must also own the server process.

The database cluster will be initialized with locale C.

initdb: directory "/abc/def/pgsql_data" exists but is not empty
If you want to create a new database system, either remove or empty
the directory "/abc/def/pgsql_data" or run initdb
with an argument other than "/abc/def/pgsql_data".



As I stated in my original email there is a subdirectory in:
"/abc/def/pgsql_data" called "lost+found".

Thanks,

Lance Campbell
Project Manager/Software Architect
Web Services at Public Affairs
University of Illinois
217.333.0382
http://webservices.uiuc.edu


-----Original Message-----
From: Joshua D. Drake [mailto:jd@commandprompt.com]
Sent: Thursday, August 23, 2007 11:59 AM
To: Campbell, Lance
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] Installing Postgres

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Campbell, Lance wrote:
> This is not an ownership issue. It does try to install PostgreSQL.

It
> complains because there is a file or directory in the directory where

I
> am installing PostgreSQL to. The same thing will happen if I create a
> directory called XYZ and place a file or directory inside of XYZ and
> then try to install the database.


*sigh*

How about an actual error message and the *exact* command you are
typing.

Sincerely,

Joshua D. Drake

>
> Thanks,
>
> Lance Campbell
> Project Manager/Software Architect
> Web Services at Public Affairs
> University of Illinois
> 217.333.0382
> http://webservices.uiuc.edu
>
>
> -----Original Message-----
> From: Joshua D. Drake [mailto:jd@commandprompt.com]
> Sent: Thursday, August 23, 2007 11:48 AM
> To: Campbell, Lance
> Cc: pgsql-admin@postgresql.org
> Subject: Re: [ADMIN] Installing Postgres
>
> Campbell, Lance wrote:
>> OS: redhat linux

>
>> Version of PostgreSQL: 8.2.4

>
>
>
>> I had a group that now manages our server set up a

directory/partition
>> for us to put postgreSQL into. The directory is called pgsql_data.

> The
>> directory is more than a regular directory. It contains a

> subdirectory
>> called "lost+found". I would assume this is a logical partition. I
>> tried installing postgreSQL directly into this directory but it

failed
>> since there is a file in this directory, "lost+found". Is there a

way
>> around this? Worst case scenario I will create a subdirectory called
>> data and put the install in there. I would have preferred to put it

>
> It is probably an ownership issue. If this is linux the mount is
> probably owned by root. Create a sub directory in pgsql_data that is
> owned by postgres called pgsql and install it in there.
>
> Sincerely,
>
> Joshua D. Drake
>
>> directly into the pgsql_data. There would be no other files that

> would
>> have gone into the directory/partition other than postgreSQL. Would

> it
>> be possible for me to install postgreSQL into a sub directory of
>> pgsql_data and then move the files up a directory into pgsql_data?

>
>
>
>
>
>> Thanks,

>
>
>
>> Lance Campbell

>
>> Project Manager/Software Architect

>
>> Web Services at Public Affairs

>
>> University of Illinois

>
>> 217.333.0382

>
>> http://webservices.uiuc.edu

>
>
>
>
>
>


- --

=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 24x7/Emergency: +1.800.492.2240
PostgreSQL solutions since 1997 http://www.commandprompt.com/
UNIQUE NOT NULL
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGzbzBATb/zqfZUUQRAr7DAJwJXFJr5Olz8Ebs2Ku08Sv9izXymACgqUOv
f/ZsOvjGr4rpHj7KjcSUzAI=
=Z3Iu
-----END PGP SIGNATURE-----

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-10-2008, 08:09 AM
Joshua D. Drake
 
Posts: n/a
Default Re: Installing Postgres

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Campbell, Lance wrote:
> Command I use to initialize the database with:
>
> /usr/bin/initdb -D /abc/def/pgsql_data
>
> Response:
>
> The files belonging to this database system will be owned by user
> "my_user".
> This user must also own the server process.
>
> The database cluster will be initialized with locale C.
>
> initdb: directory "/abc/def/pgsql_data" exists but is not empty
> If you want to create a new database system, either remove or empty
> the directory "/abc/def/pgsql_data" or run initdb
> with an argument other than "/abc/def/pgsql_data".
>
>
>
> As I stated in my original email there is a subdirectory in:
> "/abc/def/pgsql_data" called "lost+found".


My solution still applies:

mkdir pgsql_data/pgsql
chown -R postgres.postgres pgsql_data/pgsql
initdb -D pgsql_data/pgsql/data

Sincerely,

Joshua D. Drake


>
> Thanks,
>
> Lance Campbell
> Project Manager/Software Architect
> Web Services at Public Affairs
> University of Illinois
> 217.333.0382
> http://webservices.uiuc.edu
>
>
> -----Original Message-----
> From: Joshua D. Drake [mailto:jd@commandprompt.com]
> Sent: Thursday, August 23, 2007 11:59 AM
> To: Campbell, Lance
> Cc: pgsql-admin@postgresql.org
> Subject: Re: [ADMIN] Installing Postgres
>
> Campbell, Lance wrote:
>> This is not an ownership issue. It does try to install PostgreSQL.

> It
>> complains because there is a file or directory in the directory where

> I
>> am installing PostgreSQL to. The same thing will happen if I create a
>> directory called XYZ and place a file or directory inside of XYZ and
>> then try to install the database.

>
> *sigh*
>
> How about an actual error message and the *exact* command you are
> typing.
>
> Sincerely,
>
> Joshua D. Drake
>
>> Thanks,

>
>> Lance Campbell
>> Project Manager/Software Architect
>> Web Services at Public Affairs
>> University of Illinois
>> 217.333.0382
>> http://webservices.uiuc.edu

>
>
>> -----Original Message-----
>> From: Joshua D. Drake [mailto:jd@commandprompt.com]
>> Sent: Thursday, August 23, 2007 11:48 AM
>> To: Campbell, Lance
>> Cc: pgsql-admin@postgresql.org
>> Subject: Re: [ADMIN] Installing Postgres

>
>> Campbell, Lance wrote:
>>> OS: redhat linux
>>> Version of PostgreSQL: 8.2.4

>
>
>>> I had a group that now manages our server set up a

> directory/partition
>>> for us to put postgreSQL into. The directory is called pgsql_data.

>> The
>>> directory is more than a regular directory. It contains a

>> subdirectory
>>> called "lost+found". I would assume this is a logical partition. I
>>> tried installing postgreSQL directly into this directory but it

> failed
>>> since there is a file in this directory, "lost+found". Is there a

> way
>>> around this? Worst case scenario I will create a subdirectory called
>>> data and put the install in there. I would have preferred to put it

>> It is probably an ownership issue. If this is linux the mount is
>> probably owned by root. Create a sub directory in pgsql_data that is
>> owned by postgres called pgsql and install it in there.

>
>> Sincerely,

>
>> Joshua D. Drake

>
>>> directly into the pgsql_data. There would be no other files that

>> would
>>> have gone into the directory/partition other than postgreSQL. Would

>> it
>>> be possible for me to install postgreSQL into a sub directory of
>>> pgsql_data and then move the files up a directory into pgsql_data?

>
>
>
>
>>> Thanks,

>
>
>>> Lance Campbell
>>> Project Manager/Software Architect
>>> Web Services at Public Affairs
>>> University of Illinois
>>> 217.333.0382
>>> http://webservices.uiuc.edu

>
>
>
>
>
>


- --

=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 24x7/Emergency: +1.800.492.2240
PostgreSQL solutions since 1997 http://www.commandprompt.com/
UNIQUE NOT NULL
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGzb9vATb/zqfZUUQRAvBUAJ0afVRD/Tt2vR0LBo6LcQyEvbYKvACgjUns
iL7APXC+v3e6YslHCUbCjak=
=MxlM
-----END PGP SIGNATURE-----

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-10-2008, 08:09 AM
Campbell, Lance
 
Posts: n/a
Default Re: Installing Postgres

Joshua,
As I stated in my original email I know I can install the database in a
subdirectory of /abc/def/pgsql_data. I know that.

Let me ask this of the listserv: Is it possible to install the
PostgreSQL database in a directory and then move the directory later?

Example: I install PostgreSQL to /abc/data can I move the files then to
/def/data?

Thanks,

Lance Campbell
Project Manager/Software Architect
Web Services at Public Affairs
University of Illinois
217.333.0382
http://webservices.uiuc.edu


-----Original Message-----
From: Joshua D. Drake [mailto:jd@commandprompt.com]
Sent: Thursday, August 23, 2007 12:10 PM
To: Campbell, Lance
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] Installing Postgres

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Campbell, Lance wrote:
> Command I use to initialize the database with:
>
> /usr/bin/initdb -D /abc/def/pgsql_data
>
> Response:
>
> The files belonging to this database system will be owned by user
> "my_user".
> This user must also own the server process.
>
> The database cluster will be initialized with locale C.
>
> initdb: directory "/abc/def/pgsql_data" exists but is not empty
> If you want to create a new database system, either remove or empty
> the directory "/abc/def/pgsql_data" or run initdb
> with an argument other than "/abc/def/pgsql_data".
>
>
>
> As I stated in my original email there is a subdirectory in:
> "/abc/def/pgsql_data" called "lost+found".


My solution still applies:

mkdir pgsql_data/pgsql
chown -R postgres.postgres pgsql_data/pgsql
initdb -D pgsql_data/pgsql/data

Sincerely,

Joshua D. Drake


>
> Thanks,
>
> Lance Campbell
> Project Manager/Software Architect
> Web Services at Public Affairs
> University of Illinois
> 217.333.0382
> http://webservices.uiuc.edu
>
>
> -----Original Message-----
> From: Joshua D. Drake [mailto:jd@commandprompt.com]
> Sent: Thursday, August 23, 2007 11:59 AM
> To: Campbell, Lance
> Cc: pgsql-admin@postgresql.org
> Subject: Re: [ADMIN] Installing Postgres
>
> Campbell, Lance wrote:
>> This is not an ownership issue. It does try to install PostgreSQL.

> It
>> complains because there is a file or directory in the directory where

> I
>> am installing PostgreSQL to. The same thing will happen if I create

a
>> directory called XYZ and place a file or directory inside of XYZ and
>> then try to install the database.

>
> *sigh*
>
> How about an actual error message and the *exact* command you are
> typing.
>
> Sincerely,
>
> Joshua D. Drake
>
>> Thanks,

>
>> Lance Campbell
>> Project Manager/Software Architect
>> Web Services at Public Affairs
>> University of Illinois
>> 217.333.0382
>> http://webservices.uiuc.edu

>
>
>> -----Original Message-----
>> From: Joshua D. Drake [mailto:jd@commandprompt.com]
>> Sent: Thursday, August 23, 2007 11:48 AM
>> To: Campbell, Lance
>> Cc: pgsql-admin@postgresql.org
>> Subject: Re: [ADMIN] Installing Postgres

>
>> Campbell, Lance wrote:
>>> OS: redhat linux
>>> Version of PostgreSQL: 8.2.4

>
>
>>> I had a group that now manages our server set up a

> directory/partition
>>> for us to put postgreSQL into. The directory is called pgsql_data.

>> The
>>> directory is more than a regular directory. It contains a

>> subdirectory
>>> called "lost+found". I would assume this is a logical partition. I
>>> tried installing postgreSQL directly into this directory but it

> failed
>>> since there is a file in this directory, "lost+found". Is there a

> way
>>> around this? Worst case scenario I will create a subdirectory

called
>>> data and put the install in there. I would have preferred to put it

>> It is probably an ownership issue. If this is linux the mount is
>> probably owned by root. Create a sub directory in pgsql_data that is
>> owned by postgres called pgsql and install it in there.

>
>> Sincerely,

>
>> Joshua D. Drake

>
>>> directly into the pgsql_data. There would be no other files that

>> would
>>> have gone into the directory/partition other than postgreSQL. Would

>> it
>>> be possible for me to install postgreSQL into a sub directory of
>>> pgsql_data and then move the files up a directory into pgsql_data?

>
>
>
>
>>> Thanks,

>
>
>>> Lance Campbell
>>> Project Manager/Software Architect
>>> Web Services at Public Affairs
>>> University of Illinois
>>> 217.333.0382
>>> http://webservices.uiuc.edu

>
>
>
>
>
>


- --

=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 24x7/Emergency: +1.800.492.2240
PostgreSQL solutions since 1997 http://www.commandprompt.com/
UNIQUE NOT NULL
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGzb9vATb/zqfZUUQRAvBUAJ0afVRD/Tt2vR0LBo6LcQyEvbYKvACgjUns
iL7APXC+v3e6YslHCUbCjak=
=MxlM
-----END PGP SIGNATURE-----

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 04-10-2008, 08:09 AM
Joshua D. Drake
 
Posts: n/a
Default Re: Installing Postgres

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Campbell, Lance wrote:
> Joshua,
> As I stated in my original email I know I can install the database in a
> subdirectory of /abc/def/pgsql_data. I know that.


You can not install into a mount point. That is your problem. That is
what the lost+found is telling you, that it is a mount point. You *must*
install into a directory on the mount point.

Which is why I gave you the solution I did.

>
> Let me ask this of the listserv: Is it possible to install the
> PostgreSQL database in a directory and then move the directory later?


Yes, if you follow what I said above.

>
> Example: I install PostgreSQL to /abc/data can I move the files then to
> /def/data?


If data is *not a mount point* yes, but you will want to move the whole
directory (with special cases for pg_log, and pg_xlog).

Joshua D. Drake


>
> Thanks,
>
> Lance Campbell
> Project Manager/Software Architect
> Web Services at Public Affairs
> University of Illinois
> 217.333.0382
> http://webservices.uiuc.edu
>
>
> -----Original Message-----
> From: Joshua D. Drake [mailto:jd@commandprompt.com]
> Sent: Thursday, August 23, 2007 12:10 PM
> To: Campbell, Lance
> Cc: pgsql-admin@postgresql.org
> Subject: Re: [ADMIN] Installing Postgres
>
> Campbell, Lance wrote:
>> Command I use to initialize the database with:

>
>> /usr/bin/initdb -D /abc/def/pgsql_data

>
>> Response:

>
>> The files belonging to this database system will be owned by user
>> "my_user".
>> This user must also own the server process.

>
>> The database cluster will be initialized with locale C.

>
>> initdb: directory "/abc/def/pgsql_data" exists but is not empty
>> If you want to create a new database system, either remove or empty
>> the directory "/abc/def/pgsql_data" or run initdb
>> with an argument other than "/abc/def/pgsql_data".

>
>
>
>> As I stated in my original email there is a subdirectory in:
>> "/abc/def/pgsql_data" called "lost+found".

>
> My solution still applies:
>
> mkdir pgsql_data/pgsql
> chown -R postgres.postgres pgsql_data/pgsql
> initdb -D pgsql_data/pgsql/data
>
> Sincerely,
>
> Joshua D. Drake
>
>
>> Thanks,

>
>> Lance Campbell
>> Project Manager/Software Architect
>> Web Services at Public Affairs
>> University of Illinois
>> 217.333.0382
>> http://webservices.uiuc.edu

>
>
>> -----Original Message-----
>> From: Joshua D. Drake [mailto:jd@commandprompt.com]
>> Sent: Thursday, August 23, 2007 11:59 AM
>> To: Campbell, Lance
>> Cc: pgsql-admin@postgresql.org
>> Subject: Re: [ADMIN] Installing Postgres

>
>> Campbell, Lance wrote:
>>> This is not an ownership issue. It does try to install PostgreSQL.

>> It
>>> complains because there is a file or directory in the directory where

>> I
>>> am installing PostgreSQL to. The same thing will happen if I create

> a
>>> directory called XYZ and place a file or directory inside of XYZ and
>>> then try to install the database.

>> *sigh*

>
>> How about an actual error message and the *exact* command you are
>> typing.

>
>> Sincerely,

>
>> Joshua D. Drake

>
>>> Thanks,
>>> Lance Campbell
>>> Project Manager/Software Architect
>>> Web Services at Public Affairs
>>> University of Illinois
>>> 217.333.0382
>>> http://webservices.uiuc.edu

>
>>> -----Original Message-----
>>> From: Joshua D. Drake [mailto:jd@commandprompt.com]
>>> Sent: Thursday, August 23, 2007 11:48 AM
>>> To: Campbell, Lance
>>> Cc: pgsql-admin@postgresql.org
>>> Subject: Re: [ADMIN] Installing Postgres
>>> Campbell, Lance wrote:
>>>> OS: redhat linux
>>>> Version of PostgreSQL: 8.2.4

>
>>>> I had a group that now manages our server set up a

>> directory/partition
>>>> for us to put postgreSQL into. The directory is called pgsql_data.
>>> The
>>>> directory is more than a regular directory. It contains a
>>> subdirectory
>>>> called "lost+found". I would assume this is a logical partition. I
>>>> tried installing postgreSQL directly into this directory but it

>> failed
>>>> since there is a file in this directory, "lost+found". Is there a

>> way
>>>> around this? Worst case scenario I will create a subdirectory

> called
>>>> data and put the install in there. I would have preferred to put it
>>> It is probably an ownership issue. If this is linux the mount is
>>> probably owned by root. Create a sub directory in pgsql_data that is
>>> owned by postgres called pgsql and install it in there.
>>> Sincerely,
>>> Joshua D. Drake
>>>> directly into the pgsql_data. There would be no other files that
>>> would
>>>> have gone into the directory/partition other than postgreSQL. Would
>>> it
>>>> be possible for me to install postgreSQL into a sub directory of
>>>> pgsql_data and then move the files up a directory into pgsql_data?

>
>
>
>>>> Thanks,

>
>>>> Lance Campbell
>>>> Project Manager/Software Architect
>>>> Web Services at Public Affairs
>>>> University of Illinois
>>>> 217.333.0382
>>>> http://webservices.uiuc.edu

>
>
>
>
>
>


- --

=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 24x7/Emergency: +1.800.492.2240
PostgreSQL solutions since 1997 http://www.commandprompt.com/
UNIQUE NOT NULL
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGzcHKATb/zqfZUUQRAkfOAKCWDKaOqLYE8TRs8CBUW4njiRG3bgCcDW/o
XHUFX4Mc79zybktslrF2km0=
=jz63
-----END PGP SIGNATURE-----

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 04-10-2008, 08:09 AM
Tom Lane
 
Posts: n/a
Default Re: Installing Postgres

"Joshua D. Drake" <jd@commandprompt.com> writes:
> Campbell, Lance wrote:
>> As I stated in my original email I know I can install the database in a
>> subdirectory of /abc/def/pgsql_data. I know that.


> You can not install into a mount point. That is your problem. That is
> what the lost+found is telling you, that it is a mount point. You *must*
> install into a directory on the mount point.


Right. If the mount directory isn't root-owned, it *should* be ---
your sysadmin erred by making it postgres-owned. The correct
configuration is root-owned mount point, root-owned lost+found under it,
also postgres-owned data directory under it.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 04-10-2008, 08:09 AM
Campbell, Lance
 
Posts: n/a
Default Re: Installing Postgres

Solution:

The solution, based on emails I have received, is to install PostgreSQL
into a subdirectory called "data". I then move the contents of "data"
back a directory. This way I am able to have the files in the directory
I want them in. Even though the directory I wanted them in contains a
subdirectory. This is how you get around the issue. It appears that
the PostgreSQL data directory contents can be moved. It is just
important to make sure the database is shutdown before moving the data
directory contents! Thanks for all of the feedback from everyone.



Thanks,



Lance Campbell

Project Manager/Software Architect

Web Services at Public Affairs

University of Illinois

217.333.0382

http://webservices.uiuc.edu



________________________________

From: pgsql-admin-owner@postgresql.org
[mailtogsql-admin-owner@postgresql.org] On Behalf Of Campbell, Lance
Sent: Thursday, August 23, 2007 11:22 AM
To: pgsql-admin@postgresql.org
Subject: [ADMIN] Installing Postgres



OS: redhat linux

Version of PostgreSQL: 8.2.4



I had a group that now manages our server set up a directory/partition
for us to put postgreSQL into. The directory is called pgsql_data. The
directory is more than a regular directory. It contains a subdirectory
called "lost+found". I would assume this is a logical partition. I
tried installing postgreSQL directly into this directory but it failed
since there is a file in this directory, "lost+found". Is there a way
around this? Worst case scenario I will create a subdirectory called
data and put the install in there. I would have preferred to put it
directly into the pgsql_data. There would be no other files that would
have gone into the directory/partition other than postgreSQL. Would it
be possible for me to install postgreSQL into a sub directory of
pgsql_data and then move the files up a directory into pgsql_data?



Thanks,



Lance Campbell

Project Manager/Software Architect

Web Services at Public Affairs

University of Illinois

217.333.0382

http://webservices.uiuc.edu




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:58 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
UnixAdminTalk.com

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93