当前位置:首页 > 系统运维

开源技术实践分享:Manila + Cephfs 调研

本文章主要介绍如何在Openstack Pike + kolla 集成Manila项目提供NAS服务。开源主要是技术Manila驱动为Cephfs的情况,利用Ganesha把Guest NFS 协议转换为libcephfs协议存储数据。实践

一、分享简单介绍

什么是调研Manila?

Manila项目全称是File Share Service,文件共享即服务。开源是技术OpenStack大帐篷模式下的子项目之一,用来提供云上的实践文件共享服务,支持CIFS协议和NFS协议。分享目前Manila项目中集成了众多驱动实现共享服务,调研使用驱动最多还是开源Cephfs, 所以值得看看。

二、技术驱动分类

本文讲述的实践manila cephfs驱动分为两种,其它众多驱动请参考官方手册。分享

1、调研cephfs native share

相当于租户虚机直接连接cephfs集群,存在安全问题,生产环境中很难推动。

ceph-common包安装在manila-share中 ceph-common/ceph-fuse 软件安装在租户虚机Guest里 ceph集群与manila-share网络打通 ceph集群与租户虚机网络打通

2、云服务器cephfs nfs share

利用Ganesha作中转,把Guest NFS 协议转换为libcephfs协议存储数据,隐藏后端ceph集群,更适合云的业务场景。

官网说明

1、Pike or later versions of manila.

2、Kraken or later versions of Ceph.

3、2.5 or later versions of NFS-Ganesha.

4、A Ceph cluster with a filesystem configured

5、ceph-common package installed in the servers running the manila-share service.

6、NFS client installed in the guest.

7、Network connectivity between your Ceph cluster’s public network and the servers running the manila-share service.

8、Network connectivity between your Ceph cluster’s public network and NFS-Ganesha server.

9、Network connectivity between your NFS-Ganesha server and the manila guest.

三、环境准备

1、系统配置(hosts、时间同步等)

2、openstack pike + ceph 环境

跟据官网所说准备一套openstack pike + ceph +kolla环境,其中cephfs配置参照cephfs补丁,跑出一个cephfs集群。

四、安装nfs-ganesha

1、配源nfs-ganesha

2、安装nfs-ganesha

由于没有单独制作nfs-ganesha的docker镜像, 所以直接在主控上面安装nfs-ganesha作测试。

3、亿华云配置nfs-ganesha

编辑配置文件

4、服务启动

启动服务

五、安装Manila

1、安装Manila

注意:kolla中global.yml有关Manila配置

2、授权Manila

如下命令会生成manila.keyring文件,一并复制到 manila-share的/etc/ceph目录下

3、配置Manila

manila-share基础包安装

manila-share 关于ceph的配置

编辑manila-share的/etc/ceph/ceph.conf 添加如下配置

支持快照

编辑manila-share的/etc/manila/manila.conf 添加如下配置:

注意:manila-share去调nfs-ganesha的协议是ssh,所以有必要配置ssh访问.如果nfs-ganesha与manila-share服务在一台机器上不用配ssh的。并且cephfs_ganesha_server_is_remote= False 让其调用本地ganesha即可。

4、验证服务

重启各manila/ceph容器或服务

六、Manila测试

1、创建实例

创建manila实例

2、查看共享路径

查看共享路径

3、权限管理

4、vm 挂载

在己授权IP地址的guest vm 上挂载(其实是任意支持NFS协议客户端包括云以外的主机)

5、容量管理

***只能写入创建共享实例定义的容量空间

dashborad视图

手动dd测试写入超过先前定义容量时将返回错误

当业务数据量大时可扩容Manila共享实例

参考链接:

官方手册:https://docs.openstack.org/manila/pike/contributor/

开发文档:https://docs.openstack.org/manila/latest/

香港云服务器

分享到:

滇ICP备2023006006号-16