forked from tucbill/manila
-
Notifications
You must be signed in to change notification settings - Fork 3
setup glustersamba
Ram Raja edited this page Jan 20, 2014
·
1 revision
Source install GlusterFS
$ git clone git://git.samba.org/samba.git samba
$ cd samba
$ git checkout -b v3-6-stable origin/v3-6-stable
$ cd source3
$ ./autogen.sh && ./configure && make
$ sudo make install
$ git clone git://forge.gluster.org/samba-glusterfs/samba-glusterfs-vfs.git
~/samba-glusterfs-vfs
$ cd ~/samba-glusterfs-vfs
$ ./autogen.sh
$ ./configure --with-samba-source=/abs/path/to/samba/source3dir && make
$ sudo make install
Determine where Samba daemon looks for configuration files, and move the files appropriately.
# /usr/local/samba/sbin/smbd -b
# cd <path to samba srcdir>
# cp packaging/RHEL/setup/smb.conf /usr/local/samba/lib/
Append the below section to the Samba config file for exporting a directory, testdir, which is inside a GlusterFS volume, testvol1. 'testshare' is the share that you'd export to a particular ip (10.70.43.71).
[testshare]
path = /testdir
read only = No
hosts allow = 10.70.43.71
hosts deny = ALL
vfs objects = glusterfs
glusterfs:volume = testvol1
You can check the internal correctness of the config file and dump a particular section as follows.
# /usr/local/samba/bin/testparm -s --section-name testshare.
Start the Samba server.
# /usr/local/samba/sbin/smbd
You can edit the configuation file, and make the server reload the config file by,
# /usr/local/samba/bin/smbcontrol smbd reload-config
It is necessary to be a valid Samba user to access a share on the Samba server. You can create a Samba user, root, by
# /usr/local/samba/bin/smbpassword - a root
You can check the shares exported by the samba server by
# /usr/local/samba/bin/smbclient -L <host-ip>
The Samba client can mount the share by
# mount -t cifs //<host-ip>/testshare /mnt/cifsmnt/ -o username=root,password=<password of the Samba user root>