Configuring a private network

Network configuration settings are not required. Ceph assumes a public network with all hosts operating on it, unless you specifically configure a cluster network, also known as a private network.

If you create a cluster network, OSDs routes heartbeat, object replication, and recovery traffic over the cluster network. This can improve performance, compared to using a single network.
Important: For added security, the cluster network should not be reachable from the public network or the Internet.

To assign a cluster network, use the --cluster-network option with the cephadm bootstrap command. The cluster network that you specify must define a subnet in CIDR notation (for example, 10.90.90.0/24 or fe80::/64).

You can also configure the cluster_network after bootstrap.

For more information about invoking cephadm bootstrap, see Bootstrapping a new storage cluster.

Before you begin

Before you begin, make sure that you have the following prerequisites in place:
  • Access to the Ceph software repository.
  • Root-level access to all nodes in the storage cluster.

Procedure

  1. Run the cephadm bootstrap command from the initial node that you want to use as the Monitor node in the storage cluster. Include the --cluster-network option in the command.

    cephadm bootstrap --mon-ip IP-ADDRESS --registry-url registry.redhat.io --registry-username USER_NAME --registry-password PASSWORD --cluster-network NETWORK-IP-ADDRESS

    For example,

    [root@host01 ~]# cephadm bootstrap --mon-ip 10.10.128.68 --registry-url registry.redhat.io --registry-username myuser1 --registry-password mypassword1 --cluster-network 10.10.0.0/24
  2. To configure the cluster_network after bootstrap, run the config set command and redeploy the daemons
    1. Log in to the cephadm shell.

      For example,

      [root@host01 ~]# cephadm shell
    2. Configure the cluster network with the subnet.
      ceph config set global cluster_network IP_ADDRESS_WITH_SUBNET

      For example,

      [ceph: root@host01 /]# ceph config set global cluster_network 10.10.0.0/24
    3. Get the list of services in the storage cluster, by running the ceph orch ls command.

      For example,f

      [ceph: root@host01 /]# ceph orch ls
    4. Restart the daemons. Ceph daemons bind dynamically, so you do not have to restart the entire cluster at once if you change the network configuration for a specific daemon.

      For example,

      [ceph: root@host01 /]# ceph orch restart mon
    5. If you want to restart the cluster, on the admin node as a root user, run systemctl restart command.
      systemctl restart ceph-FSID_OF_CLUSTER.target

      For example,

      [root@host01 ~]# systemctl restart ceph-1ca9f6a8-d036-11ec-8263-fa163ee967ad.target