In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
Editor to share with you the ceph Jewel OSD process startup process example analysis, I believe that most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to know it!
OSD::main ()
| | _ ObjectStore::create () |
| | _ _ call the FileStore constructor to create a FileStore class object |
| | _ _ MonClient::build_initial_monmap () reads monitor map information from the configuration file |
| | _ OSD::mkfs () |
| | _ FileStore::mkfs () |
| | _ _ generate fsid file under / var/lib/ceph/osd/ceph-$ {id} / directory |
| | _ _ create a version_stamp file under / var/lib/ceph/osd/ceph-$ {id} / directory |
| | _ _ create a superblock file under / var/lib/ceph/osd/ceph-$ {id} / directory |
| | _ _ create a current folder under / var/lib/ceph/osd/ceph-$ {id} / directory |
| | _ _ create a commit_op_seq file in the / var/lib/ceph/osd/ceph-$ {id} / current/ directory and initialize the content of the file as 1 |
| | _ _ create an osd_uuid file under / var/lib/ceph/osd/ceph-$ {id} / current/omap/ directory (current/omap directory is the working directory of OSD omap) |
| | _ FileStore::mkjournal () |
| | _ FileStore::new_journal () |
| | _ _ FileJournal () constructor to create a FileJournal instance |
| | _ _ create a type file under / var/lib/ceph/osd/ceph-$ {id} / directory and write filestore to the file |
| | _ FileStore::mount () |
| | _ FileStore::read_fsid () |
| | _ _ FileStore::version_stamp_is_valid () checks whether the version_stmap file is valid and reads the contents of the file |
| | _ _ FileStore::read_superblock () reads the contents of the superblock file |
| | _ _ create a nosnap file under / var/lib/ceph/osd/ceph-$ {id} / current/ directory |
| | _ _ take the / var/lib/ceph/osd/ceph-$ {id} / current/omap directory as the base directory of omap_store, and call KeyValueDB::create () to create a KeyValueDB instance |
| | _ _ FileStore::new_journal () creates a journal |
| | _ _ JournalingObjectStore::journal_start () starts journal |
| | _ _ start ondisk_finishers and apply_ finishers thread pool |
| | _ _ FileStore::read () reads superblock object information from "meta" and saves it to OSDSuperblock class object |
| | _ _ compare whether the cluster_fsid in superblock is valid |
| | _ _ OSD::write_meta () writes magic/whoami/ceph_fsid/ready information to the corresponding file under / var/lib/ceph/osd/ceph-$ {id} / directory |
| | _ _ for creating a key, use EntityAuth.CryptoKey to create a key and add the newly created key to the keyring, and also write the keyring to the keyring file under / var/lib/ceph/osd/ceph-$ {id} / directory |
| | _ _ for creating a journal, call the FileStore::mkjournal () function to create a journal |
| | _ _ OSD::peek_meta () reads magic/cluster_fsid/osd_fsid/whoami information from the corresponding file under / var/lib/ceph/osd/ceph-$ {id} / directory |
| | _ _ pick_addresses () reads public_addr and cluster_ addr values from the configuration file |
| _ _ create an instance of Messenger class of client/cluster/hbclient/hb_back_server/hb_front_server. Generally speaking, client and hb_front_server use public_addr,cluster/hbclient/hb_back_server and cluster_addr.
| | _ _ MonClient::build_initial_monmap () creates a MonMap from the configuration file |
| | _ _ call the OSD class constructor to create an OSD class object |
| | _ OSD::pre_init () |
| | _ _ start the Messenger class instance of client/cluster/hbclient/hb_back_server/hb_front_server |
| | _ OSD::init () |
| | _ _ tick_timer.init () initializes heartbeat timer |
| | _ _ OSDService.backill_request_timer.init () initializes the backfill request timer |
| | _ _ ObjectStore::mount () mounts the file system |
| | _ _ OSD::read_superblock () reads the superblock information from the cluster and saves it to the OSDSuperblock class object |
| | _ _ make sure that the snapmapper object exists in "meta" |
| | _ _ create ClassHandler class instance |
| | _ _ get_map () gets the osdmap based on the current epoch value recorded in the superblock. If the osdmap is not in the map_cache, the osdmap is read from the osdmap.epoch of "meta" and synchronized to the map_cache. |
| | _ _ OSD::load_pgs () reads all pg information on OSD |
| | _ _ FileStore::list_collections () traverses all directories under the / var/lib/ceph/osd/ceph-$ {id} / current/ directory and only TYPE_PG |
| | _ _ coll_t.parse () parses all directories under the / var/lib/ceph/osd/ceph-$ {id} / current/ directory, and meta corresponds to TYPE_META,_head and TYPE_PG,_TEMP corresponds to TYPE_TEMP |
| | _ _ traverses all TYPE_PG |
| | _ _ call PG::peek_map_epoch () function |
| | _ OSD::_open_lock_pg () |
| | _ _ OSD::_make_pg () creates an instance of ReplicatedPG class |
| | _ _ PG::read_state () reads the status of PG |
| | _ _ PG::read_info () reads the value of the _ infover/_info/_biginfo attribute from omap |
| | _ _ PGLog::read_log () reads PGLog information and obtains missing information based on PGLog information |
| | _ _ OSDMap::pg_to_up_acting_osds () calculates the OSDs corresponding to the PG |
| | _ _ PG::init_primary_up_acting () the OSDs corresponding to the PG |
| | _ _ OSDMap::calc_pg_role () calculates the roles of PG |
| | _ PG::set_role () |
| | _ _ PG::reg_next_scrub () registers the next scrub operation |
| | _ OSD::build_past_intervals_parallel () |
| | _ _ OSD::create_logger () creates an OSD logger |
| | _ _ MonClient::init () initializes MonClient class instance |
| | _ _ start osd_tp/osd_op_tp/recovery_tp/disk_tp/command_ TP thread pool |
| | _ _ OSDService::init () initializes OSDService |
| | _ _ MonClient::authenticate () does Monitor authentication |
| | _ _ OSD::update_crush_location () OSD updates crushmap operation after startup. You can set osd_crush_update_on_start = false in the configuration file to prohibit updating crushmap after OSD starts. |
| | _ OSDService::final_init () |
| | _ OSD::consume_map () |
| | _ OSD::start_boot () |
| | _ OSD::finial_init () |
| | _ _ registers a series of commands that operate through socket |
The above is all the contents of the article "sample Analysis of Jewel OSD process startup process in ceph". 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.