CN110333974B - Switching method and device of cloud storage service - Google Patents

Switching method and device of cloud storage service Download PDF

Info

Publication number
CN110333974B
CN110333974B CN201910476478.4A CN201910476478A CN110333974B CN 110333974 B CN110333974 B CN 110333974B CN 201910476478 A CN201910476478 A CN 201910476478A CN 110333974 B CN110333974 B CN 110333974B
Authority
CN
China
Prior art keywords
main
disk
equipment
cloud disk
identification information
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.)
Active
Application number
CN201910476478.4A
Other languages
Chinese (zh)
Other versions
CN110333974A (en
Inventor
杨昊霖
陈澍
臧国臣
曹少锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910476478.4A priority Critical patent/CN110333974B/en
Publication of CN110333974A publication Critical patent/CN110333974A/en
Application granted granted Critical
Publication of CN110333974B publication Critical patent/CN110333974B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/202Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where processing functionality is redundant
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application discloses a switching method and equipment of cloud storage service, wherein the method comprises the following steps: when the monitoring equipment detects that the main equipment is down, receiving a first control instruction sent by the monitoring equipment; the first control instruction carries program identification information of a main database startup program, disk identification information of a cloud disk to be mounted, and startup parameter information of the main device. And mounting the cloud disk to be mounted according to the disk identification information, wherein the cloud disk to be mounted is positioned in the main database, analyzing the starting parameter information according to a starting program of the main database corresponding to the program identification information, and starting the main database based on the analyzed starting parameter. Therefore, under the condition that the main equipment is down, the standby equipment can be started to replace the main equipment, maintenance personnel do not need to manually replace the main equipment, the dependence of the system on the maintenance personnel is reduced, and operation and maintenance manpower is reduced.

Description

Switching method and device of cloud storage service
Technical Field
The application relates to the technical field of internet communication, in particular to a switching method and equipment of cloud storage service.
Background
With the rapid development of computer technology, informatization plays an increasingly important role in human social life. People can download movies, TV shows, novels or literature data from the internet to terminal equipment (mobile phones, IPAD and notebook computers) so as to enrich leisure, entertainment, work and study lives of people. However, the storage space of the terminal device is limited, and people can only make room for subsequent content update by deleting the file in the storage space, and this operation causes that people need to search on the network again and download the file when they need to acquire the previously deleted file. The cloud disk solves the problems, and a user can store data in the cloud disk through a server which is connected with the server and provides the cloud disk in a butt joint mode through an application program on the terminal equipment so as to read, play or download the data through the cloud disk directly in the following process.
Each server is provided with a corresponding cloud disk, when a user needs to upload a file to the cloud disk, the user sends a data processing request to an intermediate server through a client, the intermediate server receives the data processing request, after calculation, the server where the cloud disk to process the data processing request is located is determined, the data processing request is forwarded to the server where the cloud disk is located, so that the server where the cloud disk is located and the client establish communication connection, and the client can access the server where the cloud disk is located and read data or download data or upload data on the cloud disk. However, when the intermediate server fails, the intermediate calculation step and the forwarding step cannot be performed, so that the cloud disk cannot provide service for the user, and only waits for the repair of the failure or the manual replacement of the intermediate server by a maintenance worker, thereby causing high dependency on the maintenance worker and increasing the operation and maintenance labor.
Disclosure of Invention
The embodiment of the application provides a switching method, equipment and a storage medium of cloud storage service, and the standby equipment can be started to replace main equipment under the condition that the main equipment is down, so that the dependence of a system on maintenance personnel is reduced, and the operation and maintenance manpower is reduced.
In one aspect, an embodiment of the present application provides a switching method for cloud storage services, where the method includes:
when the monitoring equipment detects that the main equipment is down, receiving a first control instruction sent by the monitoring equipment; the first control instruction carries program identification information of a main database starting program, disk identification information of a cloud disk to be mounted and starting parameter information of main equipment;
mounting the cloud disk to be mounted according to the disk identification information, wherein the cloud disk to be mounted is positioned in the main database;
analyzing the starting parameter information according to the main database starting program corresponding to the program identification information;
and starting the main database based on the analyzed starting parameters.
Another aspect provides a switching apparatus for a cloud storage service, including:
the monitoring device comprises a receiving module, a sending module and a judging module, wherein the receiving module is used for receiving a first control instruction sent by the monitoring device when the monitoring device detects that the main device is down; the first control instruction carries program identification information of a main database starting program, disk identification information of a cloud disk to be mounted and starting parameter information of main equipment;
the cloud disk loading and unloading module is used for loading the cloud disk to be loaded according to the disk identification information, and the cloud disk to be loaded is positioned in the main database;
the information processing module is used for analyzing the starting parameter information according to the starting program of the main database corresponding to the program identification information;
and the database starting module is used for starting the main database based on the starting parameters obtained after analysis.
Another aspect provides a computer-readable storage medium having at least one instruction, at least one program, a set of codes, or a set of instructions stored therein, the at least one instruction, the at least one program, the set of codes, or the set of instructions being loaded and executed by a processor to implement the switching method of the cloud storage service as described above.
In another aspect, a switching method of a cloud storage service is provided, where the method includes:
when the main equipment is detected to be down, a first control instruction is sent to the standby equipment; the first control instruction carries program identification information of a main database starting program, disk identification information of the cloud disk to be mounted and starting parameter information of the main equipment, so that the standby equipment mounts the cloud disk to be mounted based on the disk identification information; analyzing the starting parameter information according to the main database starting program corresponding to the program identification information; starting a main database based on the analyzed data; the cloud disk to be mounted is located in the main database.
Another aspect provides a switching apparatus for a cloud storage service, including:
the sending module is used for sending a first control instruction to the standby equipment when the main equipment is detected to be down; the first control instruction carries program identification information of a main database starting program, disk identification information of the cloud disk to be mounted and starting parameter information of the main equipment, so that the standby equipment mounts the cloud disk to be mounted based on the disk identification information; analyzing the starting parameter information according to the main database starting program corresponding to the program identification information; starting a main database based on the analyzed data; the cloud disk to be mounted is located in the main database.
Another aspect provides a computer-readable storage medium having at least one instruction, at least one program, a set of codes, or a set of instructions stored therein, which is loaded and executed by a processor to implement the switching method of the cloud storage service as described above.
The switching method, the switching device and the switching medium for the cloud storage service provided by the embodiment of the application have the following technical effects:
the standby equipment can receive a first control instruction sent by the monitoring equipment when the monitoring equipment detects that the main equipment is down; the first control instruction carries program identification information of a main database startup program, disk identification information of a cloud disk to be mounted, and startup parameter information of the main device. And mounting the cloud disk to be mounted according to the disk identification information, wherein the cloud disk to be mounted is positioned in the main database, analyzing the starting parameter information according to a starting program of the main database corresponding to the program identification information, and starting the main database based on the analyzed starting parameter. Therefore, under the condition that the main equipment is down, the standby equipment can be started to replace the main equipment, maintenance personnel do not need to manually replace the main equipment, the dependence of the system on the maintenance personnel is reduced, and operation and maintenance manpower is reduced.
Drawings
In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a schematic diagram of an application environment provided by an embodiment of the present application;
FIG. 2 is a schematic diagram of an application environment provided by an embodiment of the present application;
fig. 3 is a schematic flowchart of a switching method of a cloud storage service according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a cloud storage service switching system according to an embodiment of the present application;
fig. 5 is a schematic flowchart of a switching method of a cloud storage service according to an embodiment of the present application;
fig. 6 is a schematic flowchart of a switching method of a cloud storage service according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a switching device of a cloud storage service according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a switching device of a cloud storage service according to an embodiment of the present application;
fig. 9 is a hardware structure block diagram of a server of a switching method of a cloud storage service according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or server that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Referring to fig. 1, fig. 1 is a schematic diagram of an application environment provided in an embodiment of the present application, and includes a monitoring device 101, a main device 102, a first server 103, a standby device 104, a main database 1031, and a cloud disk 1032 to be mounted. The first server 103 includes a main database 1031, and the cloud disk 1032 to be mounted is located in the main database 1031. In this embodiment, the master database 1031 is a storage area of data uploaded by clients in the first server 103. The cloud disk 1032 to be mounted may be a block storage area in the main database 1031, or may be the entire storage area of the main database 1031, so as to provide services such as storage, reading, or downloading of data for enterprises and individuals. In this embodiment, the monitoring device 104 may be a server, or may be a monitoring module located on a terminal such as a computer. The monitoring device 104 has communication links with the main device 102, the first server 103 and the standby device 104, respectively, so that the standby device 104 is switched after the main device 102 goes down.
In the embodiment of the present application, before the main device 102 goes down, the main device 102 and the first server 103 form a database storage service system. The main device 102 may be a server, and is configured to receive a data processing request sent by a client after establishing a communication connection with the client, where the data processing request may include a data upload request, a data read request, or a data download request. The master device 102 may send the data processing request to the first server 103, so that the first server 103 may establish a communication connection with the client, and thus, the client may remotely access the master database 1031 through the network, store the data on the cloud disk 1032 to be mounted, or read or download the data from the cloud disk 1032 to be mounted.
When the monitoring device 101 detects that the main device 102 is down, the program identification information of the main database startup program, the disk identification information of the cloud disk 1032 to be mounted, and the startup parameter information of the main device 102 may be sent to the standby device 104. The standby device 104 may mount the cloud disk 1032 to be mounted according to the disk identification information of the cloud disk 1032 to be mounted, analyze the start parameter information according to the main database start program corresponding to the program identification information, and start the main database 1031 based on the start parameter obtained after the analysis. Thus, the backup device 104 replaces the main device 102, and the first server 103 constitutes a database storage service system. The master device 102 becomes a new standby device after being repaired. Alternatively, standby device 104 may be a server.
In the embodiment of the present application, the cloud disk to be mounted is a name of a cloud disk, as shown in fig. 1, the cloud disk to be mounted 1032 is a cloud disk that is mounted on the main device 102 before the main device 102 is down, and after the main device 102 is down, the cloud disk to be mounted is unloaded from the main device and is mounted on the standby device 104.
In the embodiment of the present application, as shown in fig. 1, a cloud storage service system is formed by a main device and a first server, the main database is located on the first server, and the cloud disk to be mounted is located in the main database.
In another alternative embodiment, a cloud storage service system may be composed of a main device and a plurality of first servers, the main database is located on the plurality of first servers, that is, the plurality of first servers form a distributed storage cluster, and the cloud disk to be mounted may also be regarded as a plurality of sub-cloud disks and located on the plurality of first servers. In this way, after receiving the data processing request sent by the client, the master device may send the data processing request to one or more of the first servers according to the identity information of the client and the like.
In another alternative embodiment, a cloud storage service system may be formed by a plurality of main devices and a plurality of first servers, where the main devices and the first servers correspond to each other one to form a subsystem of the database storage service system. Fig. 2 is a schematic diagram of an application environment provided in an embodiment of the present application, where the schematic diagram includes a monitoring device 201, a main device 202, a main device 204, a first server 203, a first server 205, a standby device 206, a main database 2031, a main database 2051, a cloud disk to be mounted 2032, and a cloud disk to be mounted 2052. The main device 202 corresponds to the first server 203, the first server 203 includes a main database 2031, and the cloud disk 2032 to be mounted is located in the main database 2031. The main device 204 corresponds to the first server 205, the first server 205 comprises a main database 2051, and the cloud disk to be mounted 2052 is located in the main database 2051. When any one of the master devices (e.g., 202) is down, the standby device 206 may replace the down master device 202, and the first server 203 constitutes a subsystem of the database storage service system. And the down master device 202 becomes a new standby device after being repaired. In an actual application scene, different structural layouts can be applied according to actual requirements.
In the embodiment of the present application, the communication link between the monitoring device and the main device, the communication link between the monitoring device and the standby device, the communication link between the monitoring device and the first server (not shown in fig. 2 but existing in reality), the communication link between the main device and the first server, and the communication link between the standby device and the first server (existing after the main device is down in fig. 2) may be optical fiber communication links, ethernet communication links, or a combination of optical fiber communication links and ethernet communication links. The choice of the type of communication link may be made on an actual basis.
A specific embodiment of a switching method for cloud storage services according to the present application is described below, and fig. 3 is a schematic flowchart of the switching method for cloud storage services according to the embodiment of the present application, where the method operation steps according to the embodiment or the flowchart are provided in this specification, but more or fewer operation steps may be included based on conventional or non-inventive labor. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution. In practice, the system or server product may be implemented in a sequential or parallel manner (e.g., parallel processor or multi-threaded environment) according to the embodiments or methods shown in the figures. Specifically, as shown in fig. 3, the method may include:
s301: when the monitoring equipment detects that the main equipment is down, the monitoring equipment sends a first control instruction to the standby equipment, wherein the first control instruction carries program identification information of a main database starting program, disk identification information of a cloud disk to be mounted and starting parameter information of the main equipment.
In the following, based on fig. 1, the whole structure of a master device and a first server is described, in this embodiment of the present application, before S301, a cloud storage service switching system needs to be built. Fig. 4 is a schematic structural diagram of a cloud storage service switching system provided in an embodiment of the present application, including a monitoring device 401, a main device 402, a first server 403, a standby device 404, a second server 405, a main database 4031 located in the first server 403, a cloud disk 4032 to be mounted located in the main database 4031, a standby database 4051 located in the second server 405, and a cloud disk 4052 located in the standby database 4051. In this embodiment of the application, the occupied cloud disk 4052 is a cloud disk mounted on the standby device before the main device 402 goes down, and generally, the occupied cloud disk does not store data and is used for occupying an occupied area on the standby device for the cloud disk to be mounted when subsequent cloud storage is switched.
In the embodiment of the application, before the whole cloud storage service switching system serves the client, cloud disks which need to be mounted for the main device and the standby device respectively need to be created, and the created cloud disks are mounted. As shown in fig. 4, a cloud disk to be mounted is created for a host device, and the cloud disk with mounting is mounted, in this embodiment of the application, the mounting of the cloud disk may be specifically expressed as writing disk identification information of the cloud disk to be mounted in a program of the host device. Similarly, an occupation cloud disk is created for the standby equipment and mounted. The cloud disk to be mounted stores data files, log files and control files of a main database.
And installing a database starting program and cloud storage service software on the main equipment and the standby equipment, and establishing communication connection with the corresponding server through a communication link so that the whole cloud storage service switching system can provide data storage, reading or downloading service for the client side subsequently. In this embodiment, the database starting program may be a program for starting a database, may also be referred to as a database instance, and is a process for accessing and using the database. The database may be a relational database such as Oracle, DB2, PostgreSQL, Microsoft SQL Server, Microsoft Access, MySQL, or Langchao K-DB; the database may also be non-relational data such as Redis, MongoDB, Neo4j, or the like. In this embodiment of the application, the cloud storage service software may be configured to be installed on one or more main devices and standby devices, and form a distributed storage cluster in combination with an ethernet network.
In this embodiment of the application, the reason for the downtime of the main device in S301 may be divided into multiple cases. Two situations are described below, one is that the master device crashes, and the other is that the master device needs routine maintenance and the cloud storage service is shut down by a technician. Based on the two types of host downtime, fig. 5 is a schematic flow diagram of a switching method of cloud storage services provided in the embodiment of the present application, where the method includes:
s501: the monitoring device sends a first request to the master device.
In this embodiment, the first request may be to check whether the communication link between the master device and the other device is operating normally. The monitoring device may send the first request to the master device in real time, and thus may detect immediately after the master device crashes. Or the first request is sent according to a preset time period. Alternatively, the first request may be a ping command.
S503: the monitoring device sends a second request to the master device.
In this embodiment of the application, the second request may be to detect whether the cloud storage service of the master device is normal. The monitoring device may send the second request to the master device in real time, and thus may detect immediately after the cloud storage service is turned off. Or sending the second request according to a preset time period.
S505: the monitoring device judges whether a first reply is received, wherein the first reply corresponds to the first request. If yes, go to S507; if not, go to S509.
In the embodiment of the application, if the monitoring device receives the first reply, it indicates that the communication link between the main device and the other device is normally operated, and the main device does not crash, otherwise, the main device crashes, and the main device is manually forcibly closed or the out-of-band system is utilized to close the main device.
S507: the monitoring device determines whether a second reply is received, wherein the second reply corresponds to the second request. If yes, the main device is not down and operates normally, and if not, the process goes to step S513.
S509: and the monitoring equipment sends a third request to the information backup equipment.
In this embodiment of the application, the entire cloud storage service switching system shown in fig. 4 further includes an information backup device, or the entire cloud storage service switching system includes an information backup module, and the information backup module may be built in the monitoring device or other devices, so as to prevent providing required startup parameter information for the monitoring device when the main device is down.
Optionally, the third request is used to request the device receiving the third request to send the startup parameter information to the monitoring device.
S511: the information backup device sends the starting parameter information to the monitoring device, and the process is ended.
In this embodiment of the application, the start parameter information may include a memory capacity of the first database, a data capacity of the cloud disk to be mounted, a position of the cloud disk to be mounted in the first database, and the like.
S513: the monitoring device sends a third request to the master device.
S515: and the main equipment sends the starting parameter information to the monitoring equipment.
In the embodiment of the present application, the information sent by the information backup device or the main device to the monitoring device may include, in addition to the start parameter information, client information of the main device service: the system comprises user identity information (user name: mobile phone number, micro signal, QQ number, mailbox and the like), password authentication information (character password, fingerprint password, voice password and the like) of a user, data disclosure willing indication information uploaded by a client and the like.
In this embodiment of the application, the operation sequence of S503 and S505 may be adjusted, and the monitoring device may first send the first request to the host device, and determine whether to send the second request to the host device according to whether the first reply is received. And if the primary device does not receive the first reply, sending a third request to the information backup device, and receiving starting parameter information returned by the information backup device, wherein in this case, the monitoring device does not need to send a second request to the primary device. If the main equipment receives the first reply, continuing to put a second request to the main equipment, and if the monitoring equipment receives the second reply, indicating that the main equipment is not down and still operates normally; if the second reply is not received, the fact that the main device cannot provide the cloud storage service is indicated, a third request needs to be sent to the main device, and the returned starting parameter information needs to be received.
S303: and the standby equipment mounts the cloud disk to be mounted according to the disk identification information of the cloud disk to be mounted, wherein the cloud disk to be mounted is positioned in the master database.
In this embodiment, the monitoring device may send a third control instruction to the first server corresponding to the master database, where the third control instruction carries the identity information of the standby device, and the first control instruction also carries the identity information of the first server corresponding to the master database. The first server establishes an ethernet communication link between the first server and the backup device based on the identity information of the first server.
In this embodiment of the application, since one cloud disk can only be mounted on one device, in an optional implementation manner, under the condition that the main device may send the first reply to the monitoring device and may not send the second reply to the monitoring device, the monitoring device may send the second control instruction to the main device, so that the main device unloads the cloud disk to be mounted, and preparation is made for subsequent standby devices to mount the cloud disk to be mounted. Optionally, the main device may disconnect the communication connection with the first server after the cloud disk to be mounted is unloaded, so that power consumption of the entire system may be saved.
In the embodiment of the application, only after the cloud disks are mounted on the main device and the standby device, the database starting program and the cloud storage service software can be installed on the main device and the standby device. Optionally, after the database startup program and the cloud storage service software are installed, the mounted cloud disk can be retained or unloaded according to the actual application condition.
In an optional real-time manner, before step S303 or before step S301, the standby device may unload the mounted placeholder cloud disk, disconnect the communication connection with the second server, and directly perform step S303 after receiving the first control instruction sent by the monitoring device, that is, the standby device mounts the cloud disk to be mounted according to the disk identification information of the cloud disk to be mounted.
In another optional embodiment, after the database startup program and the cloud storage service software are installed, the standby device does not uninstall the placeholder cloud disk, and the communication link with the second server is also normally connected. When the standby device is locally mounted with the cloud disk occupying place, the standby device replaces the disk identification information of the locally mounted cloud disk occupying place with the disk identification information of the cloud disk to be mounted based on the received disk identification information of the cloud disk to be mounted. Specifically, the standby device may locally locate a folder in which the disk identification information of the cloud disk occupying the space is located, and replace the disk identification information of the cloud disk occupying the space in the folder with the disk identification information of the cloud disk to be mounted.
And after the standby equipment replaces the disk identification information of the locally mounted occupation cloud disk with the disk identification information of the cloud disk to be mounted, the standby equipment unloads the occupation cloud disk. And after the standby equipment and the first server establish communication connection, mounting the cloud disk to be mounted. Therefore, before the standby equipment mounts the cloud disk to be mounted, the mounted space-occupying cloud disk is disguised as the cloud disk to be mounted, after the space-occupying cloud disk is unloaded, Automatic Storage Management (ASM) of the standby equipment can be directly started to mount the cloud disk to be mounted, and equipment switching is conveniently and quickly carried out.
Optionally, the standby device may disconnect the communication connection with the second server after uninstalling the placeholder cloud disk.
S305: and the standby equipment analyzes the starting parameter information according to the starting program of the main database corresponding to the program identification information.
In this embodiment, in an implementation manner that an optional standby device sets an ORACLE _ SID environment variable as program identification information of a primary database startup program, that is, a primary database instance name, in accordance with a primary database startup program, that is, system startup parameter information corresponding to the program identification information, the standby device uses the primary database instance to parse the startup parameter information, and creates an advertisement and a diagnostic dest directory.
In the embodiment of the present application, it is briefly described above that the database start-up programs are installed on both the main device and the standby device, and the main device and the standby device may be installed with the same database start-up program. Alternatively, the primary database startup program is only a name of the database startup program installed on the primary device, and receiving the program identification information of the primary database startup program means that the backup device can directly use the database startup program in the backup device to parse the startup parameter information.
Optionally, although the same database startup program is installed in the primary device and the backup device, the startup parameter information of different primary devices may be analyzed based on different program identification information and the database startup program in the backup device. Based on fig. 2, for example, two different main devices 202 and 204 exist in the entire system, where the main device 202, the main device 204, and the standby device are installed with the same database startup program, but the program identification information of the database startup programs of the main device 202 and the main device 204 are different, and if the main device 202 goes down, the monitoring device sends the startup parameter information of the main device 202 to the standby device 206, and the startup parameter of the main device 202 can be analyzed only if the standby device writes the program identification information of the main database startup program corresponding to the main device 202 into the database startup program of the standby device. Similarly, assuming that the main device 204 is down, the monitoring device sends the startup parameter information of the main device 204 to the standby device 206, and the startup parameter of the main device 204 may be analyzed only if the standby device writes the program identification information of the main database startup program corresponding to the main device 204 into the database startup program of the standby device. Therefore, the reliability of the whole switching process is ensured.
Optionally, although the same database startup program is installed in the main device and the standby device, in the actual application process, the database startup program in the main device that is normally used may be iterated. In order to ensure that the switched backup device uses the database startup program of the latest version, the program identification information includes the database startup program of the latest version. The standby equipment receives the program identification information, analyzes the program identification information to obtain the latest version of the database startup program and the version number of the latest version of the database startup program, determines the version number of the original database startup program in the standby equipment, and compares the version number of the database startup program with the version number of the latest version of the database startup program. If the comparison result is consistent, analyzing the starting parameter information by directly using the database starting program in the standby equipment, and if the comparison result is inconsistent, iterating the database starting program of the standby equipment according to the latest version of the database starting program and analyzing the starting parameter information based on the iterated database starting program.
S307: and the standby equipment starts a main database based on the analyzed starting parameters, and the cloud disk to be mounted is located in the main database.
Based on the foregoing embodiments, embodiments of the present application provide a selectable switching method for cloud storage services, which completely introduces a whole switching process. Fig. 6 is a schematic flowchart of a switching method of a cloud storage service provided in an embodiment of the present application, where the method includes:
s601: the monitoring device sends a first request and a second request to the master device.
S603: the monitoring equipment judges whether the first reply is received, if so, the S605 is turned to; if not, go to S607;
s605: the monitoring device judges whether a second reply is received, if so, the main device is not down and operates normally, and if not, the operation goes to S611;
s607: the monitoring equipment sends a third request to the information backup equipment;
s609: the information backup equipment sends starting parameter information to the monitoring equipment; in this case, the crash of the main device is the crash of the main device, and the process goes to S619;
s611: the monitoring equipment sends a third request to the main equipment;
s613: the main equipment sends starting parameter information to the monitoring equipment;
s615: the monitoring equipment sends a second control instruction to the main equipment;
s617: the main equipment unloads the cloud disk to be mounted;
s619: the method comprises the steps that monitoring equipment sends a first control instruction to standby equipment, wherein the first control instruction carries program identification information of a main database starting program, disc identification information of a cloud disc to be mounted and starting parameter information of the main equipment;
s621: the standby equipment replaces the disk identification information of the locally mounted occupation cloud disk with the disk identification information of the cloud disk to be mounted on the basis of the received disk identification information of the cloud disk to be mounted;
s623: the standby equipment unloads the mounted occupied cloud disk;
s625: under the condition that the standby equipment and a first server corresponding to the main database establish communication connection, the standby equipment mounts the cloud disk to be mounted according to the disk identification information of the cloud disk to be mounted;
s627: the standby equipment analyzes the starting parameter information according to the starting program of the main database corresponding to the program identification information;
s629: and the standby equipment starts the main database based on the analyzed starting parameters.
In this embodiment of the application, the first control instruction further carries a network service name of the primary device, and the standby device creates a network port according to the network service name to support a storage service of a client corresponding to the primary device. In an optional implementation manner, the standby device and the first server establish an ethernet communication link, a master database in the first server is started based on the analyzed starting parameters, and after a data processing request of the client is received and calculated, the data processing request is sent to the first server, so that the client can access the master database, store data on the cloud disk to be mounted, read data on the cloud disk to be mounted, or download data from the cloud disk to be mounted. After the main device is switched, the main device can be used as a standby device of the whole cloud storage service switching system after fault recovery.
An embodiment of the present application further provides a switching device of a cloud storage service, and fig. 7 is a schematic structural diagram of the switching device of the cloud storage service provided in the embodiment of the present application, and as shown in fig. 7, the switching device includes:
the receiving module 701 is configured to receive a first control instruction sent by a monitoring device when the monitoring device detects that a main device is down; the first control instruction carries program identification information of a main database starting program, disk identification information of a cloud disk to be mounted and starting parameter information of main equipment;
the cloud disk loading and unloading module 702 is used for loading the cloud disk to be loaded according to the disk identification information, and the cloud disk to be loaded is located in the main database;
the information processing module 703 is configured to analyze the start parameter information according to the main database start program corresponding to the program identification information;
the database starting module 704 is configured to start the master database based on the analyzed starting parameters.
In an alternative embodiment, the apparatus further comprises:
when the space-occupying cloud disk is mounted locally, the information processing module is used for replacing disk identification information of the locally mounted space-occupying cloud disk with disk identification information of the cloud disk to be mounted;
the cloud disk loading and unloading module is used for unloading the occupied cloud disk.
In an alternative embodiment, the apparatus further comprises:
the communication establishing module is used for establishing an Ethernet communication link with the first server according to the identity information of the first server under the condition that the first control instruction also carries the identity information of the first server corresponding to the main database.
In an alternative embodiment, the apparatus further comprises:
the network port creating module is used for creating a network port according to the network service name under the condition that the first control instruction also carries the network service name of the main device, so as to support the storage service of the client corresponding to the main device.
The device and method embodiments in the device embodiment are based on the same application concept.
An embodiment of the present application further provides a switching device of a cloud storage service, and fig. 8 is a schematic structural diagram of the switching device of the cloud storage service provided in the embodiment of the present application, and as shown in fig. 8, the switching device includes:
the sending module 801 is configured to send a first control instruction to the standby device when the main device is detected to be down; the first control instruction carries program identification information of a main database starting program, disk identification information of the cloud disk to be mounted and starting parameter information of the main equipment, so that the standby equipment mounts the cloud disk to be mounted based on the disk identification information; analyzing the starting parameter information according to the main database starting program corresponding to the program identification information; starting a main database based on the analyzed data; the cloud disk to be mounted is located in the main database.
In an alternative embodiment, the apparatus further comprises:
the sending module is used for sending a second control instruction to the main equipment so as to enable the main equipment to unload the cloud disk to be mounted
In an alternative embodiment, the apparatus further comprises:
the receiving module is used for receiving the starting parameter information sent by the main equipment or the information backup equipment.
In an alternative embodiment, the apparatus further comprises:
the sending module is used for sending a third control instruction to a first server corresponding to the main database; the third control instruction carries the identity information of the standby equipment, so that the first server establishes an Ethernet communication link with the standby equipment according to the identity information of the standby equipment.
The device and method embodiments in the device embodiment are based on the same application concept.
The method provided by the embodiment of the application can be executed in a computer terminal, a server or a similar operation device. Taking an operation on a server as an example, fig. 9 is a hardware structure block diagram of a server of a switching method of a cloud storage service provided in an embodiment of the present application. As shown in fig. 9, the server 900 may have a relatively large difference due to different configurations or performances, and may include one or more Central Processing Units (CPUs) 910 (the processor 910 may include but is not limited to a Processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 930 for storing data, and one or more storage media 920 (e.g., one or more mass storage devices) for storing applications 923 or data 922. Memory 930 and storage media 920 may be, among other things, transient or persistent storage. The program stored in the storage medium 920 may include one or more modules, each of which may include a series of instruction operations in a server. Still further, the central processor 910 may be configured to communicate with the storage medium 920, and execute a series of instruction operations in the storage medium 920 on the server 900. The server 900 may also include one or more power supplies 960, one or more wired or wireless network interfaces 950, one or more input-output interfaces 940, and/or one or more operating systems 921, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, and so forth.
The input/output interface 940 may be used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the server 900. In one example, the input/output Interface 940 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the input/output interface 940 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
It will be understood by those skilled in the art that the structure shown in fig. 9 is only an illustration and is not intended to limit the structure of the electronic device. For example, server 900 may also include more or fewer components than shown in FIG. 9, or have a different configuration than shown in FIG. 9.
Embodiments of the present application further provide a storage medium, where the storage medium may be disposed in a server to store at least one instruction, at least one program, a code set, or a set of instructions related to implementing a switching method of a cloud storage service in method embodiments, where the at least one instruction, the at least one program, the code set, or the set of instructions are loaded and executed by the processor to implement the switching method of the cloud storage service provided in the above method embodiments.
Alternatively, in this embodiment, the storage medium may be located in at least one network server of a plurality of network servers of a computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
As can be seen from the embodiments of the switching method, the device, or the storage medium of the cloud storage service provided by the present application, in the present application, a first control instruction sent by a monitoring device when a downtime of a main device is detected is received by a standby device; the first control instruction carries program identification information of a main database startup program, disk identification information of a cloud disk to be mounted, and startup parameter information of the main device. And mounting the cloud disk to be mounted according to the disk identification information, wherein the cloud disk to be mounted is positioned in the main database, analyzing the starting parameter information according to a starting program of the main database corresponding to the program identification information, and starting the main database based on the analyzed starting parameter. Therefore, under the condition that the main equipment is delayed, the standby equipment can be started to replace the main equipment, maintenance personnel do not need to manually replace the main equipment, the dependence of the system on the maintenance personnel is reduced, and the operation and maintenance manpower is reduced
It should be noted that: the sequence of the embodiments of the present application is only for description, and does not represent the advantages and disadvantages of the embodiments. And specific embodiments thereof have been described above. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (9)

1. A switching method of cloud storage services is characterized by comprising the following steps:
when the monitoring equipment detects that the main equipment is down, the standby equipment receives a first control instruction sent by the monitoring equipment; the first control instruction carries program identification information of a main database starting program, disk identification information of a cloud disk to be mounted and starting parameter information of the main equipment, wherein before the main equipment goes down, the main equipment creates and mounts the cloud disk to be mounted, and the standby equipment creates and mounts an occupied cloud disk;
the standby equipment mounts the cloud disk to be mounted according to the disk identification information of the cloud disk to be mounted, and the cloud disk to be mounted is located in the main database, wherein the standby equipment unloads the cloud disk to be mounted after the standby equipment replaces the disk identification information of the locally mounted cloud disk to be the disk identification information of the cloud disk to be mounted;
the standby equipment analyzes the starting parameter information according to the starting program of the main database corresponding to the program identification information;
the standby equipment starts the main database based on the analyzed starting parameters;
the cloud disk to be mounted is mounted on the main equipment or the standby equipment at a time point.
2. The method according to claim 1, wherein the first control instruction further carries identity information of a first server corresponding to the master database;
the method further comprises the following steps:
and establishing an Ethernet communication link with the first server according to the identity information of the first server.
3. The method according to claim 1, wherein the first control instruction further carries a network service name of the master device;
the method further comprises the following steps:
and creating a network port according to the network service name so as to support the storage service of the client corresponding to the main equipment.
4. A switching method of cloud storage services is characterized by comprising the following steps:
when the main equipment is detected to be down, the monitoring equipment sends a first control instruction to the standby equipment; the first control instruction carries program identification information of a main database starting program, disk identification information of a cloud disk to be mounted and starting parameter information of the main equipment, so that the standby equipment mounts the cloud disk to be mounted based on the disk identification information of the cloud disk to be mounted; analyzing the starting parameter information according to the main database starting program corresponding to the program identification information; starting the main database based on the analyzed data; the cloud disk to be mounted is positioned in the main database; before the main device goes down, the main device creates and mounts the cloud disk to be mounted, and the standby device creates and mounts an occupied cloud disk; the standby equipment unloads the occupation cloud disk after replacing the disk identification information of the occupation cloud disk which is locally mounted with the disk identification information of the cloud disk to be mounted;
the cloud disk to be mounted is mounted on the main device or the standby device at a time point.
5. The method of claim 4, further comprising:
and sending a second control instruction to the main equipment to enable the main equipment to unload the cloud disk to be mounted.
6. The method of claim 4, further comprising:
and receiving the starting parameter information sent by the main equipment or the information backup equipment.
7. The method of claim 4, comprising:
sending a third control instruction to a first server corresponding to the master database; the third control instruction carries the identity information of the standby device, so that the first server establishes an ethernet communication link with the standby device according to the identity information of the standby device.
8. A switching device of a cloud storage service, comprising:
the monitoring device comprises a receiving module, a sending module and a judging module, wherein the receiving module is used for receiving a first control instruction sent by the monitoring device when the monitoring device detects that the main device is down; the first control instruction carries program identification information of a main database starting program, disk identification information of a cloud disk to be mounted and starting parameter information of the main equipment; before the main equipment is down, the main equipment creates and mounts the cloud disk to be mounted, and the standby equipment creates and mounts an occupied cloud disk;
the cloud disk loading and unloading module is used for loading the cloud disk to be loaded according to the disk identification information of the cloud disk to be loaded, and the cloud disk to be loaded is positioned in the main database; the standby equipment unloads the occupation cloud disk after replacing the disk identification information of the occupation cloud disk which is locally mounted with the disk identification information of the cloud disk to be mounted;
the information processing module is used for analyzing the starting parameter information according to a main database starting program corresponding to the program identification information;
the database starting module is used for starting the main database based on the starting parameters obtained after analysis;
the cloud disk to be mounted is mounted on the main equipment or the standby equipment at a time point.
9. A switching device of a cloud storage service, comprising:
the sending module is used for sending a first control instruction to the standby equipment when the main equipment is detected to be down; the first control instruction carries program identification information of a main database starting program, disk identification information of a cloud disk to be mounted and starting parameter information of the main equipment, so that the standby equipment mounts the cloud disk to be mounted based on the disk identification information of the cloud disk to be mounted; analyzing the starting parameter information according to the main database starting program corresponding to the program identification information; starting the main database based on the analyzed data; the cloud disk to be mounted is positioned in the main database; before the main device goes down, the main device creates and mounts the cloud disk to be mounted, and the standby device creates and mounts an occupied cloud disk; the standby equipment unloads the occupation cloud disk after replacing the disk identification information of the occupation cloud disk which is locally mounted with the disk identification information of the cloud disk to be mounted;
the cloud disk to be mounted is mounted on the main device or the standby device at a time point.
CN201910476478.4A 2019-06-03 2019-06-03 Switching method and device of cloud storage service Active CN110333974B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910476478.4A CN110333974B (en) 2019-06-03 2019-06-03 Switching method and device of cloud storage service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910476478.4A CN110333974B (en) 2019-06-03 2019-06-03 Switching method and device of cloud storage service

Publications (2)

Publication Number Publication Date
CN110333974A CN110333974A (en) 2019-10-15
CN110333974B true CN110333974B (en) 2022-04-15

Family

ID=68141013

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910476478.4A Active CN110333974B (en) 2019-06-03 2019-06-03 Switching method and device of cloud storage service

Country Status (1)

Country Link
CN (1) CN110333974B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111414247A (en) * 2020-04-24 2020-07-14 北京金山云网络技术有限公司 Server switching method, device, management node and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102917038A (en) * 2012-10-10 2013-02-06 江苏物联网研究发展中心 Cloud computation based remote service system for medical internet of things
CN202798798U (en) * 2012-07-17 2013-03-13 江西省电力公司信息通信分公司 High availability system based on cloud computing technology
CN103226483A (en) * 2013-03-25 2013-07-31 成都瑞科电气有限公司 DHBS (dual hot-backup system) and method thereof based on SOA (service-oriented architecture) and cloud storage
CN104239164A (en) * 2013-06-19 2014-12-24 国家电网公司 Cloud storage based disaster recovery backup switching system
CN106817402A (en) * 2016-11-29 2017-06-09 上海亿账通互联网科技有限公司 Data cached processing method and processing device
CN107911238A (en) * 2017-11-13 2018-04-13 郑州云海信息技术有限公司 One kind is based on IPSAN servers two unit standby method and system
CN108351824A (en) * 2015-10-30 2018-07-31 Netapp股份有限公司 Method, equipment and medium for executing handover operation between calculate node
CN109144403A (en) * 2017-06-19 2019-01-04 阿里巴巴集团控股有限公司 A kind of method and apparatus for cloud disk pattern switching

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202798798U (en) * 2012-07-17 2013-03-13 江西省电力公司信息通信分公司 High availability system based on cloud computing technology
CN102917038A (en) * 2012-10-10 2013-02-06 江苏物联网研究发展中心 Cloud computation based remote service system for medical internet of things
CN103226483A (en) * 2013-03-25 2013-07-31 成都瑞科电气有限公司 DHBS (dual hot-backup system) and method thereof based on SOA (service-oriented architecture) and cloud storage
CN104239164A (en) * 2013-06-19 2014-12-24 国家电网公司 Cloud storage based disaster recovery backup switching system
CN108351824A (en) * 2015-10-30 2018-07-31 Netapp股份有限公司 Method, equipment and medium for executing handover operation between calculate node
CN106817402A (en) * 2016-11-29 2017-06-09 上海亿账通互联网科技有限公司 Data cached processing method and processing device
CN109144403A (en) * 2017-06-19 2019-01-04 阿里巴巴集团控股有限公司 A kind of method and apparatus for cloud disk pattern switching
CN107911238A (en) * 2017-11-13 2018-04-13 郑州云海信息技术有限公司 One kind is based on IPSAN servers two unit standby method and system

Also Published As

Publication number Publication date
CN110333974A (en) 2019-10-15

Similar Documents

Publication Publication Date Title
US11061713B2 (en) Prioritization and source-nonspecific based virtual machine recovery apparatuses, methods and systems
US10946276B2 (en) Application state backup and restoration across multiple devices
US11061776B2 (en) Prioritization and source-nonspecific based virtual machine recovery apparatuses, methods and systems
US20200057567A1 (en) Prioritization and Source-Nonspecific Based Virtual Machine Recovery Apparatuses, Methods and Systems
CN106878363B (en) Information processing method, device and system
WO2014055601A1 (en) Application state backup and restoration across multiple devices
WO2013096317A1 (en) Health check services for web-based collaboration environments
US20170090904A1 (en) Application management device, application management method, and computer-readable recording medium
US11636016B2 (en) Cloud simulation and validation system
WO2021184587A1 (en) Prometheus-based private cloud monitoring method and apparatus, and computer device and storage medium
CN113626286A (en) Multi-cluster instance processing method and device, electronic equipment and storage medium
US9002798B1 (en) Systems and methods for remedying corrupt backup images of host devices
CN108322540A (en) Customized data lead-in method, terminal and computer readable storage medium
CN110333974B (en) Switching method and device of cloud storage service
CN107391303B (en) Data processing method, device, system, server and computer storage medium
US7281165B2 (en) System and method for performing product tests utilizing a single storage device
CN111342986A (en) Distributed node management method and device, distributed system and storage medium
US10140187B1 (en) Techniques for system backup
US10275738B1 (en) Techniques for handling device inventories
CN109840094B (en) Database deployment method and device and storage equipment
US20230066698A1 (en) Compute instance warmup operations
CN114969206A (en) Data processing method, device, equipment and storage medium
CN111290873B (en) Fault processing method and device
CN114760314A (en) Server management method, device, computer equipment and storage medium
US9729698B2 (en) Increasing user memory space on end-of-life mobile user devices

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