Cephfs + Samba build Ceph-based file-sharing service

1 Introduction
Ceph distributed storage service will use Samba file storage CephFS exported as Samba protocol support for Windows and Linux MacOS and other file-sharing access

2 environment
Cephfs + Samba build Ceph-based file-sharing service

3 mounted Samba
download samba rpm installation package:
yum the install smaba Samba -Y-Client-Common Samba

Cephfs + Samba build Ceph-based file-sharing service

4 Create samba users
groupadd samba
useradd -d samba / Home / smb samba -g -s / sbin / nologin
the smbpasswd -a samba

5 vfs_ceph source compiler module
download Samba-4.8.3.tar.gz -zxvf the tar
yum the install lmdb python36 python36 -Y-devel-lmdb devel-GnuTLS the GPGME devel-devel-Python-devel The libarchive the GPGME Jansson libacl devel-devel-PAM - devel

./configure
Make
cd bin/default/source3/modules/
cp -a libvfs_module_ceph.so /usr/lib64/samba/vfs/

6 configuration Ceph
create CephFs samba.gw account
Ceph auth-GET-or the Create client.samba.gw Mon 'the allow r' \
the OSD 'the allow ' MDS 'the allow ' -o ceph.client.samba.gw.keyring

The key is copied to the / etc / Ceph
CP ceph.client.samba.gw.keyring / etc / Ceph /

7 Configuring Samba
Cephfs + Samba build Ceph-based file-sharing service

8 启动服务
systemctl start smb.service
systemctl enable smb.service
systemctl start nmb.service
systemctl enable nmb.service

Linux mount. 9
Linux client installation the install CIFS -Y-utils yum
the mount.cifs // the IP / Share / mnt / Share = XXX -o username, password = XXX

10 Windows mount
Cephfs + Samba build Ceph-based file-sharing service

Cephfs + Samba build Ceph-based file-sharing service

11 failure scenarios:
11.1 under Windows to access the shared directory does not have permission to delete files and create directories

This means using a kernel to mount the CephFS locally on the IP
Mount the IP Ceph -t: / / mnt / cephfs /
the chmod 777 -R & lt / mnt / cephfs /
umount / mnt / cephfs

Guess you like

Origin blog.51cto.com/evely/2432206