PDA

View Full Version : Problem with database on a NAS



Klubban
04-01-2010, 12:42 PM
Hi!
I just got my netgear stora NAS connected to my router and I can access it just fine. I'm having problem moving my database to the NAS.
This is what I have done:
I started with copying my C:\Program Files\PostgreSQL\8.2\data to the NAS.
I mounted the NAS folder to my computer as Z:
I stoped the PostgreSQL Database Server 8.2
I changed the registry from "C:\Program Files\PostgreSQL\8.2\bin\pg_ctl.exe" runservice -N "pgsql-8.2" -D "C:\Program Files\PostgreSQL\8.2\data\"
to the new path
"C:\Program Files\PostgreSQL\8.2\bin\pg_ctl.exe" runservice -N "pgsql-8.2" -D "Z:\Poker\Program Files\PostgreSQL\data\"

But when I restart the service I get an error that the service was started and then stoped.

When I start up hold'em manager I can not connect to the database.

I'm I missing something?

BR Pierre

fozzy71
04-01-2010, 01:18 PM
I would probably try reinstalling postgresql 8.2, selecting your moved data directory (making sure to not initialize db cluster).

If you need a 8.2 installer, hopefully this is what you need.

1) Uninstall PostgreSQL from the Windows Control Panel.
2) run the command - start > programs > accessories > command prompt > right-click > run as administrator

net user postgres /delete
4) reboot.
5) Download and UnZip this file to a new folder. http://www.holdemmanager.com/downloads/postgresql-8.2.15-1.zip
6) Then run the postgresql-8.2.msi file and follow these instructions - FAQ - Hold'em Manager Poker Tracking Software :: Reinstall PostgreSQL (http://faq.holdemmanager.com/questions/70/Reinstall+PostgreSQL)

If you have moved/installed your DB to a non-default location, please make sure to change the 'Data Directory' path during the installation.

Klubban
04-02-2010, 07:55 AM
I'm sorry to say that it didn't work.
I will for now just archive my hands on the NAS and import them if needed on another pc.

BR Pierre

N0-L1m1T
04-02-2010, 12:24 PM
I suspect this is a permissions issue of some kind. When you network mount what Windows considers risky resources you'll get prompted when you try to access them. That would stop any service from starting right away.

I recommend you look into mmc (define Win XP policies) and see whether that can help you achieve what you want.

Also, i'd look at using symlinks to point the data directory on the C: drive to the real directory on the NAS. That way the postgres app will know nothing about it. A standard install and configure will work (policies permitting).

N0-L1m1T
04-02-2010, 12:26 PM
BTW, i think this is something HEM should look into more closely and offer guidance on. PT have done just that and give clear guidance on installing postgresql as a network resource and other things.

My personal perference is to install postgresql on the network and have HEM access it remotely at the port level.

morny
04-02-2010, 12:37 PM
Yeah, heres what has worked for me before when moving a database.

Go the the folder, right click the data folder, choose properties and share the file and tick allow others to use it. Also if there is a permissions TAB edit the permissions to allow any users in there full access. Then try again

Before doing that be sure by editing these permissions and sharing that your network is protected as im not an expert and im unsure what vunerabilities changing these permissions will have i just know theyve worked for me.

I'll add it to my todo list to update the network postgeSQL FAQs