missymadi
asked on
How do I configure Postgres9 to have the database on it's own partition in Linux?
Experts,
I have a requirement of installing Postgres 9 database on it's own partition in RHEL5. What are the steps to have DATA on it's own partition?
I already installed Postgres, do I need to uninstall and reconfigure the software?
In building the VM, I did designate two hard drives and two ethernet .
Thanks, Missymadi
I have a requirement of installing Postgres 9 database on it's own partition in RHEL5. What are the steps to have DATA on it's own partition?
I already installed Postgres, do I need to uninstall and reconfigure the software?
In building the VM, I did designate two hard drives and two ethernet .
Thanks, Missymadi
Sorry, no space inbetween the PGDATA and = sign
export PGDATA=</partition/DATA folder>
ASKER
I'm new to Linux. Could you point me in the right direction of how to find the hard drive names and a command to find out the size of each. I'm guessing the lesser size of the two is where you would assign the pgdata to?
Thanks, Missymadi
Thanks, Missymadi
The command is df.
To get a more readable outpt use df -H which will output the resutls into k or M or G depending on the size of the drive. (h = human readable) ... (you can do the same thing with ls -lh to see the real size of files as well)
To get a more readable outpt use df -H which will output the resutls into k or M or G depending on the size of the drive. (h = human readable) ... (you can do the same thing with ls -lh to see the real size of files as well)
ASKER
This is strange. I tried to su postgres and the system is telling me that postgres does not exist?? How did this happen? How can I resolve this?
Check to make sure that the postgres directories are still on the machine. If they are then try recreting the postgres user with root:
su - root
useradd -p <PASSWORD> postgres
ASKER
I added postgres back. How could that have happened? We do have custom scripts but I would'nt think that they would want postgres to be disabled or deleted?
Anyway - we do have custom scripts. It looks like our data is captured in a directory
opt/co/DATA which contains directories, base, global, pg_clog, pg_log, pg_multixact etc. Is this the DATA directory that I want to point to the separate partition? I did a find on PGDATA and did not find anything.
Thanks, Missymadi
Anyway - we do have custom scripts. It looks like our data is captured in a directory
opt/co/DATA which contains directories, base, global, pg_clog, pg_log, pg_multixact etc. Is this the DATA directory that I want to point to the separate partition? I did a find on PGDATA and did not find anything.
Thanks, Missymadi
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window
All done as the postgres user.