A multi-site environment building method and device, switch and server

By using the preset IP addresses provided by the switch, users can operate all sites on a single multi-site management interface, which solves the problem of complicated multi-site environment setup and management in existing technologies, and simplifies the process and improves the user experience.

CN116668471BActive Publication Date: 2025-12-12JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310782104.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-29
Publication Date
2025-12-12
Estimated Expiration
2043-06-29

AI Technical Summary

Technical Problem

The existing multi-site environment setup and management is complicated, requiring users to frequently switch between different site management interfaces, which wastes time and results in a poor user experience.

Method used

Using the preset IP addresses provided by the switch, users can operate all sites on a single multi-site management interface, simplifying the configuration process for master and slave sites. This includes creating management interface IPs for the master and slave sites as preset switch IPs, generating periodic versions, and submitting them.

Benefits of technology

It simplifies the setup and management process of multi-site environments, saves users time, improves user experience, and avoids the need to switch between different site management interfaces.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116668471B_ABST
    Figure CN116668471B_ABST
Patent Text Reader

Abstract

The application discloses a multi-site environment building method and device, a switch and a server, relates to the technical field of distributed object storage, and is applied to the switch and comprises the following steps: acquiring a main site building instruction triggered by a multi-site management interface corresponding to a preset switch IP; interacting with a first target site corresponding to the main site building instruction, and configuring the first target site as a main site in a field; wherein the management interface IP of the main site is the preset switch IP; according to the acquired field slave site building instruction triggered by the multi-site management interface, interacting with a second target site, and respectively configuring each second target site as a slave site in the field; the preset switch IP provided by the switch connected with each site is utilized, and a multi-site environment can be built only through one preset switch IP, so that the operation process of building and subsequent management of the multi-site environment is simplified, user time is saved, and user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of distributed object storage, and particularly relates to a multi-site environment building method and device, a switch and a server. BACKGROUND

[0002] In the existing distributed object storage system, although the functions of data synchronization between clusters and master-slave site switching in a multi-site environment have been realized, the availability and storage efficiency of the object storage system are greatly improved, and the disaster recovery capability of the object storage system is further improved through the function of master-slave site switching; however, the existing multi-site environment building and management and maintenance require the user to switch to the management interfaces of different sites for operation, which is complicated and time-consuming, and is not conducive to user experience.

[0003] Therefore, how to simplify the operation process of multi-site environment building and management, save user time and improve user experience is a problem that needs to be solved urgently at present. SUMMARY

[0004] The purpose of the present application is to provide a multi-site environment building method and device, a switch and a server, to simplify the operation process of multi-site environment building and management, save user time and improve user experience.

[0005] To solve the above technical problems, the present application provides a multi-site environment building method applied to a switch, comprising:

[0006] obtaining a master site building instruction triggered by a multi-site management interface corresponding to a preset switch IP;

[0007] interacting with a first target site corresponding to the master site building instruction, and configuring the first target site as a master site in a domain; wherein the management interface IP of the master site is the preset switch IP, the first target site is any site, and each site is a distributed object storage cluster connected with the switch;

[0008] According to the obtained slave site building instruction of the domain triggered by the multi-site management interface, interacting with a second target site, and configuring each second target site as a slave site in the domain; wherein the second target site is one or more sites corresponding to the slave site building instruction, and the management interface IP of each slave master site is the preset switch IP.

[0009] In some embodiments, the interacting with the first target site corresponding to the master site building instruction and configuring the first target site as a master site in a domain comprises:

[0010] interacting with the first target site through a secure shell protocol, and configuring the first target site as the master site in the domain.

[0011] In some embodiments, the interacting with the first target site corresponding to the master site building instruction to configure the first target site as the master site in the domain comprises:

[0012] interacting with the first target site to control the first target site to create the domain, the area group and the area in the domain, the administrator user, and the synchronization IP, configure the management interface IP of the first target site as the preset switch IP, and generate and submit a new cycle version; the administrator user is bound in the area of the first target site.

[0013] Correspondingly, the interacting with the second target site according to the obtained multi-site management interface triggered domain slave site building instruction to configure each second target site as a slave site in the domain comprises:

[0014] According to the master area group slave site building instruction, interacting with the current second target site to control the current second target site to create the area in the master area group and the synchronization IP, bind the administrator user and the synchronization IP of the first target site in the area of the current second target site, configure the management interface IP of the current second target site as the preset switch IP, generate and submit a new cycle version; the master area group slave site building instruction is the slave site building instruction of the master area group in the domain, the master area group is the area group corresponding to the first target site, and the current second target site is one or more sites corresponding to the master area group slave site building instruction.

[0015] In some embodiments, after the interacting with the second target site according to the obtained multi-site management interface triggered domain slave site building instruction to configure each second target site as a slave site in the domain, the method further comprises:

[0016] obtaining the management instruction of the domain triggered by the multi-site management interface;

[0017] According to the management instruction, controlling the target site corresponding to the management instruction to perform a corresponding management operation; the target site is the master site and / or the slave site.

[0018] In some embodiments, when the management instruction is a master-slave switching instruction, the controlling the target site corresponding to the management instruction to perform a corresponding management operation according to the management instruction comprises:

[0019] Interact with a switch master site corresponding to the master-slave switch instruction, control the switch master site to adjust the master area identification information in a target area to identification information of the switch master site, unbind the synchronization IP of the first target site in the target area, and generate and submit a new cycle version; wherein the switch master site is a slave site corresponding to the master-slave switch instruction, and the target area is an area corresponding to the switch master site.

[0020] The application further provides a multi-site environment building device applied to a switch, comprising:

[0021] The building obtaining module is configured to obtain a master site building instruction triggered by a multi-site management interface corresponding to a preset switch IP.

[0022] The master site building module is configured to interact with a first target site corresponding to the master site building instruction, and configure the first target site as a master site in a domain; wherein the management interface IP of the master site is the preset switch IP, and the first target site is any site, and each site is a distributed object storage cluster connected with the switch.

[0023] The slave site building module is configured to interact with a second target site according to a slave site building instruction of the domain triggered by the multi-site management interface, and configure each second target site as a slave site in the domain; wherein the second target site is one or more sites corresponding to the slave site building instruction, and the management interface IP of each slave master site is the preset switch IP.

[0024] The application further provides a multi-site environment building method applied to a site, comprising:

[0025] The site building instruction of the domain sent by the switch is obtained; wherein the site building instruction is an instruction triggered by a multi-site management interface corresponding to a preset switch IP, the site building instruction is a master site building instruction or a slave site building instruction, and the site is a distributed object storage cluster connected with the switch.

[0026] If the site building instruction is the master site building instruction, the master site of the domain is configured according to the master site building instruction.

[0027] If the site building instruction is the master site building instruction, the slave site of the domain is configured according to the master site building instruction.

[0028] The application further provides a multi-site environment building device applied to a site, comprising:

[0029] The instruction obtaining module is configured to obtain site building instructions of a domain sent by a switch; wherein the site building instructions are instructions triggered by a multi-site management interface corresponding to a preset switch IP, the site building instructions are main site building instructions or slave site building instructions, and the site is a distributed object storage cluster connected with the switch;

[0030] The main site configuration module is configured to, if the site building instructions are the main site building instructions, configure a main site of the domain according to the main site building instructions.

[0031] The slave site configuration module is configured to, if the site building instructions are the main site building instructions, configure a slave site of the domain according to the main site building instructions.

[0032] The application further provides a switch, comprising:

[0033] A memory is configured to store a computer program.

[0034] A processor is configured to implement the steps of the multi-site environment building method applied to a switch when executing the computer program.

[0035] In addition, the application further provides a server, comprising:

[0036] A memory is configured to store a computer program.

[0037] A processor is configured to implement the steps of the multi-site environment building method applied to a site when executing the computer program.

[0038] The multi-site environment building method provided by the application is applied to a switch and comprises the following steps: obtaining main site building instructions triggered by a multi-site management interface corresponding to a preset switch IP; interacting with a first target site corresponding to the main site building instructions, and configuring the first target site as a main site in a domain; wherein the management interface IP of the main site is the preset switch IP, the first target site is any site, and each site is a distributed object storage cluster connected with the switch; interacting with second target sites according to slave site building instructions of the domain triggered by the obtained multi-site management interface, and configuring each second target site as a slave site in the domain; wherein the second target sites are one or more sites corresponding to the slave site building instructions, and the management interface IP of each slave site is the preset switch IP.

[0039] It can be seen that the preset switch IP provided by the switch connected with each site enables the user to operate all sites through a multi-site management interface, and a multi-site environment can be built through only one preset switch IP, thereby avoiding the switching login process of the management interfaces of different sites, simplifying the operation process of building and subsequent management of the multi-site environment, saving the user time, and improving the user experience. In addition, the application also provides a multi-site environment building device applied to a switch, a multi-site environment building method and device applied to a site, a switch and a server, which also have the beneficial effects described above. BRIEF DESCRIPTION OF DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of the provided drawings.

[0041] Figure 1 It is a structural schematic diagram of a multi-site environment;

[0042] Figure 2 It is a flowchart of a multi-site environment building method applied to a switch provided by the embodiment of the present application;

[0043] Figure 3 It is a structural schematic diagram of a multi-site environment provided by the embodiment of the present application;

[0044] Figure 4 It is a flowchart of a management process of another multi-site environment building method provided by the embodiment of the present application;

[0045] Figure 5 It is a flowchart of a multi-site environment building method applied to a site provided by the embodiment of the present application;

[0046] Figure 6 It is a structural block diagram of a multi-site environment building device applied to a switch provided by the embodiment of the present application;

[0047] Figure 7 It is a structural block diagram of a multi-site environment building device applied to a site provided by the embodiment of the present application;

[0048] Figure 8 It is a structural schematic diagram of a switch provided by the embodiment of the present application;

[0049] Figure 9 It is a structural schematic diagram of a server provided by the embodiment of the present application;

[0050] Figure 10 A structural schematic diagram of a computer readable storage medium provided by an embodiment of the present application. DETAILED DESCRIPTION

[0051] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0052] At present, since each site is configured with a separate set of cluster management interfaces, the existing multi-site environment needs to be logged into the corresponding cluster management interface for operation and maintenance; for example, if master-slave site switching is to be performed, the slave site to be switched to the master site needs to be logged into first, and then the slave site is switched to the master site. Users cannot operate and manage multiple site clusters in one interface, and need to frequently switch different site cluster management interfaces for operation, which is complicated and time-consuming.

[0053] For example, assuming there are two clusters (i.e. sites): cluster A and cluster B, if it is required to combine the two sites to build a multi-site environment, and cluster A is taken as the master site and cluster B is taken as the slave site, the prior art building process is as follows: first, log in to cluster A, create a realm, a zone group, a zone and an admin user, bind the admin user to the current zone, then generate a new period version and submit; start the gateway and sync gateway of cluster A, then set the sync IP that can be synchronized on cluster A, and generate a new period version and submit. Then, cluster B needs to be added to the master site cluster A, and the specific steps are as follows: first, log in to the environment of cluster B, at this time, the slave site does not need to create a realm and a zone group, only a new zone needs to be created, and the admin user in cluster A is bound to the zone of the slave site, and the sync IP set by the master site is added to the zone information of the slave site cluster B; at this time, cluster B has been added to cluster A and serves as a slave site in the multi-site cluster, and finally, the endpoint (at this time, the IP of the slave site itself) for synchronization needs to be set on the slave site cluster B, and finally, the gateway and sync gateway of cluster B are started; the two-site environment is built successfully, if a new site needs to be added, the steps of cluster B are repeated; since each site has a separate management interface, as described above, N sites have N cluster management interfaces, and the building and maintenance of the multi-site environment of N sites need to be logged in separately. Figure 1

[0054] In order to simplify the building and subsequent management operation process of the multi-site environment, and to avoid the separate login process of switching different site management interfaces, an embodiment of the present application provides a multi-site environment building method. Specifically, please refer to Figure 2 Figure 2 A flowchart of a multi-site environment building method provided by an embodiment of the present application. The method is applied to a switch and can include the following steps:

[0055] Step 101: Obtain the master site building instruction triggered by the multi-site management interface corresponding to the preset switch IP.

[0056] ​​It can be understood that the switch in the embodiment can be connected with a storage cluster (i.e. a site) in a distributed object storage system, for example, the network interfaces of all sites that need to build a multi-site environment can access a switch, and all sites can be accessed through the switch. The preset switch IP in the embodiment can be an IP (Internet Protocol) address of a multi-site management interface provided by the switch to the outside, that is, all sites can be operated through the preset switch IP; for example Figure 3 As shown in FIG. 13, the network interfaces of N sites (nodes) can be connected to the switch node, and a super management node IP (i.e. the preset switch IP) provided by the switch to the outside can be used to operate and manage the N sites. The multi-site management interface in the embodiment can be an interface provided by the switch to the outside for building and managing a multi-site environment, that is, a user can log in to the multi-site management interface through the preset switch IP to manage the multi-site environment corresponding to the sites connected to the switch.

[0057] Correspondingly, the master site building instruction in the embodiment can be an instruction for building a master site in a multi-site environment, that is, an instruction for building a master site of a realm. The realm can be a namespace composed of multiple zone groups; the realm is designed only to maintain a global namespace, that is, to avoid name conflicts, and each multi-site environment can correspond to a realm. The number of multi-site environments (i.e. the number of realms) corresponding to the multi-site management interface in the embodiment can be 1; it can also be a value greater than or equal to 2, and the embodiment does not limit this.

[0058] The zone group (region group, or region group) is composed of multiple zones, and the zones in a zone group can automatically synchronize data (data) and meta (meta), so that data disaster recovery and backup can be realized by using this function, and active-active and active-passive modes are supported. The zone is equivalent to defining a logical group for the RGW (RADOS Gateway, object storage gateway), and an actual pool (storage pool) is added to a namespace through the zone, and different zones can be created in the same storage cluster (storage cluster) without name conflicts.

[0059] It should be noted that in the embodiment, the user can log in to the multi-site management interface through the preset switch IP, so as to operate the construction instruction of the master site (i.e., the master site construction instruction) when triggering the construction of the multi-site environment in the multi-site management interface, so that the switch can obtain the master site construction instruction and complete the construction of the master site of the multi-site environment. For the specific manner in which the processor of the switch obtains the master site construction instruction triggered by the multi-site management interface corresponding to the preset switch IP, i.e., the specific configuration of the multi-site management interface, the designer can set it according to the practical scene and user demand, for example, the user can select a site in the multi-site management interface and click the master site construction button in the interface to trigger the master site construction instruction; that is, the processor of the switch can generate the master site construction instruction according to the click information of the master site construction button in the multi-site management interface.

[0060] Step 102: Interact with the first target site corresponding to the master site construction instruction, and configure the first target site as the master site in the field; wherein the management interface IP of the master site is the preset switch IP, and the first target site is any site, and each site is a distributed object storage cluster connected to the switch.

[0061] It can be understood that in this step, after obtaining the master site construction instruction, the switch can interact with a site (i.e., the first target site) corresponding to the master site construction instruction among the sites connected to the switch, and configure the first target site as the master site in the field, i.e., the master site in the multi-site environment to be constructed. Among them, the sites connected to the switch can be storage clusters (i.e., distributed object storage clusters) in the distributed object storage system; for example, the network interface of all or part of the servers in each storage cluster can be connected to the switch, so that the switch can communicate with each storage cluster in a wired manner.

[0062] Correspondingly, for the specific manner in which the switch interacts with the first target site corresponding to the master site construction instruction in this step, the designer can set it according to the practical scene and user demand, for example, the switch can use the connection with the first target site to interact with the first target site through SSH (Secure Shell, Secure Shell protocol); that is, the processor can interact with the first target site through the secure shell protocol to configure the first target site as the master site in the field. The switch can also use the connection with the first target site to interact with the first target site through other communication protocols. The present embodiment does not make any limitation in this regard.

[0063] Correspondingly, the specific process of configuring the first target site as the master site in the domain by interacting with the first target site corresponding to the switch and the master site building instruction in this step can be set by the designer according to the practical scene and user demand, for example, the same or similar implementation as the master site building method in the prior art can be used; for example, the switch can interact with the first target site in this step, control the first target site to create a domain, a zone group and a zone in the domain, an administrator user and a synchronization IP, configure the management interface IP of the first target site as a preset switch IP, generate and submit a new period version; wherein the administrator user is bound in the zone of the first target site.

[0064] That is, the switch can control the first target site to set up the necessary information for building the master site by interacting with the first target site, such as creating realm, zone group, zone and admin user, binding the admin user (i.e. administrator user) with the zone created at present, creating synchronization IP, configuring the management interface IP of the first target site as a preset switch IP, and generating and submitting a new period version. Wherein each realm can correspond to a period (period), the period corresponds to the status of all zone groups and zones in the realm, and any element needs to submit the corresponding version of the period when it changes, so as to synchronize and update the status of all zone groups and zones in the realm.

[0065] Correspondingly, the switch can control the first target site to bind the ak (AccessKey ID, Access Key ID) and sk (Secret Access Key, Secret Access Key) of the admin user created by the first target site to the created zone, so that the admin user created by the first target site is bound together with the created zone, that is, the admin user created by the first target site is bound in the zone of the first target site.

[0066] For example, assuming that the switch is connected with the A cluster and the B cluster, if it is required to combine the two site groups to build a multi-site environment, and the A cluster is taken as the master site and the B cluster is taken as the slave site; the user can log in the multi-site management interface through the preset switch IP, and select the A cluster to trigger the master site building instruction; the switch can interact with the servers in the A cluster through SSH according to the master site building instruction, create the realm, the zone group, the zone and the admin user on the A cluster, bind the admin user with the current zone, set the synchronization IP which can be synchronized on the A cluster, and configure the management interface IP of the A cluster as the preset switch IP, so as to complete the building of the master site in the multi-site environment.

[0067] Step 103: According to the slave site building instruction of the realm triggered by the multi-site management interface, interact with the second target sites, and respectively configure each second target site as a slave site in the realm; wherein the second target sites are one or more sites corresponding to the slave site building instruction, and the management interface IP of each slave site is the preset switch IP.

[0068] It can be understood that in the embodiment, the user can trigger the slave site building instruction of the multi-site environment through the multi-site management interface after the master site of the multi-site environment is built. That is, the user can select the sites (i.e. the second target sites) connected with the switch except the first target site after the master site of the multi-site environment is built, trigger the slave site building instruction of the multi-site environment, i.e. the slave site building instruction of the realm corresponding to the zone of the first target site, so that the switch can complete the building of the corresponding slave site in the multi-site environment.

[0069] That is, the switch can obtain the slave site building instruction of the realm corresponding to the zone of the first target site triggered by the multi-site management interface before this step. In this step, the switch can interact with one or more sites (i.e. the second target sites) corresponding to the slave site building instruction among the sites connected with the switch after obtaining the slave site building instruction, and respectively configure each second target site as a slave site in the realm.

[0070] Correspondingly, for the interaction with the second target station in this step, the specific process of configuring each second target station as a slave station in the field can be set by the designer according to the practical scene and user demand, such as using the same or similar implementation as the slave station building method in the prior art; for example, when building slave stations in the area group (i.e. the main area group) where the master station is located, the switch can interact with the current second target station according to the slave station building instruction of the main area group, control the current second target station to create an area in the main area group and synchronize the IP, bind the administrator user and the synchronization IP of the first target station in the area of the current second target station, configure the management interface IP of the current second target station as the preset switch IP, and generate and submit a new period version; wherein the slave station building instruction of the main area group is the slave station building instruction of the main area group in the field, the main area group is the area group corresponding to the first target station, and the current second target station is one or more stations corresponding to the slave station building instruction of the main area group.

[0071] Correspondingly, each current second target station can obtain the user information (such as ak and sk) of the admin user bound in the zone of the first target station and the synchronization IP of the first target station through the switch, so as to bind the administrator user and the synchronization IP of the first target station in the area of the current second target station.

[0072] That is, the switch can control each current second target station to create a new zone in the zone group where the zone of the first target station is located through interaction with each current second target station, bind the admin user in the zone of the first target station and the synchronization IP of the first target station to the zone created by each current second target station, create the synchronization IP of each current second target station, configure the management interface IP of each current second target station as the preset switch IP, generate and submit a new period version, so as to complete the building of the slave stations in the zone group (i.e. the main area group) where the zone of the first target station is located.

[0073] Correspondingly, the building of slave stations in other zone groups except the zone group (i.e. the main area group) where the zone of the first target station (i.e. the master station) in the realm is located can be implemented in a similar way to the building method of the slave stations in the main area group, which will not be described here.

[0074] For example, assuming that the switch is connected with an A cluster and a B cluster, if it is required to combine the two site groups to build a multi-site environment, and the A cluster is taken as a master site and the B cluster is taken as a slave site; after the master site of the multi-site environment is built, a user can select the B cluster to trigger a slave site building instruction of the multi-site environment through a multi-site management interface; the switch can interact with servers in the B cluster through SSH according to the slave site building instruction, create a new zone in a zone group of the A cluster on the B cluster, bind an admin user in the zone of the A cluster to the zone of the B cluster, bind a synchronization IP of the A cluster to zone information of the B cluster, create a synchronization IP on the B cluster, configure a management interface IP of the B cluster as a preset switch IP, and complete building of the slave site in the multi-site environment.

[0075] Further, the switch in the embodiment can also acquire a management instruction of a domain triggered by the multi-site management interface; according to the management instruction, the switch controls a target site corresponding to the management instruction to perform a corresponding management operation, so as to complete management of the multi-site environment; wherein the target site is the master site and / or the slave site.

[0076] In the embodiment, the preset switch IP provided by the switch connected with each site is used, so that a user can operate all sites through one multi-site management interface, and a multi-site environment can be built through only one preset switch IP, thereby avoiding switching and logging in of different site management interfaces, simplifying an operation process of building and subsequent management of the multi-site environment, saving user time, and improving user experience.

[0077] Based on the above embodiment, the embodiment of the present application also provides another multi-site environment building method to use a preset switch IP to manage a built multi-site environment, so as to simplify an operation process of managing the multi-site environment. For details, please refer to 4, Figure 4 The method is applied to a switch, and can include:

[0078] Step 201: acquiring a management instruction of a domain triggered by a multi-site management interface.

[0079] It can be understood that in the embodiment, a user can trigger a management instruction of a multi-site environment (i.e. a domain) through a multi-site management interface after the master site and the slave site of the multi-site environment are built, so that the switch can control a target site in the multi-site environment to perform a corresponding management operation, and complete management and maintenance of the multi-site environment.

[0080] In the embodiment, the management instruction can be a management instruction corresponding to a multi-site environment (i.e., a realm) in which the first target site acts as a master site. When the number of multi-site environments corresponding to the multi-site management interface is greater than or equal to 2, the management of other multi-site environments can be implemented in a manner similar to the management process of the multi-site environment provided in the embodiment, which is not limited in the embodiment.

[0081] Correspondingly, the number and type of the management instruction in the step can be set by the designer according to the practical scene and user demand, for example, the management instruction can include a master-slave switching instruction for switching a master site and / or a site deletion instruction for deleting a site. The embodiment is not limited in this regard.

[0082] In step 202, a corresponding management operation is performed on the target site corresponding to the management instruction according to the management instruction; the target site is a master site and / or a slave site.

[0083] It can be understood that the switch can interact with the site corresponding to the management instruction (i.e., the target site) after obtaining the management instruction, control the target site to perform a corresponding management operation, and complete the management and maintenance of the multi-site environment.

[0084] Specifically, the specific manner in which the switch controls the target site to perform a corresponding management operation according to the management instruction in the step can be set by the designer according to the practical scene and user demand, for example, the switch can control the target site to implement the same or similar method as the management and maintenance method of the site in the prior art. For example, when the management instruction is a master-slave switching instruction, the switch can interact with the switching master site corresponding to the master-slave switching instruction, control the switching master site to adjust the master region identification information in the target region to the identification information of the switching master site, unbind the synchronization IP of the first target site in the target region, generate and submit a new periodic version; wherein the switching master site is a slave site corresponding to the master-slave switching instruction, and the target region is a region corresponding to the switching master site.

[0085] For example, when switching a master site of a multi-site environment from a cluster A to a cluster B, a user can log in a multi-site management interface through a preset switch IP, select the cluster B in the multi-site environment (i.e., switch the master site), and trigger a master-slave switching instruction of the multi-site environment; the switch can interact with a server in the cluster B through SSH according to the multi-site environment, assign a val value (i.e., master zone identification information) of the master_zone in the cluster B to an ID number (i.e., identification information) of itself, and update a period version in a zone (i.e., target zone) of the cluster A in itself. After that, the cluster A detects the new version of the period, and synchronously updates, so that the cluster A becomes a slave site, the cluster B becomes a new master site, and the switching of the master-slave sites is completed.

[0086] In the embodiment, the preset switch IP provided by the switch connected with each site is used, so that the user can operate all the sites through a multi-site management interface, and all the sites in the multi-site environment can be managed through only one preset switch IP, thereby simplifying the operation process of the multi-site environment management, saving the user time, and improving the user experience.

[0087] Based on the above embodiment, the application further provides a multi-site environment building method applied to a site, to simplify the operation process of building and subsequent management of the multi-site environment, and to avoid the switching and separate login process of different management interfaces of different sites. For details, please refer to Figure 5 , Figure 5 A flowchart of a multi-site environment building method applied to a site provided by the embodiment of the application. The method applied to a site can include:

[0088] Step 301: obtaining a site building instruction of a field sent by a switch; wherein the site building instruction is an instruction triggered by a multi-site management interface corresponding to a preset switch IP, the site building instruction is a master site building instruction or a slave site building instruction, and the site is a distributed object storage cluster connected with the switch.

[0089] It can be understood that the site in the embodiment can be a storage cluster in a distributed object storage system. The site can be connected with the switch, that is, a server in the storage cluster can be connected with the switch. The site building instruction can be a building instruction of a site in a multi-site environment (i.e., a field), such as a building instruction of a master site (i.e., a master site building instruction) or a building instruction of a slave site (i.e., a slave site building instruction).

[0090] Correspondingly, the server of the site in the embodiment can receive the site building instruction of the field sent by the switch, so as to configure the site as a master site or a slave site in the multi-site environment according to the site building instruction.

[0091] Step 302: If the site building instruction is a master site building instruction, the master site of the realm is configured according to the master site building instruction.

[0092] It can be understood that the server of the site in this step can configure the site as a master site in the multi-site environment according to the master site building instruction when the site building instruction is a master site building instruction, and complete the building of the master site in the multi-site environment.

[0093] Correspondingly, the specific way in which the server of the site in this step configures the master site of the realm according to the master site building instruction can be set by the designer, such as using a way corresponding to the building method of the master site in the above embodiment, for example, the server of the site can create a realm, a zone group and a zone in the realm, an administrator user and a synchronization IP according to the master site building instruction, configure the management interface IP of the site as a preset switch IP, generate and submit a new period version; wherein the administrator user is bound in the zone of the site.

[0094] That is, the server of the site in this step can complete the necessary information setting of building a master site in the site according to the master site building instruction sent by the switch, such as creating a realm, a zone group, a zone and an admin user, binding the admin user (i.e. the administrator user) with the zone created at present, creating a synchronization IP of the site, configuring the management interface IP of the site as a preset switch IP, generating and submitting a new period version.

[0095] Step 303: If the site building instruction is a master site building instruction, the slave site of the realm is configured according to the master site building instruction.

[0096] It can be understood that the server of the site in this step can configure the site as a slave site in the multi-site environment according to the slave site building instruction when the site building instruction is a slave site building instruction, and complete the building of the slave site in the multi-site environment.

[0097] Correspondingly, the specific way in which the server of the site in this step configures the slave site of the realm according to the slave site building instruction can be set by the designer, such as using a way corresponding to the building method of the slave site in the above embodiment, for example, the server of the site can create a zone and a synchronization IP in the zone group corresponding to the slave site building instruction according to the slave site building instruction, bind the administrator user bound in the zone of the master site corresponding to the slave site building instruction and the synchronization IP of the master site in the zone of the site, configure the management interface IP of the site as a preset switch IP, and generate and submit a new period version.

[0098] That is, the server of the site in this step can create a new zone in the zone group where the zone of the master site corresponding to the slave site building instruction is located according to the slave site building instruction sent by the switch, bind the admin user in the zone of the master site to the zone created by the site, bind the synchronization IP of the master site to the zone created by the site, create the synchronization IP of the site, configure the management interface IP of the site as the preset switch IP, and generate and submit a new period version.

[0099] Further, the site in this embodiment can also obtain the management instruction of the domain sent by the switch; and perform a management operation corresponding to the management instruction; wherein the site is a master site or a slave site corresponding to the domain. When the management instruction is a master-slave switching instruction, the site can adjust the master zone identifier information in the zone corresponding to the site in the domain to the identifier information of the site, and unbind the synchronization IP of the master site in the zone corresponding to the site, generate and submit a new period version according to the master-slave switching instruction; wherein the site is a slave site, that is, a slave site that needs to be switched to a master site.

[0100] In this embodiment, the preset switch IP provided by the switch connected to each site is used by the embodiment of the application, so that the user can operate all sites through one multi-site management interface, and a multi-site environment can be built through only one preset switch IP, avoiding the switching login process of different site management interfaces, thereby simplifying the operation process of building and subsequent management of the multi-site environment, saving the user time, and improving the user experience.

[0101] Corresponding to the above method embodiment, the embodiment of the application also provides a multi-site environment building device applied to a switch, and the multi-site environment building device described below can be mutually corresponding and referred to with the multi-site environment building method described above.

[0102] Please refer to Figure 6 , Figure 6 A structural block diagram of a multi-site environment building device applied to a switch provided by the embodiment of the application. The device applied to a switch can include:

[0103] The building obtaining module 10 is configured to obtain a master site building instruction triggered by a multi-site management interface corresponding to the preset switch IP;

[0104] The master site building module 20 is configured to interact with a first target site corresponding to the master site building instruction, and configure the first target site as a master site in a domain; wherein the management interface IP of the master site is the preset switch IP, and the first target site is any site, and each site is a distributed object storage cluster connected to the switch.

[0105] The slave site building module 30 is configured to interact with the second target sites according to the slave site building instruction of the domain triggered by the obtained multi-site management interface, and configure each second target site as a slave site in the domain; the second target sites are one or more sites corresponding to the slave site building instruction, and the management interface IP of each slave master site is the preset switch IP.

[0106] In some embodiments, the master site building module 20 can be specifically configured to interact with the first target site through the Secure Shell protocol, and configure the first target site as a master site in the domain.

[0107] In some embodiments, the master site building module 20 can be specifically configured to interact with the first target site, control the first target site to create a domain, a region group and a region in the domain, an administrator user, and a synchronization IP, configure the management interface IP of the first target site as the preset switch IP, and generate and submit a new periodic version; the administrator user is bound in the region of the first target site.

[0108] Correspondingly, the slave site building module 30 can be specifically configured to interact with the current second target site according to the master region group slave site building instruction, control the current second target site to create a region in the master region group and a synchronization IP, bind the administrator user and the synchronization IP of the first target site in the region of the current second target site, configure the management interface IP of the current second target site as the preset switch IP, generate and submit a new periodic version; the master region group slave site building instruction is a slave site building instruction of a master region group in the domain, the master region group is a region group corresponding to the first target site, and the current second target site is one or more sites corresponding to the master region group slave site building instruction.

[0109] In some embodiments, the apparatus can further include:

[0110] The management acquisition module is configured to acquire a management instruction of a domain triggered by a multi-site management interface;

[0111] The management control module is configured to control a target site corresponding to the management instruction to perform a corresponding management operation according to the management instruction; the target site is a master site and / or a slave site.

[0112] In some embodiments, when the management instruction is the master-slave switching instruction, the management control module can be specifically configured to interact with a switching master site corresponding to the master-slave switching instruction, control the switching master site to adjust master region identification information in a target region to identification information of the switching master site, unbind a synchronization IP of a first target site in the target region, and generate and submit a new periodic version; wherein the switching master site is a slave site corresponding to the master-slave switching instruction, and the target region is a region corresponding to the switching master site.

[0113] In the embodiment, the preset switch IP provided by the switch connected with each site is used to enable the user to operate all sites through a multi-site management interface, and a multi-site environment can be built through only one preset switch IP, thereby avoiding the switching login process of the management interfaces of different sites, simplifying the operation process of building and subsequent management of the multi-site environment, saving the user time, and improving the user experience.

[0114] Corresponding to the above method embodiment, the embodiment of the application also provides a multi-site environment building device applied to a site. The multi-site environment building device described below can be correspondingly referred to the multi-site environment building method described above.

[0115] Please refer to Figure 7 , Figure 7 A structural block diagram of a multi-site environment building device applied to a site provided by the embodiment of the application. The device applied to a site can include:

[0116] An instruction acquisition module 40 is configured to acquire a site building instruction of a field sent by a switch; wherein the site building instruction is an instruction triggered by a multi-site management interface corresponding to a preset switch IP, and the site building instruction is a master site building instruction or a slave site building instruction, and the site is a distributed object storage cluster connected with the switch;

[0117] A master site configuration module 50 is configured to, if the site building instruction is the master site building instruction, configure a master site of the field according to the master site building instruction.

[0118] A slave site configuration module 60 is configured to, if the site building instruction is the master site building instruction, configure a slave site of the field according to the master site building instruction.

[0119] In some embodiments, the instruction acquisition module 40 can be specifically configured to receive the site building instruction of the field sent by the switch through a secure shell protocol.

[0120] In some embodiments, the master site configuration module 50 can be specifically configured to create a domain, a region group and a region in the domain, an administrator user and a synchronization IP according to the master site building instruction, configure the management interface IP of the site as the preset switch IP, generate and submit a new periodic version; wherein the administrator user is bound in the region of the site.

[0121] In some embodiments, the slave site configuration module 60 can be specifically configured to create a region and a synchronization IP in the region group corresponding to the slave site building instruction according to the slave site building instruction, bind the administrator user bound in the region of the master site corresponding to the slave site building instruction and the synchronization IP of the master site in the region of the site, configure the management interface IP of the site as the preset switch IP, and generate and submit a new periodic version.

[0122] In some embodiments, the apparatus can further comprise:

[0123] The management execution module is configured to obtain a management instruction of the domain sent by the switch, and execute a management operation corresponding to the management instruction; wherein the site is a master site or a slave site corresponding to the domain.

[0124] In some embodiments, when the management instruction is a master-slave switching instruction, the management execution module can be specifically configured to adjust the master region identification information in the region corresponding to the site to the identification information of the site according to the master-slave switching instruction, and unbind the synchronization IP of the master site in the region corresponding to the site, and generate and submit a new periodic version; wherein the site is a slave site.

[0125] In this embodiment, the preset switch IP provided by the switch connected with each site enables the user to operate all sites through one multi-site management interface, and a multi-site environment can be built through only one preset switch IP, thereby avoiding the switching login process of different site management interfaces, simplifying the operation process of building and subsequent management of the multi-site environment, saving the user time, and improving the user experience.

[0126] Corresponding to the above method embodiments, the embodiments of the present application also provide a switch, and the switch described below can be mutually corresponding with reference to the multi-site environment building method described above.

[0127] Please refer to Figure 8 , Figure 8 The structure of a switch provided by the embodiments of the present application is shown in the figure. The switch can comprise:

[0128] The memory D1 is configured to store a computer program.

[0129] Processor D2 is configured to implement the steps of the method for building a multi-site environment for a switch according to the above method embodiments when executing the computer program.

[0130] According to the above method embodiments, the embodiments of the present application further provide a server. The server described below can be referred to the method for building a multi-site environment described above.

[0131] Please refer to Figure 9 , Figure 9 The structure of the server provided by the embodiments of the present application is shown in the figure. The server can include:

[0132] Memory D3 is configured to store the computer program.

[0133] Processor D4 is configured to implement the steps of the method for building a multi-site environment for a site according to the above method embodiments when executing the computer program.

[0134] The server provided by the embodiments of the present application can be a server in a site, i.e. a server of a storage cluster in a distributed object storage system.

[0135] According to the above method embodiments, the embodiments of the present application further provide a computer readable storage medium. The computer readable storage medium described below can be referred to the method for building a multi-site environment described above.

[0136] Please refer to Figure 10 , Figure 10 The structure of the computer readable storage medium provided by the embodiments of the present application is shown in the figure. The computer readable storage medium 70 stores a computer program 71. The computer program 71 is executed by a processor to implement the steps of the method for building a multi-site environment for a switch and / or the method for building a multi-site environment for a site according to the above method embodiments.

[0137] The computer readable storage medium 70 can be a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or various storage media that can store program codes.

[0138] The embodiments in the description are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts of each embodiment can be referred to each other. For the apparatus, switch, server and computer readable storage medium disclosed by the embodiments, since they correspond to the method disclosed by the embodiments, the description is relatively simple, and the relevant parts can be referred to the method part.

[0139] The multi-site environment building method, device, switch and server provided by the present application are described in detail above. The principles and implementation manners of the present application are described by applying specific examples in this paper, and the above description of the examples is only used to help understand the method of the present application and its core idea. It should be pointed out that, for those skilled in the art, some improvements and modifications can be made to the present application without departing from the principles of the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.

Claims

1. A method for setting up a multi-site environment, characterized in that, The application is applied to a switch, comprising: obtaining a main site building instruction triggered by a multi-site management interface corresponding to a preset switch IP; interacting with a first target site corresponding to the main site building instruction, and configuring the first target site as a main site in a domain; wherein the management interface IP of the main site is the preset switch IP, the first target site is any site, and each site is a distributed object storage cluster connected with the switch; according to the obtained multi-site management interface triggered domain slave site building instruction, interacting with a second target site, and configuring each second target site as a slave site in the domain; wherein the second target site is one or more sites corresponding to the slave site building instruction, and the management interface IP of each slave site is the preset switch IP.

2. The multi-site environment setup method of claim 1, wherein, The interaction with the first target site corresponding to the main site building instruction and the configuration of the first target site as a main site in a domain comprises: interacting with the first target site through a secure shell protocol, and configuring the first target site as the main site in the domain.

3. The multi-site environment setup method of claim 1, wherein, The interaction with the first target site corresponding to the main site building instruction and the configuration of the first target site as a main site in a domain comprises: interacting with the first target site, controlling the first target site to create the domain, a regional group and a region in the domain, an administrator user, and a synchronization IP, configuring the management interface IP of the first target site as the preset switch IP, and generating and submitting a new periodic version; wherein the administrator user is bound in the region of the first target site; correspondingly, the interaction with the second target site according to the obtained multi-site management interface triggered domain slave site building instruction and the configuration of each second target site as a slave site in the domain comprise: according to a main regional group slave site building instruction, interacting with a current second target site, controlling the current second target site to create a region in a main regional group and a synchronization IP, binding the administrator user and the synchronization IP of the first target site in the region of the current second target site, configuring the management interface IP of the current second target site as the preset switch IP, generating and submitting a new periodic version; wherein the main regional group slave site building instruction is a slave site building instruction of the main regional group in the domain, the main regional group is a regional group corresponding to the first target site, and the current second target site is one or more sites corresponding to the main regional group slave site building instruction.

4. The multi-site environment building method according to any one of claims 1 to 3, characterized by, After the interaction with the second target site according to the obtained multi-site management interface triggered domain slave site building instruction and the configuration of each second target site as a slave site in the domain, the method further comprises: obtaining a management instruction of the domain triggered by the multi-site management interface; controlling a target site corresponding to the management instruction to perform a corresponding management operation according to the management instruction; wherein the target site is the main site and / or the slave site.

5. The multi-site environment setup method of claim 4, wherein, When the management instruction is a master-slave switching instruction, the control of the target station corresponding to the management instruction to perform a corresponding management operation comprises: interacting with a switching master station corresponding to the master-slave switching instruction, controlling the switching master station to adjust the master region identification information in the target region to the identification information of the switching master station, unbinding the synchronization IP of the first target station in the target region, generating and submitting a new cycle version; wherein the switching master station is a slave station corresponding to the master-slave switching instruction, and the target region is a region corresponding to the switching master station.

6. A multi-site environment building apparatus, characterized by, Applied to a switch, comprising: A build acquisition module is configured to acquire a master station building instruction triggered by a multi-station management interface corresponding to a preset switch IP; A master station building module is configured to interact with a first target station corresponding to the master station building instruction and configure the first target station as a master station in a domain; wherein the management interface IP of the master station is the preset switch IP, and the first target station is any station, and each station is a distributed object storage cluster connected to the switch; A slave station building module is configured to interact with a second target station according to a slave station building instruction of the domain triggered by the multi-station management interface, and configure each second target station as a slave station in the domain; wherein the second target station is one or more stations corresponding to the slave station building instruction, and the management interface IP of each slave station is the preset switch IP.

7. A method of building a multi-site environment, the method comprising: Applied to a station, comprising: Acquire a station building instruction of a domain sent by a switch; wherein the station building instruction is an instruction triggered by a multi-station management interface corresponding to a preset switch IP, the station building instruction is a master station building instruction or a slave station building instruction, and the station is a distributed object storage cluster connected to the switch; If the station building instruction is the master station building instruction, configure a master station of the domain according to the master station building instruction; wherein the management interface IP of the master station is the preset switch IP; If the station building instruction is the slave station building instruction, configure a slave station of the domain according to the slave station building instruction; wherein the management interface IP of the slave station is the preset switch IP.

8. A multi-site environment building apparatus, characterized by, Applied to a station, comprising: An instruction acquisition module is configured to acquire a station building instruction of a domain sent by a switch; wherein the station building instruction is an instruction triggered by a multi-station management interface corresponding to a preset switch IP, the station building instruction is a master station building instruction or a slave station building instruction, and the station is a distributed object storage cluster connected to the switch; A master station configuration module is configured to, if the station building instruction is the master station building instruction, configure a master station of the domain according to the master station building instruction; wherein the management interface IP of the master station is the preset switch IP; From the site configuration module, if the site building instruction is the slave site building instruction, configure the slave site of the domain according to the slave site building instruction; wherein the management interface IP of the slave site is the preset switch IP.

9. A switch, characterized by Comprise: Memory, for storing computer programs; Processor, for executing the computer programs to realize the steps of the multi-site environment building method of any one of claims 1 to 5.

10. A server, characterized by Comprise: Memory, for storing computer programs; Processor, for executing the computer programs to realize the steps of the multi-site environment building method of claim 7. Comprise: Memory, for storing computer programs; Processor, for executing the computer programs to realize the steps of the multi-site environment building method of claim 7.

Citation Information

Patent Citations

  • Distributed site management method, and system and server with system

    CN106230814A

  • Cluster creation method and device

    CN112751687A