Search Postgresql Archives

Re: The case of PostgreSQL on NFS Server

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 25/06/2010 8:23 AM, Iwao Shikase wrote:
Hi  Roeleveld-san,

Thank you for your advice. But My purpose is to test PostgreSQL
which data cluster is in NFS server.
As your says, Cluster Filesystem is one of answer of sharing files.
But my company still want to use NFS server. So I want to know
how to use PostgreSQL using NFS.

By the way,The manual says, "if possible, mount NFS file systems
synchronously (without caching) to avoid this".

It depends on the NFS implementation. Are you using a Linux NFS server? Linux NFS client? What versions? Are they on the same machine and if not, how are they connected? You're not providing enough information for anyone to give you a useful answer.

In general, you should assume that NFS is just NOT SAFE, unless you can prove a particular configuration IS safe by rigourous testing of both client- and server- failure scenarios, including power loss, OS crashes, etc.

I want to know  what means synchronously with out caching.
In other word, which NFS options we must use follwoing the manual.
sync ? or noac ? or both ?

Both.

You might be OK with async,ac *IF* you can guarantee that neither client nor server will ever crash, lose their network connection to each other, lose power, or otherwise malfunction in any way. In other words, even if they're on the same computer, just don't do it.

For that matter, even with "sync,ac" it's hard to know if the NFS server will really provide the proper write ordering. Your writes will probably reach the NFS server in order, but whether the NFS server then writes them to its disk in order - who knows. So if your NFS server crashes or loses power, then EVEN if you disable all caching in the NFS procotol you might still have data corruption.

NFS and databases: Just don't do it.

If your company only has NFS, now is a good opportunity to ask them for iSCSI, ATA-over-Ethernet, network block device, a suitable clustering file system, or SOME other way to access storage. It's incredibly hard, if possible, to guarantee that a database will work properly over NFS unless you know a lot about the details of the NFS client and server involved - and any configuration that's safe will almost certainly also be glacially slow.

--
Craig Ringer

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux