Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How vm-centos7 installs ceph-deploy multi-node deployment ceph

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article is about how vm-centos7 installs ceph-deploy multi-node deployment ceph. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Four newly built Vmware virtual machines are used for experiments, mainly in order to have an intuitive understanding of ceph.

First, prepare 5 hosts

IP address hostname (Hostname)

192.168.xxx.xxx admin-node (this host is used for management, and subsequent ceph-deploy tools operate on this host)

192.168.xxx.xxx node1 (monitoring node)

192.168.xxx.xxx node2 (osd.0 node)

192.168.xxx.xxx node3 (osd.1 node)

Install the centos7 operating system on the virtual machine

Modify the source of the update centos7

Chinese Science and Technology Dayuan: 1. Base source 2.ceph source

Third, configure your management host so that it can access each node without a password through SSH, leaving the password blank. Generate SSH key pair and execute ssh-keygen command

Copy the public key to each node:: ssh-copy-id root@ceph-server use root users directly here, and use the root account to avoid a lot of permission problems.

4. After installing the above source in the ceph-deploy,centos7 system, execute yum install ceph-deploy to install it

5. $mkdir my-cluster $cd my-cluster

6. Ceph-deploy new monitorNode1, monitorNode2

[nodes that need to establish monitor before new] after executing this command, the ceph.conf file will be produced in the current directory

7. Use ceph-deploy to install ceph for each node

$ceph-deploy install cephAdmin,node1,node2,node3

Configure the initial monitor (s) and collect all keys:

$ceph-deploy mon create-initial

After completing the above operation, these key rings should appear in the current directory:

{cluster-name} .client.admin.keyring

{cluster-name}. Bootstrap-osd.keyring

{cluster-name}. Bootstrap-mds.keyring

{cluster-name} .bootstrap-rgw.keyring (this file is only available in Hammer version or later)

9. Add two OSD

$ssh node2 $mkdir / var/local/osd0 $exit

$ssh node3 $mkdir / var/local/osd1 $exit

Execute ceph-deploy from the management node to prepare the OSD

$ceph-deploy osd prepare node2:/var/local/osd0 node3:/var/local/osd1

Activate OSD

$ceph-deploy osd activate node2:/var/local/osd0 node3:/var/local/osd1

Note: if there is a connection timeout during activation and cannot be activated normally, the firewall of each node needs to be turned off.

$systemctl staus firewalld $systemctl stop firewalld $setenforce 0

When a permission error occurs: ERROR: error creating empty object store in / var/local/osd1: (13) Permission denied, permission operation à $chmod-R 777 / var/local/osd1/ is required

]

Use ceph-deploy to copy the configuration file and admin key to the management node and Ceph node, so that you do not need to specify the monitor address and ceph.client.admin.keyring every time you execute the Ceph command line.

$ceph-deploy admin admin-node node1 node2 node3 13. After two osd are deployed, perform a health query: $ceph health will appear HEALTH_WARN 64 pgs degraded; 64 pgs stuck unclean; 64 pgs undersized. This health warning indicates that osd is unbalanced. Solution: 1. Expand the cluster and add another osd. $ssh node1 $mkdir / var/local/osd2 $exit $ceph-deploy osd prepare node1:/var/local/osd2 $ceph-deploy osd activate node1:/var/local/osd22, change the default number of copies in the Ceph configuration file from 3 to 2, so that only two OSD can reach the active + clean state. Add the following line to the [global] paragraph: osd pool default size = 214. Finally, if you execute ceph health, you will get HEALTH_OK. Thank you for reading! This is the end of the article on "how to install ceph-deploy multi-node deployment ceph in vm-centos7". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report