Questo contenuto non è disponibile nella lingua selezionata.
Chapter 2. CephFS through NFS Installation
2.1. CephFS with NFS-Ganesha deployment Copia collegamentoCollegamento copiato negli appunti!
A typical Ceph file system (CephFS) through NFS installation in a Red Hat OpenStack Platform (RHOSP) environment includes the following configurations:
- OpenStack Controller nodes running containerized Ceph metadata server (MDS), Ceph monitor (MON), manila, and NFS-Ganesha services. Some of these services can coexist on the same node or can have one or more dedicated nodes.
- Ceph storage cluster with containerized object storage daemons (OSDs) running on Ceph storage nodes.
- An isolated StorageNFS network that provides access from projects to the NFS-Ganesha services for NFS share provisioning.
The Shared File Systems service (manila) with CephFS through NFS fully supports serving shares to Red Hat OpenShift Container Platform through Manila CSI. This solution is not intended for large scale deployments. For important recommendations, see https://access.redhat.com/articles/6667651.
The Shared File Systems service (manila) provides APIs that allow the projects to request file system shares, which are fulfilled by driver modules. The driver for Red Hat CephFS, manila.share.drivers.cephfs.driver.CephFSDriver, means that you can use the Shared File Systems service as a CephFS back end. RHOSP director configures the driver to deploy the NFS-Ganesha gateway so that the CephFS shares are presented through the NFS 4.1 protocol.
When you use RHOSP director to deploy the Shared File Systems service with a CephFS back end on the overcloud, director automatically creates the required storage network that is defined in the heat template. For more information about network planning, see Overcloud networks in the Director Installation and Usage guide.
Although you can manually configure the Shared File Systems service by editing its node /etc/manila/manila.conf file, RHOSP director can override any settings in future overcloud updates. The recommended method for configuring a Shared File Systems back end is through director.
Adding CephFS through NFS to an externally deployed Ceph cluster, which was not configured by Red Hat OpenStack Platform (RHOSP) director, is supported. Currently, only one CephFS back end can be defined in director. For more information, see Integrate with an existing Ceph Storage cluster in the Integrating an Overcloud with an Existing Red Hat Ceph Cluster guide.
2.1.1. Requirements Copia collegamentoCollegamento copiato negli appunti!
CephFS through NFS has been fully supported since Red Hat OpenStack Platform version (RHOSP) 13. The RHOSP Shared File Systems service with CephFS through NFS for RHOSP 16.0 and later is supported for use with Red Hat Ceph Storage version 4.1 or later. For more information about how to determine the version of Ceph Storage installed on your system, see Red Hat Ceph Storage releases and corresponding Ceph package versions.
Prerequisites
- You install the Shared File Systems service on Controller nodes, as is the default behavior.
- You install the NFS-Ganesha gateway service on Pacemaker cluster of the Controller node.
- You configure only a single instance of a CephFS back end to use the Shared File Systems service. You can use other non-CephFS back ends with the single CephFS back end.
- You use RHOSP director to create an extra network (StorageNFS) for the storage traffic.
2.1.3. Isolated network used by CephFS through NFS Copia collegamentoCollegamento copiato negli appunti!
CephFS through NFS deployments use an extra isolated network, StorageNFS. This network is deployed so users can mount shares over NFS on that network without accessing the Storage or Storage Management networks which are reserved for infrastructure traffic.
For more information about isolating networks, see Basic network isolation in the Director Installation and Usage guide.
2.2. Installing Red Hat OpenStack Platform (RHOSP) with CephFS through NFS and a custom network_data file Copia collegamentoCollegamento copiato negli appunti!
To install CephFS through NFS, complete the following procedures:
- Install the ceph-ansible package. See Section 2.2.1, “Installing the ceph-ansible package”
-
Generate the custom roles file,
roles_data.yaml, andnetwork_data.yamlfile. See Section 2.2.1.1, “Generating the custom roles file” -
Deploy Ceph, the Shared File Systems service (manila), and CephFS by using the
openstack overcloud deploycommand with custom roles and environments. See Section 2.2.2, “Deploying the updated environment” - Configure the isolated StorageNFS network and create the default share type. See Section 2.2.3, “Completing post-deployment configuration”
Examples use the standard stack user in the Red Hat Platform (RHOSP) environment.
Perform tasks as part of a RHOSP installation or environment update.
2.2.1. Installing the ceph-ansible package Copia collegamentoCollegamento copiato negli appunti!
Install the ceph-ansible package to be installed on an undercloud node to deploy containerized Ceph.
Procedure
-
Log in to an undercloud node as the
stackuser. Install the ceph-ansible package:
sudo dnf install -y ceph-ansible sudo dnf list ceph-ansible
[stack@undercloud-0 ~]$ sudo dnf install -y ceph-ansible [stack@undercloud-0 ~]$ sudo dnf list ceph-ansible ... Installed Packages ceph-ansible.noarch 4.0.23-1.el8cp @rhelosp-ceph-4-toolsCopy to Clipboard Copied! Toggle word wrap Toggle overflow
2.2.1.1. Generating the custom roles file Copia collegamentoCollegamento copiato negli appunti!
The ControllerStorageNFS custom role configures the isolated StorageNFS network. This role is similar to the default Controller.yaml role file with the addition of the StorageNFS network and the CephNfs service, indicated by the OS::TripleO::Services:CephNfs command.
For more information about the openstack overcloud roles generate command, see Roles in the Advanced Overcloud Customization guide.
The openstack overcloud roles generate command creates a custom roles_data.yaml file including the services specified after -o. In the following example, the roles_data.yaml file created has the services for ControllerStorageNfs, Compute, and CephStorage.
If you have an existing roles_data.yaml file, modify it to add ControllerStorageNfs, Compute, and CephStorage services to the configuration file. For more information, see Roles in the Advanced Overcloud Customization guide.
Procedure
-
Log in to an undercloud node as the
stackuser, Use the
openstack overcloud roles generatecommand to create theroles_data.yamlfile:openstack overcloud roles generate --roles-path /usr/share/openstack-tripleo-heat-templates/roles -o /home/stack/roles_data.yaml ControllerStorageNfs Compute CephStorage
[stack@undercloud ~]$ openstack overcloud roles generate --roles-path /usr/share/openstack-tripleo-heat-templates/roles -o /home/stack/roles_data.yaml ControllerStorageNfs Compute CephStorageCopy to Clipboard Copied! Toggle word wrap Toggle overflow
2.2.2. Deploying the updated environment Copia collegamentoCollegamento copiato negli appunti!
When you are ready to deploy your environment, use the openstack overcloud deploy command with the custom environments and roles required to run CephFS with NFS-Ganesha.
The overcloud deploy command has the following options in addition to other required options.
| Action | Option | Additional information |
|---|---|---|
|
Add the extra StorageNFS network with |
| Section 2.2.2.1, “StorageNFS and network_data_ganesha.yaml file” |
|
Add the custom roles defined in |
| |
|
Deploy the Ceph daemons with |
| Initiating Overcloud Deployment in the Deploying an Overcloud with Containerized Red Hat Ceph guide. |
|
Deploy the Ceph metadata server with |
| Initiating Overcloud Deployment in the Deploying an Overcloud with Containerized Red Hat Ceph guide |
| Deploy the Shared File Systems (manila) service with the CephFS through NFS back end. Configure NFS-Ganesha with director. |
|
The following example shows an openstack overcloud deploy command with options to deploy CephFS through NFS-Ganesha, Ceph cluster, Ceph MDS, and the isolated StorageNFS network:
For more information about the openstack overcloud deploy command, see Deployment command in the Director Installation and Usage guide.
2.2.2.1. StorageNFS and network_data_ganesha.yaml file Copia collegamentoCollegamento copiato negli appunti!
Use composable networks to define custom networks and assign them to any role. Instead of using the standard network_data.yaml file, you can configure the StorageNFS composable network with the network_data_ganesha.yaml file. Both of these roles are available in the /usr/share/openstack-tripleo-heat-templates directory.
The network_data_ganesha.yaml file contains an additional section that defines the isolated StorageNFS network. Although the default settings work for most installations, you must edit the YAML file to add your network settings, including the VLAN ID, subnet, and other settings.
For more information about composable networks, see Using Composable Networks in the Advanced Overcloud Customization guide.
2.2.2.2. The CephFS back-end environment file Copia collegamentoCollegamento copiato negli appunti!
The integrated environment file for defining a CephFS back end, manila-cephfsganesha-config.yaml, is located in /usr/share/openstack-tripleo-heat-templates/environments/.
The manila-cephfsganesha-config.yaml environment file contains settings relevant to the deployment of the Shared File Systems service (manila). The back-end default settings work for most environments. The following example shows the default values that director uses during deployment of the Shared File Systems service:
The parameter_defaults header signifies the start of the configuration. In this section, you can edit settings to override default values set in resource_registry. This includes values set by OS::Tripleo::Services::ManilaBackendCephFs, which sets defaults for a CephFS back end.
- 1
ManilaCephFSBackendNamesets the name of the manila configuration of your CephFS back end. In this case, the default back-end name iscephfs.- 2
ManilaCephFSDriverHandlesShareServerscontrols the lifecycle of the share server. When set tofalse, the driver does not handle the lifecycle. This is the only supported option.- 3
ManilaCephFSCephFSAuthIddefines the Ceph auth ID that director creates for themanilaservice to access the Ceph cluster.- 4
ManilaCephFSCephFSEnableSnapshotscontrols snapshot activation. Thefalsevalue indicates that snapshots are not enabled. This feature is currently not supported.
For more information about environment files, see Environment Files in the Director Installation and Usage guide.
2.2.3. Completing post-deployment configuration Copia collegamentoCollegamento copiato negli appunti!
You must complete two post-deployment configuration tasks before you create NFS shares, grant user access, and mount NFS shares.
- Map the Networking service (neutron) StorageNFS network to the isolated data center Storage NFS network.
- Create the default share type.
After you complete these steps, the tenant compute instances can create, allow access to, and mount NFS shares.
2.2.3.1. Creating the storage provider network Copia collegamentoCollegamento copiato negli appunti!
You must map the new isolated StorageNFS network to a Networking (neutron) provider network. The Compute VMs attach to the network to access share export locations that are provided by the NFS-Ganesha gateway.
For information about network security with the Shared File Systems service, see Hardening the Shared File Systems Service in the Security and Hardening Guide.
Procedure
The openstack network create command defines the configuration for the StorageNFS neutron network.
From an undercloud node, enter the following command:
source ~/overcloudrc
[stack@undercloud ~]$ source ~/overcloudrcCopy to Clipboard Copied! Toggle word wrap Toggle overflow On an undercloud node, create the StorageNFS network:
openstack network create StorageNFS --share --provider-network-type vlan --provider-physical-network datacentre --provider-segment 70
(overcloud) [stack@undercloud-0 ~]$ openstack network create StorageNFS --share --provider-network-type vlan --provider-physical-network datacentre --provider-segment 70Copy to Clipboard Copied! Toggle word wrap Toggle overflow You can enter this command with the following options:
-
For the
--provider-physical-networkoption, use the default valuedatacentre, unless you set another tag for the br-isolated bridge through NeutronBridgeMappings in your tripleo-heat-templates. -
For the
--provider-segmentoption, use the VLAN value set for the StorageNFS isolated network in the heat template,/usr/share/openstack-tripleo-heat-templates/network_data_ganesha.yaml. This value is 70, unless the deployer modified the isolated network definitions. -
For the
--provider-network-typeoption, use the valuevlan.
-
For the
2.2.3.2. Configuring the shared provider StorageNFS network Copia collegamentoCollegamento copiato negli appunti!
Create a corresponding StorageNFSSubnet on the neutron-shared provider network. Ensure that the subnet is the same as the storage_nfs network definition in the network_data.yml file and ensure that the allocation range for the StorageNFS subnet and the corresponding undercloud subnet do not overlap. No gateway is required because the StorageNFS subnet is dedicated to serving NFS shares.
Prerequisites
- The start and ending IP range for the allocation pool.
- The subnet IP range.