l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
October 7: Social gathering
Next Installfest:
TBD
Latest News:
Aug. 18: Discounts to "Velocity" in NY; come to tonight's "Photography" talk
Page last updated:
2013 Mar 05 10:04

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] Is NFS unsafe? [Was: Clusters,renderfarms and MySQL...]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] Is NFS unsafe? [Was: Clusters,renderfarms and MySQL...]



On 03/04/2013 02:46 PM, timriley@appahost.com wrote:
> NFS has been an easy way to implement growth and has been reliable in
> the
> three decades I've been using it.

I've been reasonably happy with NFS for the last 20 years or so, but I
never tried running a database on it.

I attended a talk by one of the lead MySQL developers at one of the
Moscone Linux World/expos.  At the end of the talk someone inquired
about NFS for mysql storage.  The room went silent, and the developer
said don't do that.  Many people chuckled.  The speaker and the crowd
seemed to all agree that Mysql over NFS was a bad bad idea.

The problems is that while NFS has file locking that certain situations
require byte range locking, which is not available.

Have things changed?

A paragraph from the Mysql docs (5.6.1):
> Even when the preceding precautions are observed, this kind of setup >
works only with MyISAM and MERGE tables, and not with any of the
> other storage engines. Also, this warning against sharing a data
> directory among servers always applies in an NFS environment.
> Permitting multiple MySQL servers to access a common data directory
> over NFS is a very bad idea. The primary problem is that NFS is the
> speed bottleneck. It is not meant for such use. Another risk with NFS
> is that you must devise a way to ensure that two or more servers do
> not interfere with each other. Usually NFS file locking is handled by
> the lockd daemon, but at the moment there is no platform that
> performs locking 100% reliably in every situation.

Elsewhere the mysql docs:
  It is not a good idea to configure InnoDB to use data files or log
  files on NFS volumes.

> In Kyle Rankin's (http://www.linuxjournal.com/users/kyle-rankin)
> book, "The Official ubuntu Server Book" (copyright 2009,
[snip]

I'm all for NFS, but not for things that require byte range locking.
Did Kyle address mysql on NFS specifically?  Or just NFS?

> The vulnerability presented here is having multiple MySQL servers
> accessing the same table across NFS. Of course, don't do that.

Certainly that's even worse, pretty much guaranteeing corruptions unless
all databases are using the tables read-only.

Everything I've seen on best practices for MySQL say to use local disk
or to use a block device like iSCSI for reasonably behavior when being
used with a database.

_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Appahost Applications
For a significant contribution towards our projector, and a generous donation to allow us to continue meeting at the Davis Library.