[Gluster-users] Packaging of Samba hook scripts

Lalatendu Mohanty lmohanty at redhat.com
Wed Feb 12 20:05:24 UTC 2014


Hi All,

We have 3 hook scripts in glusterfs/extras/hook-scripts named as below.

  * S30samba-set.sh
  * S30samba-start.sh
  * S30samba-stop.sh

The purpose of the hook scripts to do the required changes in smb.conf 
automatically for each gluster volume start/stop/set operations. Script 
assumes each Gluster nodes will be used as Samba Servers for the Gluster 
volumes. So with hook scripts we dont have to do manual changes to 
smb.conf.

As of now the scripts will not work with Samba 4.X series and GlusterFS 
vfs plugin for Samba 4.x. It needs a small change and the fix is present 
in Gerrit as below.

http://review.gluster.org/6991

Now the question , should we package these scripts in way that it would 
be helpful when somebody uses GlusterFS vfs plugin for Samba with 
GlusterFS? Suggestions?

I and Kaleb had a discussion on #gluster and came up with below idea.

  * Samba hook scripts can be packaged as a serrate package e.g. :
    glusterfs-samba-hooks RPM
      o The package will be built while building glusterfs
      o Installing GlusterFS wouldn't install it automatically.
      o The samba-vfs-glusterfs would require it i.e. it would get
        installed automatically while installing samba-vfs-glusterfs as
        a dependency.

The location of the hook scripts should be as below (I think this holds 
true for all the Linux/GNU distributions). If you copy the scripts 
manually to desired path it would work too.

/var/lib/glusterd/hooks/1/start/post/S30samba-start.sh
/var/lib/glusterd/hooks/1/stop/pre/S30samba-stop.sh
/var/lib/glusterd/hooks/1/set/S30samba-set.sh

There is another hook script for Samba CTDB i.e. S29CTDBsetup.sh. We can 
take that in to account too.

Thanks,
Lala


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://supercolony.gluster.org/pipermail/gluster-users/attachments/20140213/33192431/attachment.html>


More information about the Gluster-users mailing list