HI Niels and Company,
It feels like I’m spamming so I want to apologize. It seems I spoke a little too soon. It turns out I was able to lock as long as I mounted my gluster volume using glusterfs rather than nfs. I was just on the daemon server that had mounted glusterfs using:
>glusterfsserver
$mount -t glusterfs glusterfsserver:/my_volume /mnt/my_mount
#locking works
>random_client
$mount -t nfs glusterfserver:/my_volume /mnt/my_other_mount
#locking doesn’t work
This just shows me another reason to install glusterfs on all my servers and mount using glusterfs rather than nfs. But I wanted to make sure that this behavior of not being able to lock is consistent in case any other users need to know.
- Jordan
On Jul 5, 2015, at 3:23 AM, Niels de Vos <ndevos@xxxxxxxxxx> wrote:On Sat, Jul 04, 2015 at 08:10:48PM -0700, Jordan Willis wrote:Looks like upgrading to the latest version of glusterfs solved all my
locking issues.Thanks for reporting back.I'm not aware of any changes related to locking since 3.5.2 (was it?).
That makes it difficult to guess what the problem caused and why it
works fine with an updated version.Have a good weekend,
NielsThank you,
JordanOn Jul 4, 2015, at 3:22 AM, Jordan Willis <jwillis0720@xxxxxxxxx> wrote:Its not just sqlite, but mongodb and ipython notebook. If you have a solution for mongodb file locking, I’m welcome to suggestions. But not using mongodb, is not an option.On Jul 4, 2015, at 2:57 AM, Niels de Vos <ndevos@xxxxxxxxxx> wrote:On Fri, Jul 03, 2015 at 06:46:01PM -0700, Jordan Willis wrote:Hi,Is it possible to enable posix type locking with glusterfs without
shutting off the volume?Locking should be enabled by default (like Kaushal explained in an other
reply).I think this is what I need (I’m trying to get sqlite to lock files on
my nfs mounted glusterfs volume)SQLite is not the best databases to place on a shared filesystem. The
locking done by SQLite is (or at least was, might have changed) not very
advanced. From what I remember, there is a single file lock, no table or
row granularity.https://www.sqlite.org/pragma.html#pragma_locking_mode contains some
more details, and it also points to the WAL documentation. You will want
to prevent SQLite to use shared-memory for WAL if you access the
database from different servers at the same time.HTH,
Niels
_______________________________________________ Gluster-users mailing list Gluster-users@xxxxxxxxxxx http://www.gluster.org/mailman/listinfo/gluster-users