In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly shows you "how to add and delete OSD in ceph cluster", which is easy to understand and clear. I hope it can help you solve your doubts. Let me lead you to study and learn this article "how to add and delete OSD in ceph cluster".
The steps for adding Ceph OSD are as follows:
1. Create an OSD, that is, # ceph osd create [uuid] # if there is no uuid parameter, the command automatically generates a uuid. This command produces a new osd-number.
2. Create a default working directory for the new OSD, namely: # mkdir-p / var/lib/ceph/osd/ceph- {osd-number}
Prepare a disk for the new OSD.
# mkfs.xfs-f / dev/vde
# mount / dev/vde / var/lib/ceph/osd/ceph- {osd-number}
4. Initialize a new OSD working directory.
# ceph-osd-I {osd-number}-- mkfs-- mkkey
Note: the new OSD working directory must be empty before executing the above command
5. Register a new OSD authentication key
# ceph auth add osd. {osd-number} osd 'allow *' mon 'allow rwx'-I / var/lib/ceph/osd/ceph- {osd-number} / keyring
6. Add a new OSD to Crush Map.
# ceph osd crush add osd. {osd-number} {weight} [{bucketype} = {bucket-name}.}
This step can also add buckets and then osd, that is:
# ceph osd crush add-bucket node5 host # create a bucket named node5
# ceph osd crush move node5 root=default # put the created bucket under root
# ceph osd crush create-or-move osd. {osd-number} 1.0 root=default host=node5 # add a new OSD to the node5
7. Enter the new OSD information into the ceph.conf, that is:
[osd. {osd-number}]
Host = {hostname}
Devs = / dev/vde
8. Start a new OSD. That is:
# / etc/init.d/ceph start osd. {osd-number}
At this time, through the cluster status view command # ceph-s, you can see that the number of OSD and the number of up and in have changed. At this time, through the command # ceph-w, you can see that the ceph finally reaches the active+clean status after the peering status.
The steps for deleting Ceph OSD are as follows:
1. Change the status of the OSD to be deleted in the cluster to the status of out (previously the status of up+in in the cluster): # ceph osd out osd.3. At this time, the OSD to be deleted is still running in the cluster. Through the cluster status check command # ceph-s, you can see that the number of in in the current cluster is one less than the number of up, and the less one is the OSD that out just went out, that is, osd.3.
2. Stop the OSD process that has just left out: # / etc/init.d/ceph stop osd.3. At this point, through the cluster status view command # ceph-s, you can see that the number of in and up in the current cluster is the same, one less than before. You can also find that there is one less ceph-osd running in the system through ps ax | grep "ceph".
3. Delete the deleted OSD from the crush map:
# ceph osd crush remove osd.3 # Delete the specified OSD
# ceph osd crush remove node6 # Delete the bucket where the OSD is located (this step may not be done)
4. Clear the authentication key to OSD.
# ceph auth del osd.3
5. Clear OSD in OSD Map.
# ceph osd rm 3
From the ceph cluster status view command # ceph-s, you can see that the total number of osd at this time is correct.
6. Clear OSD from ceph.conf
[osd.3]
Host = {hostname}
The above is all the contents of the article "how to add and remove OSD in ceph Cluster". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.