Skip to content
Advertisement

error in exporting glusterfs volume using samba/cifs

I am trying to export glusterfs mount point as the samba export, and then mount it using CIFS protocol.

[root@ip-10-10-0-000 /]# df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/xvda1               7.8G  1.3G  6.5G  16% /
devtmpfs                 490M   56K  490M   1% /dev
tmpfs                    498M     0  498M   0% /dev/shm
10.00.0.00:/dist-volume   32G  130M   32G   1% /mnt/distributed

I have followed the below steps:

yum install samba
yum install samba-client
yum install cifs-utils

Added below lines to smb.conf file

[glustertest]

comment = For testing a Gluster volume exported through CIFS
path = /mnt/distributed
read only = no
guest ok = yes

Started the smb service:

[root@ip-10-10-0-000 samba]# /etc/init.d/smb start
Starting SMB services:                                     [  OK  ]

when i try to mount it using the CIFS getting below error:

[root@ip-10-10-0-000 /]# mount.cifs -o username=user,password=userpwd 10.00.0.00:/dist-volume  /mnt/smb

mount.cifs: bad UNC (10.00.0.00:/dist-volume)

I am not sure,the steps I followed are fully correct I could not find any proper documentation for exporting gluster volumes using samba

can anyone please tell me what went wrong here?

Advertisement

Answer

After i specified the volume name as “glustertest” i mentioned in samba.conf instead of using the actual gluster volume name it worked.

sudo mount -t cifs -o username=user,password=userpwd \\127.0.0.1\glustertest  /mnt/smb
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement