Unix Technical Forum

Setting up data on two drives newb version.

This is a discussion on Setting up data on two drives newb version. within the pgsql Admins forums, part of the PostgreSQL category; --> I just wanted to thank everyone who jumped in to help me. Hopefully I have it set up ok. ...


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

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 01:23 AM
Joel Fradkin
 
Posts: n/a
Default Setting up data on two drives newb version.

I just wanted to thank everyone who jumped in to help me.
Hopefully I have it set up ok.

Postgres install using more then one raid array for drives.

Install Postgres (I did not let the OS install it as I was wanting to use 8
and Fedora Core 3 was shipping with 7.4)
After I installed Fedora, I went to :
http://www.postgresql.org/
Downloads off main menu
FTP browser link
Binary link
8.0
Linux
rpms
fedora
fedora-core-3
http://www.postgresql.org/ftp/binary...fedora-core-3/
I was able to pull all the rpms (it did ask for the cd for fedora a few
times).

Once that is completed, you should be able to pull up the start services and
see pgsql as a service.
If you start it it will create a /var/lib/pgsql/lib/data folder. Data is the
initdb folder.
When you run initdb it creates this folder for you inside whatever folder
you are running intdb for.

What I did (I have a machine where I set up two additional raid arrays for
the data and the wal files;
I was told it is best to use raid 10, 10k drives for the data and raid 1
15k drives for the wa/) was initdb /pgsql.
pgsql is what I called my raid 10 array and /wal is what I called my 15k
raid 1 array. This creates a data folder in /pgsql.
in /var/lib/pgsql/data I edited the pgsql.config and changed to
data_directory = '/pgdata/data'. I also:
listen_addresses = '*'
shared_buffers = 4000
max_fsm_pages = 30000 # min max_fsm_relations*16, 6 bytes each
max_fsm_relations = 1000 # min 100, ~50 bytes each
effective_cache_size = 40000 # typically 8KB each (my box is 8 gig so I
may edit this)
These settings I got from looking at
http://www.desknow.com/kb/idx/0/061/article/
It said to do a vacuum verbose total pages should be lower the
max_fsm_pages.
in pg_hba.conf I added
host all all 192.168.123.121 255.255.255.0 trust
to allow me to connect from my desktop.

Before starting the system up a second time (after adding the
data_directory) I went in to the
/pgsql/data folder and (A fellow from the mailing list helped me here to
relocate the wal)
0) backup your data
1) stop postmaster and verify.
2) cd $PGDATA; mv pg_xlog original_pg_xlog; ln -s /wal pg_xlog; cp
original_pg_xlog/* pg_xlog
3) start postmaster and confirm correct startup in log files.

only diference was I am not using $PGDATA I am using the directory command
in conf. So I chabged dir to /pgsql/data.

WHen I started postgres I could see data growing on both the /wal and /pgsql
drives.
I am still not 100% sure that just the data is on /pgsql/data, but at least
it is using a different drive then the OS
and the wal and data are on different drives.*



---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

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 08:53 AM.


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