Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Cephfs+Samba builds file sharing service based on Ceph

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

1 introduction

Ceph distributed storage uses Samba service to export CephFS file storage to Samba protocol. Support for Windows and Linux MacOS to access file sharing

2 Environment

3 install Samba

Download the samba rpm installation package:

Yum-y install smaba samba-client samba-common

4 create a samba user

Groupadd samba

Useradd samba-d / home/samba-g smb-s / sbin/nologin

Smbpasswd-a samba

5. Source code compiling vfs_ceph module

Download tar-zxvf samba-4.8.3.tar.gz

Yum-y install lmdb python36 python36-devel lmdb-devel gnutls-devel gpgme-devel python-gpgme jansson-devel libarchive-devel libacl-devel pam-devel

. / configure

Make

Cd bin/default/source3/modules/

Cp-a libvfs_module_ceph.so / usr/lib64/samba/vfs/

6 configure Ceph

Create a CephFs samba.gw account

Ceph auth get-or-create client.samba.gw mon 'allow r'\

Osd 'allow' mds' allow'- o ceph.client.samba.gw.keyring

Copy the key to / etc/ceph

Cp ceph.client.samba.gw.keyring / etc/ceph/

7 configure Samba

8 start the service

Systemctl start smb.service

Systemctl enable smb.service

Systemctl start nmb.service

Systemctl enable nmb.service

9 Linux mount

Linux client installs yum-y install cifs-utils

Mount.cifs / / IP/share / mnt/share-o username=xxx,password=xxx

10 Windows mount

11 failure scenario:

11.1 access to a shared directory under Windows does not have permission to delete and create directory files

It means that CephFS is mounted locally in kernel mode on IP.

Mount-t ceph IP:/ / mnt/cephfs/

Chmod 777-R / mnt/cephfs/

Umount / mnt/cephfs

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report