[Linux-cluster] Locking in GFS
rpeterso at redhat.com
Mon Sep 22 14:19:51 UTC 2008
----- "Chris Joelly" <chris-m-lists at joelly.net> wrote:
| i have a question on locking issues on GFS:
| how do GFS lock files on the filesystem. I have found one posting to
| this list which states that locking occurs "more or less" on file
| level. Is this true? or does some kind of locking occur on directory
| level too?
| The question arrose because i was thinking on whats would happen when
| using GFS on an file server with home directories for lets say 1000
| users. how do i setup this directory structure to avoid locking
| as best as possible.
| is a directory layout like the following ok when /home is a GFS file
| thanks Chris
I'm not sure what your concern is. There shouldn't be any issues
with GFS locking, for the most part. GFS has cluster-wide locking
so that locking a file on one node in the cluster will known
automatically by the entire cluster. GFS uses an internal lock
caching mechanism known as "glocks". These glocks are cached locally
and don't require lots of network interaction unless there are
multiple nodes requesting the same lock.
With home directories, I wouldn't expect a lot of lock contention
anyway, so again, I'm not sure what your concern is.
Red Hat Clustering & GFS
More information about the Linux-cluster