Jordan Willis
2015-Jul-04 01:46 UTC
[Gluster-users] set volume locking without shutting off server
Hi, Is it possible to enable posix type locking with glusterfs without shutting off the volume? I think this is what I need (I?m trying to get sqlite to lock files on my nfs mounted glusterfs volume) volume locks type features/locks subvolumes brick end-volume Can you enable this with the gluster volume set command in some way? If not, do I just add those lines to the /etc/glusterfs/gluster.vol file and turn off and on the volume, or how would I reload that file. I manually started the current fs with the following. I?m confused on where I should actually enable the locking. gluster volume create myvolume nfs_mount_1 nfs_mount_2 ?nfs_mount_N gluster volume start myvolume Thanks so much, Jordan -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.gluster.org/pipermail/gluster-users/attachments/20150703/777851d2/attachment.html>
Kaushal M
2015-Jul-04 08:35 UTC
[Gluster-users] set volume locking without shutting off server
Which version of GlusterFS are you using? The locks translator should be enabled by default for all volumes for the latest versions (IIRC 3.5 and above). So you wouldn't need to do anything. To verify you can check the generated brick volfiles in /var/lib/glusterd/vols/<VOL>/<brick-name>.vol . Also, are you really creating GlusterFS bricks on NFS mounts? That doesn't work.. ~kaushal On Sat, Jul 4, 2015 at 7:16 AM, Jordan Willis <jwillis0720 at gmail.com> wrote:> Hi, > > Is it possible to enable posix type locking with glusterfs without shutting > off the volume? > > I think this is what I need (I?m trying to get sqlite to lock files on my > nfs mounted glusterfs volume) > > volume locks > type features/locks > subvolumes brick > end-volume > > > Can you enable this with the gluster volume set command in some way? If not, > do I just add those lines to the /etc/glusterfs/gluster.vol file and turn > off and on the volume, or how would I reload that file. I manually started > the current fs with the following. I?m confused on where I should actually > enable the locking. > > > gluster volume create myvolume nfs_mount_1 nfs_mount_2 ?nfs_mount_N > gluster volume start myvolume > > > Thanks so much, > Jordan > > > _______________________________________________ > Gluster-users mailing list > Gluster-users at gluster.org > http://www.gluster.org/mailman/listinfo/gluster-users
Niels de Vos
2015-Jul-04 09:57 UTC
[Gluster-users] set volume locking without shutting off server
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