# Dev testing manila's cephfs(NFS) driver Reference https://docs.openstack.org/developer/manila/devref/cephfs_driver.html Create all-in-one** CephFS/Ganesha/Manila setup using devstack in a CentOS7 machine similar to the one in the upstream gate, _gate-manila-tempest-minimal-dsvm-cephfs-nfs-centos-7-nv_ ** Ceph server daemons (1 OSD, 1 MON, 1 MDS), NFS-Ganesha server, and manila-services all run in the same machine. * Clone devstack ``` $ git clone https://github.com/openstack-dev/devstack $ cd devstack ``` * Create a local.conf ``` cat <local.conf [[local|localrc]] HOST_IP=10.0.2.15 DATABASE_PASSWORD=rengen RABBIT_PASSWORD=guest SERVICE_TOKEN=rengen SERVICE_PASSWORD=rengen ADMIN_PASSWORD=rengen INSTALL_TESTONLY_PACKAGES=yes INSTALL_TEMPEST=True # Enable logging LOGFILE=/opt/stack/logs/stack.sh.log VERBOSE=True LOG_COLOR=True SCREEN_LOGDIR=/opt/stack/logs LOGDAYS=2 RECLONE=no disable_service horizon disable_service heat disable_service h-eng disable_service h-api disable_service h-api-cfn disable_service h-api-cw disable_service n-net enable_service neutron enable_service q-svc enable_service q-agt enable_service q-dhcp enable_service q-l3 enable_service q-meta enable_plugin manila git://git.openstack.org/openstack/manila enable_plugin devstack-plugin-ceph git://git.openstack.org/openstack/devstack-plugin-ceph ENABLE_CEPH_CINDER=False ENABLE_CEPH_GLANCE=False ENABLE_CEPH_C_BAK=False ENABLE_CEPH_NOVA=False ENABLE_CEPH_MANILA=True MANILA_CEPH_DRIVER=cephfsnfs EOF ``` * Run devstack ``` $./stack.sh ``` * If stack run is successful, then manila-services, Ceph servers, and NFS-Ganesha server should be up and running. ``` $ ps aux | grep manila $ sudo ceph -s $ systemctl status nfs-ganesha ``` * Set the ganesha server's IP address (the nova guest VM should be able to connect to this address) in the cephfsnfs1 driver section of manila.conf using the `cephfs_ganesha_server_ip' option. Now restart the manila share service. ``` [cephfsnfs1] cephfs_ganesha_server_ip = 172.24.4.3 share_driver = manila.share.drivers.cephfs.driver.CephFSDriver share_backend_name = CEPHFSNFS1 driver_handles_share_servers = False cephfs_protocol_helper_type = NFS cephfs_conf_path = /etc/ceph/ceph.conf cephfs_auth_id = manila ``` * Configure a share type that matches the CephFS/NFS-Ganesha backend capabilities. ``` manila type-create cephfsnfstype false manila type-key cephfsnfstype set vendor_name=Ceph storage_protocol=NFS ``` * Create a share. ``` manila create --share-type cephfsnfstype --name cephnfsshare1 nfs 1 ``` * Note the export location of the share: ``` manila share-export-location-list cephnfsshare1 ``` The export location of the share contains the IP address of the NFS-Ganesha server and the path to be mounted. It is of the form, ``{NFS-Ganesha server address}:{path to be mounted}`` * Allow access to a nova VM, which can connect to the ganesha server. ``` manila access-allow cephnfsshare1 ip 172.24.4.225 ``` * Try mounting the NFS share from the VM, IP 172.24.4.225 ``` sudo mount -t nfs 172.24.4.3:/volumes/_nogroup/6732900b-32c1-4816-a529-4d6d3f15811e /mnt/nfs/ ```