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.
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
-
Run the
cephadm bootstrap commandfrom the initial node that you want to use as the Monitor node in the storage cluster. Include the--cluster-networkoption 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-ADDRESSFor 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
-
To configure the
cluster_networkafter bootstrap, run theconfig setcommand and redeploy the daemons- Log in to the
cephadmshell.For example,
[root@host01 ~]# cephadm shell
- Configure the cluster network with the subnet.
ceph config set global cluster_network IP_ADDRESS_WITH_SUBNETFor example,
[ceph: root@host01 /]# ceph config set global cluster_network 10.10.0.0/24
- 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
- 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
- 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.targetFor example,
[root@host01 ~]# systemctl restart ceph-1ca9f6a8-d036-11ec-8263-fa163ee967ad.target
- Log in to the