CN111600742A - Method and system for dynamically switching main monitor of distributed storage system - Google Patents
Method and system for dynamically switching main monitor of distributed storage system Download PDFInfo
- Publication number
- CN111600742A CN111600742A CN202010256015.XA CN202010256015A CN111600742A CN 111600742 A CN111600742 A CN 111600742A CN 202010256015 A CN202010256015 A CN 202010256015A CN 111600742 A CN111600742 A CN 111600742A
- Authority
- CN
- China
- Prior art keywords
- monitor
- storage system
- distributed storage
- module
- file
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 30
- 238000012544 monitoring process Methods 0.000 claims description 14
- 230000008569 process Effects 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000002688 persistence Effects 0.000 description 1
- 230000008439 repair process Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0893—Assignment of logical groups to network elements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/0654—Management of faults, events, alarms or notifications using network fault recovery
- H04L41/0663—Performing the actions predefined by failover planning, e.g. switching to standby network elements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
- H04L41/0823—Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
- H04L41/0836—Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability to enhance reliability, e.g. reduce downtime
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides a method and a system for dynamically switching a main monitor of a distributed storage system, which comprises the following steps: step 1: starting environment preparation service of the distributed storage system, and configuring basic files of the distributed storage system; step 2: and processing the basic file of the distributed storage system, starting the main monitor service of the dynamic switching distributed storage system, and performing dynamic switching of the main monitor. The invention can make the distributed storage system carry on the dynamic switching of the main monitor while operating normally, and read and write the performance well; when the main monitor of the distributed storage system is in an accident or is attacked, the main monitor switching service can reselect a new main monitor, so that the distributed storage system is recovered to be normal, and the safety and the stability are ensured.
Description
Technical Field
The invention relates to the technical field of internet application, in particular to a method and a system for dynamically switching a main monitor of a distributed storage system.
Background
The dynamic switching of the master monitor of the distributed storage system means that the master monitor of the distributed storage system can be dynamically switched, a new master monitor can be randomly selected from a monitor group, and the new master monitor can be reselected when the master monitor is unexpected, so that the stability and the safety of the distributed storage system are ensured.
The traditional distributed storage system mainly consists of a monitor service, an object storage device service and a file system service. The traditional distributed storage system is influenced by various uncontrollable factors, data are damaged accidentally and lost occasionally, the main nodes of the storage system are damaged by utilizing operations such as a loophole back door to break the system, accidental fault damage of a hard disk and the like, and the problems cannot be avoided in the traditional distributed storage system. Therefore, when the accident or the attack occurs on the master monitor node, the reading and writing of the distributed storage system are damaged, and the security cannot be ensured. The service of dynamic switching of the main monitor can solve the above problems, thereby ensuring the security and stability of the storage system.
Patent document CN106681656A (application number: 201611008374.3) discloses a dynamically adjustable cloud storage fault-tolerant method, in which a metadata service controller in a cloud storage system defines multiple scheduling modes, and performs load balancing scheduling for different fault-tolerant policies, so that the cloud storage system can automatically complete the analysis, balancing, and scheduling of data inside, repair fault-tolerant data blocks under its storage directory by access triggering or timing triggering, and dynamically adjust the fault-tolerant modes as needed flexibly at any time.
Disclosure of Invention
In view of the defects in the prior art, the present invention provides a method and system for dynamically switching a master monitor of a distributed storage system.
The method for dynamically switching the main monitor of the distributed storage system provided by the invention comprises the following steps:
step 1: starting environment preparation service of the distributed storage system, and configuring basic files of the distributed storage system;
step 2: and processing the basic file of the distributed storage system, starting the main monitor service of the dynamic switching distributed storage system, and performing dynamic switching of the main monitor.
Preferably, the basic file of the monitoring service of the distributed storage system includes: the method includes the steps of a unique identification code uuid of a distributed storage system cluster, an initial cluster size k, an initial cluster member mem (p), an initial cluster member network address ip (p), an initial cluster member network port number (p), a network service address segment ip _ cluster of the cluster, a default cluster pool size default _ pool _ size, and a number pg _ num, wherein p is 1,2, …, k.
Preferably, the step 1 comprises:
step 1.1: configuring a basic file of a monitoring service of the distributed storage system;
step 1.2: generating a monitoring key _ mon of the initial member of the cluster, and configuring read-write permission;
step 1.3: generating an administrator key _ admin of the cluster, and configuring read-write permission;
step 1.4: configuring a network address ip (p) of an initial cluster member;
step 1.5: configuring a network port number port (p) of an initial cluster member;
step 1.6: configuring monitor id number id (p) of initial cluster member;
step 1.7: starting a corresponding unique identification code uuid, and starting cluster monitor service corresponding to a monitor id number on a port of a network port corresponding to a network address ip address;
step 1.8: generating a key _ OSD of the OSD of the object storage device, and configuring read-write permission;
step 1.9: an initial cluster member mem (p) generates an object storage device;
step 1.10: an initial cluster member mem (p) is used for creating a cluster pool, and the configuration quantity is pg _ osd;
step 1.11: an initial cluster member mem (p) starts the object storage device;
step 1.12: the initial cluster member mem (p) generates a key _ MDS of the file system MDS, and configures read-write permission;
step 1.13: an initial cluster member mem (p) creates a metadata pool metadatapool, and the configuration quantity is pg _ mdp;
step 1.14: an initial cluster member mem (p) creates a data pool datapool, and the configuration quantity is pg _ dp;
step 1.15: and starting the respective file system service by the initial cluster member mem (p).
Preferably, the key of the object storage device OSD and the key of the file system MDS are generated by key _ mon according to a generation rule.
Preferably, the step 2 comprises:
step 2.1: the method comprises the steps that an initial cluster member mem (p) acquires ip information ip _ me (p) of a local machine me when the number t of times of executing dynamic switching is 0 before executing dynamic switching operation;
step 2.2: when t is 0, the initial cluster member mem (p) generates k-1 marked files except the mark file (p) with the name format of file (p), and p is 1,2, …, k-1; setting dynamic switching frequency f, wherein the interval time of each switching is in seconds/times;
step 2.3: when the dynamic switching times is t, obtaining running state information info (q (t)) of the cluster monitor through an instruction;
step 2.4: acquiring ip address information ipm _ p (t) and id information idm _ p (t) of a monitor group except a local monitor;
step 2.5: when the switching operation is carried out for the t time, remotely logging in a server except the local server, ipm _ p (t), and acquiring file (p (t));
step 2.6: judging whether the content of the file (p (t)) is 1 or not, if the file (p (t)) contains 1, namely the remote server executes dynamic switching, the local computer does not execute the dynamic switching operation, and setting the file (me (t)) corresponding to the own ip on the remote server to be 0; if the file (p (t)) is 0, the local computer executes the operation of dynamically switching the main monitor;
step 2.7: performing dynamic switching operation, generating random numbers M (t) in a range [1, k ], and determining secondary bit numbers of ip and id at t moment; thus, ip and id information of the main monitor to be dynamically switched are obtained and are marked as ipm _ M (t) and idm _ M (t); remotely logging on an ipm _ M (t), dynamically switching a main monitor, and setting a file (p (t)) except the main monitor to be 1; after f seconds, the process returns to step 2.2 to continue execution, and the master monitor is continuously and dynamically switched.
The system for dynamically switching the main monitor of the distributed storage system provided by the invention comprises the following components:
module M1: starting environment preparation service of the distributed storage system, and configuring basic files of the distributed storage system;
module M2: and processing the basic file of the distributed storage system, starting the main monitor service of the dynamic switching distributed storage system, and performing dynamic switching of the main monitor.
Preferably, the basic file of the monitoring service of the distributed storage system includes: the method includes the steps of a unique identification code uuid of a distributed storage system cluster, an initial cluster size k, an initial cluster member mem (p), an initial cluster member network address ip (p), an initial cluster member network port number (p), a network service address segment ip _ cluster of the cluster, a default cluster pool size default _ pool _ size, and a number pg _ num, wherein p is 1,2, …, k.
Preferably, the module M1 includes:
module M1.1: configuring a basic file of a monitoring service of the distributed storage system;
module M1.2: generating a monitoring key _ mon of the initial member of the cluster, and configuring read-write permission;
module M1.3: generating an administrator key _ admin of the cluster, and configuring read-write permission;
module M1.4: configuring a network address ip (p) of an initial cluster member;
module M1.5: configuring a network port number port (p) of an initial cluster member;
module M1.6: configuring monitor id number id (p) of initial cluster member;
module M1.7: starting a corresponding unique identification code uuid, and starting cluster monitor service corresponding to a monitor id number on a port of a network port corresponding to a network address ip address;
module M1.8: generating a key _ OSD of the OSD of the object storage device, and configuring read-write permission;
module M1.9: an initial cluster member mem (p) generates an object storage device;
module M1.10: an initial cluster member mem (p) is used for creating a cluster pool, and the configuration quantity is pg _ osd;
module M1.11: an initial cluster member mem (p) starts the object storage device;
module M1.12: the initial cluster member mem (p) generates a key _ MDS of the file system MDS, and configures read-write permission;
module M1.13: an initial cluster member mem (p) creates a metadata pool metadatapool, and the configuration quantity is pg _ mdp;
module M1.14: an initial cluster member mem (p) creates a data pool datapool, and the configuration quantity is pg _ dp;
module M1.15: and starting the respective file system service by the initial cluster member mem (p).
Preferably, the key of the object storage device OSD and the key of the file system MDS are generated by key _ mon according to a generation rule.
Preferably, the module M2 includes:
module M2.1: the method comprises the steps that an initial cluster member mem (p) acquires ip information ip _ me (p) of a local machine me when the number t of times of executing dynamic switching is 0 before executing dynamic switching operation;
module M2.2: when t is 0, the initial cluster member mem (p) generates k-1 marked files except the mark file (p) with the name format of file (p), and p is 1,2, …, k-1; setting dynamic switching frequency f, wherein the interval time of each switching is in seconds/times;
module M2.3: when the dynamic switching times is t, obtaining running state information info (q (t)) of the cluster monitor through an instruction;
module M2.4: acquiring ip address information ipm _ p (t) and id information idm _ p (t) of a monitor group except a local monitor;
module M2.5: when the switching operation is carried out for the t time, remotely logging in a server except the local server, ipm _ p (t), and acquiring file (p (t));
module M2.6: judging whether the content of the file (p (t)) is 1 or not, if the file (p (t)) contains 1, namely the remote server executes dynamic switching, the local computer does not execute the dynamic switching operation, and setting the file (me (t)) corresponding to the own ip on the remote server to be 0; if the file (p (t)) is 0, the local computer executes the operation of dynamically switching the main monitor;
module M2.7: performing dynamic switching operation, generating random numbers M (t) in a range [1, k ], and determining secondary bit numbers of ip and id at t moment; thus, ip and id information of the main monitor to be dynamically switched are obtained and are marked as ipm _ M (t) and idm _ M (t); remotely logging on an ipm _ M (t), dynamically switching a main monitor, and setting a file (p (t)) except the main monitor to be 1; after f seconds, the return module M2.2 continues to execute, and the master monitor is continuously and dynamically switched.
Compared with the prior art, the invention has the following beneficial effects:
1. the invention aims to provide a method for dynamically switching a main monitor of a distributed storage system aiming at the phenomenon that the main monitor of the existing distributed storage system can not be dynamically switched;
2. the method can firstly make the distributed storage system perform dynamic switching of the main monitor during normal operation, and has good read-write performance;
3. and secondly, when the main monitor of the distributed storage system is in an accident or is attacked, the main monitor switching service can reselect a new main monitor, so that the distributed storage system is recovered to be normal, and the safety and the stability are ensured.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments with reference to the following drawings:
FIG. 1 is a schematic flow diagram of the process of the present invention;
FIG. 2 is a diagram illustrating a boot distributed storage system environment preparation service of the present invention.
Detailed Description
The present invention will be described in detail with reference to specific examples. The following examples will assist those skilled in the art in further understanding the invention, but are not intended to limit the invention in any way. It should be noted that it would be obvious to those skilled in the art that various changes and modifications can be made without departing from the spirit of the invention. All falling within the scope of the present invention.
As shown in fig. 1 and fig. 2, the method for dynamically switching the master monitor of the distributed storage system according to the present invention includes the following steps:
step 1: starting a distributed storage system environment preparation service;
step 2: and starting a dynamic switching distributed storage system main monitor service.
Wherein, step 1 includes the following steps:
step 1.1: configuring a basic file of a monitoring service of a distributed storage system, wherein the basic file comprises a unique identification code uuid of a distributed storage system cluster, an initial cluster size k, an initial cluster member mem (p), p ═ 1,2, …, k, an initial cluster member network address ip (p), p ═ 1,2, …, k, an initial cluster member network port number port (p), p ═ 1,2, …, k, a cluster network service address segment ip _ cluster, a default cluster pool (pool) size default _ pool _ size and a number pg _ num;
step 1.2: generating a monitoring key _ mon of the initial member of the cluster, and configuring the read-write permission of the key _ mon;
step 1.3: generating an administrator key _ admin of the cluster, and configuring the read-write permission of the cluster;
step 1.4: configuring the network address of the initial cluster member: ip (p), p ═ 1,2, …, k;
step 1.5: configuring the network port number of the initial cluster member: port (p), p ═ 1,2, …, k;
step 1.6: configure monitor id number of initial cluster member: id (p), p ═ 1,2, …, k;
step 1.7: and starting the corresponding uuid, and starting the cluster monitor service corresponding to the monitor id number on the port corresponding to the ip address.
Step 1.8: generating a key _ OSD of the OSD of the object storage device, configuring the read-write permission of the key _ OSD, and specifically generating the key _ mon according to a generation rule;
step 1.9: initial cluster member mem (p), p ═ 1,2, …, k generates several OSDs;
step 1.10: initial cluster members mem (p), p ═ 1,2, …, k create several pools, whose PG number is configured to PG _ osd;
step 1.11: the OSD service is started under the initial cluster member mem (p), p ═ 1,2, …, k.
Step 1.12: generating a key _ MDS of a file system (MDS) by an initial cluster member mem (p), wherein p is 1,2, …, k, configuring the read-write authority of the key _ MDS, and specifically generating the key _ mon according to a generation rule;
step 1.13: an initial cluster member mem (p), where p is 1,2, …, k creates a metadata pool (metadatapool), and the PG number of the metadata pool is configured to be PG _ mdp;
step 1.14: an initial cluster member mem (p), where p is 1,2, …, k creates a data pool (datapool), and the PG number is configured to be PG _ dp;
step 1.15: the initial cluster member mem (p), p ═ 1,2, …, k, initiates the respective file system service.
Wherein, the step 2 comprises the following steps:
step 2.1: the method comprises the steps that initial cluster members mem (p) are set to be 1,2, …, k, and ip information ip _ me (p) of a local machine me is obtained before dynamic switching operation is executed, namely when the number of times t of dynamic switching is set to be 0, wherein p is set to be 1,2, …, k;
step 2.2: when t is 0, the initial cluster members mem (p), p is 1,2, …, k, and generates (k-1) label files except itself, named in file (p), p is 1,2, …, k-1; setting dynamic switching frequency f, namely the interval time of each switching, and the unit is second/time;
step 2.3: when the dynamic switching time t is reached, obtaining the running state information info (q (t)) of the cluster monitor by an instruction, wherein q is 1,2, …, k, and t is 1,2, …;
step 2.4: obtaining ip address information ipm _ p (t), p is 1,2, …, k, t is 1,2, …, id information idm _ p (t), p is 1,2, …, k, t is 1,2, …;
step 2.5: when the switching operation is carried out for the t time, remotely logging in a server except the local server, ipm _ p (t), wherein p is 1,2, …, k-1, t is 1,2, …, and obtaining file (p (t)), p is 1,2, …, k, t is 1,2, …;
step 2.6: performing switching operation judgment, judging whether the content of file (p (t)), p is 1,2, …, k, t is 1,2, … is 1, if the content of file (p (t)), p is 1,2, …, k, t is 1,2, … contains 1, namely the remote server is performing dynamic switching, the local machine does not perform dynamic switching operation, and the file (me (t)) corresponding to the local machine ip is set to 0 on the remote server; if file (p (t)), p ═ 1,2, …, k, t ═ 1,2, … are all 0, the native device performs an operation of dynamically switching the master monitor.
Step 2.7: performing dynamic switching operation, generating random numbers M (t) in a range [1, k ], and determining secondary bit numbers of ip and id at t moment; thus, ip and id information of the main monitor to be dynamically switched are obtained and are marked as ipm _ M (t) and idm _ M (t); remotely logging on an ipm _ m (t), dynamically switching a main monitor, and setting files (p (t)) except the main monitor to be 1,2,3, …, k-1, t to be 1,2 and …; after f seconds, the above-described 2.2 to 2.6 operations are also performed, thereby ensuring the persistence of dynamically switching the master monitor.
Those skilled in the art will appreciate that, in addition to implementing the systems, apparatus, and various modules thereof provided by the present invention in purely computer readable program code, the same procedures can be implemented entirely by logically programming method steps such that the systems, apparatus, and various modules thereof are provided in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Therefore, the system, the device and the modules thereof provided by the present invention can be considered as a hardware component, and the modules included in the system, the device and the modules thereof for implementing various programs can also be considered as structures in the hardware component; modules for performing various functions may also be considered to be both software programs for performing the methods and structures within hardware components.
The foregoing description of specific embodiments of the present invention has been presented. It is to be understood that the present invention is not limited to the specific embodiments described above, and that various changes or modifications may be made by one skilled in the art within the scope of the appended claims without departing from the spirit of the invention. The embodiments and features of the embodiments of the present application may be combined with each other arbitrarily without conflict.
Claims (10)
1. A method for dynamically switching a distributed storage system master monitor, comprising:
step 1: starting environment preparation service of the distributed storage system, and configuring basic files of the distributed storage system;
step 2: and processing the basic file of the distributed storage system, starting the main monitor service of the dynamic switching distributed storage system, and performing dynamic switching of the main monitor.
2. The method of dynamically switching the master monitor of the distributed storage system according to claim 1, wherein the basic file of the monitoring service of the distributed storage system comprises: the method includes the steps of a unique identification code uuid of a distributed storage system cluster, an initial cluster size k, an initial cluster member mem (p), an initial cluster member network address ip (p), an initial cluster member network port number (p), a network service address segment ip _ cluster of the cluster, a default cluster pool size default _ pool _ size, and a number pg _ num, wherein p is 1,2, …, k.
3. The method for dynamically switching the master monitor of the distributed storage system according to claim 2, wherein the step 1 comprises:
step 1.1: configuring a basic file of a monitoring service of the distributed storage system;
step 1.2: generating a monitoring key _ mon of the initial member of the cluster, and configuring read-write permission;
step 1.3: generating an administrator key _ admin of the cluster, and configuring read-write permission;
step 1.4: configuring a network address ip (p) of an initial cluster member;
step 1.5: configuring a network port number port (p) of an initial cluster member;
step 1.6: configuring monitor id number id (p) of initial cluster member;
step 1.7: starting a corresponding unique identification code uuid, and starting cluster monitor service corresponding to a monitor id number on a port of a network port corresponding to a network address ip address;
step 1.8: generating a key _ OSD of the OSD of the object storage device, and configuring read-write permission;
step 1.9: an initial cluster member mem (p) generates an object storage device;
step 1.10: an initial cluster member mem (p) is used for creating a cluster pool, and the configuration quantity is pg _ osd;
step 1.11: an initial cluster member mem (p) starts the object storage device;
step 1.12: the initial cluster member mem (p) generates a key _ MDS of the file system MDS, and configures read-write permission;
step 1.13: an initial cluster member mem (p) creates a metadata pool, and the configuration quantity is pg _ mdp;
step 1.14: an initial cluster member mem (p) creates a data pool, and the configuration quantity is pg _ dp;
step 1.15: and starting the respective file system service by the initial cluster member mem (p).
4. The method of claim 1, wherein the key of the object storage device OSD and the key of the file system MDS are generated by key _ mon according to a generation rule.
5. The method of dynamically switching the master monitor of the distributed storage system according to claim 2, wherein the step 2 comprises:
step 2.1: the method comprises the steps that an initial cluster member mem (p) acquires ip information ip _ me (p) of a local machine me when the number t of times of executing dynamic switching is 0 before executing dynamic switching operation;
step 2.2: when t is 0, the initial cluster member mem (p) generates k-1 marked files except the mark file (p) with the name format of file (p), and p is 1,2, …, k-1; setting dynamic switching frequency f, wherein the interval time of each switching is in seconds/times;
step 2.3: when the dynamic switching times is t, obtaining running state information info (q (t)) of the cluster monitor through an instruction;
step 2.4: acquiring ip address information ipm _ p (t) and id information idm _ p (t) of a monitor group except a local monitor;
step 2.5: when the switching operation is carried out for the t time, remotely logging in a server except the local server, ipm _ p (t), and acquiring file (p (t));
step 2.6: judging whether the content of the file (p (t)) is 1 or not, if the file (p (t)) contains 1, namely the remote server executes dynamic switching, the local computer does not execute the dynamic switching operation, and setting the file (me (t)) corresponding to the own ip on the remote server to be 0; if the file (p (t)) is 0, the local computer executes the operation of dynamically switching the main monitor;
step 2.7: performing dynamic switching operation, generating random numbers M (t) in a range [1, k ], and determining secondary bit numbers of ip and id at t moment; thus, ip and id information of the main monitor to be dynamically switched are obtained and are marked as ipm _ M (t) and idm _ M (t); remotely logging on an ipm _ M (t), dynamically switching a main monitor, and setting a file (p (t)) except the main monitor to be 1; after f seconds, the process returns to step 2.2 to continue execution, and the master monitor is continuously and dynamically switched.
6. A system for dynamically switching a distributed storage system master monitor, comprising:
module M1: starting environment preparation service of the distributed storage system, and configuring basic files of the distributed storage system;
module M2: and processing the basic file of the distributed storage system, starting the main monitor service of the dynamic switching distributed storage system, and performing dynamic switching of the main monitor.
7. The system for dynamically switching a distributed storage system master monitor according to claim 6, wherein the base files of the monitoring service of the distributed storage system comprise: the method includes the steps of a unique identification code uuid of a distributed storage system cluster, an initial cluster size k, an initial cluster member mem (p), an initial cluster member network address ip (p), an initial cluster member network port number (p), a network service address segment ip _ cluster of the cluster, a default cluster pool size default _ pool _ size, and a number pg _ num, wherein p is 1,2, …, k.
8. The system for dynamically switching a distributed storage system master monitor according to claim 7, wherein the module M1 comprises:
module M1.1: configuring a basic file of a monitoring service of the distributed storage system;
module M1.2: generating a monitoring key _ mon of the initial member of the cluster, and configuring read-write permission;
module M1.3: generating an administrator key _ admin of the cluster, and configuring read-write permission;
module M1.4: configuring a network address ip (p) of an initial cluster member;
module M1.5: configuring a network port number port (p) of an initial cluster member;
module M1.6: configuring monitor id number id (p) of initial cluster member;
module M1.7: starting a corresponding unique identification code uuid, and starting cluster monitor service corresponding to a monitor id number on a port of a network port corresponding to a network address ip address;
module M1.8: generating a key _ OSD of the OSD of the object storage device, and configuring read-write permission;
module M1.9: an initial cluster member mem (p) generates an object storage device;
module M1.10: an initial cluster member mem (p) is used for creating a cluster pool, and the configuration quantity is pg _ osd;
module M1.11: an initial cluster member mem (p) starts the object storage device;
module M1.12: the initial cluster member mem (p) generates a key _ MDS of the file system MDS, and configures read-write permission;
module M1.13: an initial cluster member mem (p) creates a metadata pool, and the configuration quantity is pg _ mdp;
module M1.14: an initial cluster member mem (p) creates a data pool, and the configuration quantity is pg _ dp;
module M1.15: and starting the respective file system service by the initial cluster member mem (p).
9. The system of dynamically switching a distributed storage system master monitor of claim 6, wherein the key of the object storage device OSD and the key of the file system MDS are generated by key mon according to a generation rule.
10. The system for dynamically switching a distributed storage system master monitor according to claim 7, wherein the module M2 comprises:
module M2.1: the method comprises the steps that an initial cluster member mem (p) acquires ip information ip _ me (p) of a local machine me when the number t of times of executing dynamic switching is 0 before executing dynamic switching operation;
module M2.2: when t is 0, the initial cluster member mem (p) generates k-1 marked files except the mark file (p) with the name format of file (p), and p is 1,2, …, k-1; setting dynamic switching frequency f, wherein the interval time of each switching is in seconds/times;
module M2.3: when the dynamic switching times is t, obtaining running state information info (q (t)) of the cluster monitor through an instruction;
module M2.4: acquiring ip address information ipm _ p (t) and id information idm _ p (t) of a monitor group except a local monitor;
module M2.5: when the switching operation is carried out for the t time, remotely logging in a server except the local server, ipm _ p (t), and acquiring file (p (t));
module M2.6: judging whether the content of the file (p (t)) is 1 or not, if the file (p (t)) contains 1, namely the remote server executes dynamic switching, the local computer does not execute the dynamic switching operation, and setting the file (me (t)) corresponding to the own ip on the remote server to be 0; if the file (p (t)) is 0, the local computer executes the operation of dynamically switching the main monitor;
module M2.7: performing dynamic switching operation, generating random numbers M (t) in a range [1, k ], and determining secondary bit numbers of ip and id at t moment; thus, ip and id information of the main monitor to be dynamically switched are obtained and are marked as ipm _ M (t) and idm _ M (t); remotely logging on an ipm _ M (t), dynamically switching a main monitor, and setting a file (p (t)) except the main monitor to be 1; after f seconds, the return module M2.2 continues to execute, and the master monitor is continuously and dynamically switched.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010256015.XA CN111600742B (en) | 2020-04-02 | 2020-04-02 | Method and system for dynamically switching main monitor of distributed storage system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010256015.XA CN111600742B (en) | 2020-04-02 | 2020-04-02 | Method and system for dynamically switching main monitor of distributed storage system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111600742A true CN111600742A (en) | 2020-08-28 |
CN111600742B CN111600742B (en) | 2023-03-24 |
Family
ID=72188650
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010256015.XA Active CN111600742B (en) | 2020-04-02 | 2020-04-02 | Method and system for dynamically switching main monitor of distributed storage system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111600742B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103368789A (en) * | 2012-03-29 | 2013-10-23 | 日本电气株式会社 | Cluster monitor, method for monitoring a cluster, and computer-readable recording medium |
US20160132576A1 (en) * | 2014-11-07 | 2016-05-12 | Turn Inc. | High availability and disaster recovery in large-scale data warehouse |
CN109495543A (en) * | 2018-10-16 | 2019-03-19 | 新华三技术有限公司 | The management method and device of monitor in a kind of ceph cluster |
CN109634787A (en) * | 2018-12-17 | 2019-04-16 | 浪潮电子信息产业股份有限公司 | Distributed file system monitor switching method, device, equipment and storage medium |
-
2020
- 2020-04-02 CN CN202010256015.XA patent/CN111600742B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103368789A (en) * | 2012-03-29 | 2013-10-23 | 日本电气株式会社 | Cluster monitor, method for monitoring a cluster, and computer-readable recording medium |
US20160132576A1 (en) * | 2014-11-07 | 2016-05-12 | Turn Inc. | High availability and disaster recovery in large-scale data warehouse |
CN109495543A (en) * | 2018-10-16 | 2019-03-19 | 新华三技术有限公司 | The management method and device of monitor in a kind of ceph cluster |
CN109634787A (en) * | 2018-12-17 | 2019-04-16 | 浪潮电子信息产业股份有限公司 | Distributed file system monitor switching method, device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN111600742B (en) | 2023-03-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10394547B2 (en) | Applying update to snapshots of virtual machine | |
EP2472402B1 (en) | Remote management systems and methods for mapping operating system and management controller located in a server | |
CN103200036B (en) | A kind of automation collocation method of electric power system cloud computing platform | |
US20150095597A1 (en) | High performance intelligent virtual desktop infrastructure using volatile memory arrays | |
CN113220398B (en) | Intelligent multi-framework fusion type safety desktop cloud system | |
CN109587331B (en) | Method and system for automatically repairing cloud mobile phone fault | |
CN113656147B (en) | Cluster deployment method, device, equipment and storage medium | |
US10949401B2 (en) | Data replication in site recovery environment | |
CN107656705B (en) | Computer storage medium and data migration method, device and system | |
CN102567075A (en) | Virtual machine context setting method in cloud computing environment | |
CN103744708A (en) | Method of fixing disk device names in Linux operating system | |
CN103513940A (en) | Method for on-line extension of disk size of virtual machine and virtual system console | |
CN107666493B (en) | Database configuration method and equipment thereof | |
CN112506702A (en) | Data center disaster tolerance method, device, equipment and storage medium | |
CN106254312B (en) | method and device for achieving server attack prevention through virtual machine heterogeneous | |
CN104657200A (en) | Method for creating shared disk in virtual machine | |
US20130263128A1 (en) | Computer-readable recording medium, migration control method and control device | |
CN111600742B (en) | Method and system for dynamically switching main monitor of distributed storage system | |
CN105162833A (en) | Client computer management system and method applied to diskless workstation | |
CN104461757A (en) | Method and device for restoring virtual machines | |
CN109032765A (en) | A kind of virtual machine two-node cluster hot backup dispositions method, device and equipment | |
CN104484231A (en) | Virtual machine switching system and method | |
CN105608034B (en) | Method for automatic hot plug of column | |
CN111488306A (en) | Attack and defense architecture system and construction method thereof | |
CN109150941B (en) | Data center physical resource floating method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |