l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2013 Mar 05 10:49

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]=?utf-8?q?Is_NFS_unsafe=3F_=5BWas=3A_Clusters=2C_rende?==?utf-8?q?rfarms_and_MySQL=2E=2E=2E=5D?=
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech]=?utf-8?q?Is_NFS_unsafe=3F_=5BWas=3A_Clusters=2C_rende?==?utf-8?q?rfarms_and_MySQL=2E=2E=2E=5D?=

> -------- Original Message --------
> Subject: Re: [vox-tech] Is NFS unsafe? [Was: Clusters, renderfarms and
> MySQL...]
> From: Bill Broadley <bill@broadley.org>
> Date: Tue, March 05, 2013 8:52 am
> To: vox-tech@lists.lugod.org
> On 03/04/2013 02:46 PM, timriley@appahost.com wrote:

> 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.

Yes. The administrators shouldn't create the same table on
multiple MySQL servers when the multiple DB files point
to the same place. 

> The primary problem is that NFS is the
> > speed bottleneck.

Yes. The bottleneck will be the network. NFS is just an option if
your database grows past your local disk space. However, it's an easy
option when compared with setting up a cluster.

> It is not meant for such use.

Actually, it runs just fine on a 300+ million record table.
Thirty users are selecting, inserting, updating, and deleting
records throughout the day.

It's probably a few eye-blinks slower than if the DB files
were on the same computer running the MySQL server, however.
But 10 years ago, the DB files grew larger than the local
disk space. So moving the measurement table to a newer
computer and pointing the DB files across NFS to the
newer computer solved this problem. It was a logical
thing to try, and nothing broke.

> Another risk with NFS
> > is that you must devise a way to ensure that two or more servers do
> > not interfere with each other.

Again, yes. The administrators shouldn't create the same table on
multiple MySQL servers when the multiple DB files point
to the same place. 

I can't comment on these further remarks because these issues
have never come up. In my experience, MySQL just works
fine across NFS.

> 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
vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
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:
O'Reilly and Associates
For numerous book donations.