CN107562382B - Automatic dynamic disk capacity expansion method and system based on timed task - Google Patents

Automatic dynamic disk capacity expansion method and system based on timed task Download PDF

Info

Publication number
CN107562382B
CN107562382B CN201710765142.0A CN201710765142A CN107562382B CN 107562382 B CN107562382 B CN 107562382B CN 201710765142 A CN201710765142 A CN 201710765142A CN 107562382 B CN107562382 B CN 107562382B
Authority
CN
China
Prior art keywords
disk
node
timing task
storage cluster
task
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
CN201710765142.0A
Other languages
Chinese (zh)
Other versions
CN107562382A (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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201710765142.0A priority Critical patent/CN107562382B/en
Publication of CN107562382A publication Critical patent/CN107562382A/en
Application granted granted Critical
Publication of CN107562382B publication Critical patent/CN107562382B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

The application discloses a method and a system for automatically and dynamically expanding a disk based on a timing task, wherein the method comprises the following steps: setting a specific mark on a disk which is not in the storage cluster; deploying the same timing task on each node in the storage cluster; automatically detecting whether each node has a disk with a specific mark or not according to the timing task; if yes, formatting the disk and adding the disk into the storage cluster; if not, the timing task is ended. The method and the device use the consistency timing task to carry out active disk detection, a drive program with high technical complexity is not required to be adopted to detect and report, the method and the device are more efficient than the traditional storage capacity expansion mode, the dynamic capacity expansion disk is realized, the work of operation and maintenance personnel is reduced, and the work efficiency of a storage cluster is improved.

Description

Automatic dynamic disk capacity expansion method and system based on timed task
Technical Field
The invention relates to the technical field of distributed storage, in particular to a method and a system for automatically and dynamically expanding a disk based on a timing task.
Background
In the using process of the storage system, some problems are often faced, for example, as the write data volume of the storage system increases, the system capacity cannot meet the user requirement, and a disk needs to be added to expand the capacity of the system.
Aiming at the problems, when the storage capacity in the traditional distributed storage cluster is expanded, firstly, a disk is manually inserted, a driver detects the hot plug of the disk and actively reports the hot plug of the disk, then, a capacity expansion instruction mode is issued, then, the disk is manually formatted, and then, data initialization conforming to the rules of a storage system is carried out on the disk, so that a new disk can be added into the storage cluster to provide services, the driver is complex, the process is complicated, and the efficiency is low.
Therefore, how to simply perform disk expansion on a system is a technical problem that needs to be solved urgently by those skilled in the art.
Disclosure of Invention
In view of this, the present invention provides a method and a system for automatically and dynamically expanding a disk based on a timing task, which can dynamically expand the disk, reduce the work of operation and maintenance personnel, and improve the work efficiency of a storage cluster. The specific scheme is as follows:
a method for automatically and dynamically expanding a disk based on a timing task comprises the following steps:
setting a specific mark on a disk which is not in the storage cluster;
deploying the same timing task on each node in the storage cluster;
automatically detecting whether each node has a disk with the specific mark according to the timing task;
if so, formatting the disk and adding the disk to the storage cluster;
if not, the timing task is ended.
Preferably, in the method for automatically and dynamically expanding a disk based on a timed task according to the embodiment of the present invention, automatically detecting whether each node has a disk with the specific flag according to the timed task includes:
judging whether a node corresponding to the timing task is a main node;
if the node is a main node, the main node sends out query instructions to all nodes periodically, and whether a magnetic disk with a specific mark exists on each node is automatically detected;
and if the node is not the main node, the timing task is ended.
Preferably, in the above method for automatically and dynamically expanding a disk based on a timed task provided in the embodiment of the present invention, formatting and adding the disk to the storage cluster specifically include:
sending out an instruction by the main node, and formatting the disk;
and initializing a specific file system for the disk processed after formatting so as to add the disk into the storage cluster.
Preferably, in the method for automatically and dynamically expanding a volume of a disk based on a timed task according to an embodiment of the present invention, the method further includes:
and when the main node is switched, the switched main node automatically executes the timing task.
The embodiment of the present invention further provides a disk automatic dynamic capacity expansion system based on a timing task, including:
the specific mark setting module is used for setting a specific mark on a disk which is not in the storage cluster;
the timing task deployment module is used for deploying the same timing task on each node in the storage cluster;
the disk judgment module is used for automatically detecting whether each node has a disk with the specific mark or not according to the timing task; if so, adding the disk into the storage cluster; if not, the timing task is ended.
Preferably, in the above automatic dynamic disk capacity expansion system based on a timed task provided in the embodiment of the present invention, the disk determining module specifically includes:
the main node judging unit is used for judging whether one node corresponding to the timing task is a main node; if the node is a main node, the main node sends out query instructions to all nodes periodically, and whether a magnetic disk with a specific mark exists on each node is automatically detected; and if the node is not the main node, the timing task is ended.
Preferably, in the above automatic dynamic disk capacity expansion system based on a timed task provided in the embodiment of the present invention, the disk determining module further includes:
the formatting processing unit is used for sending an instruction by the main node after the main node judging unit judges the disk with the specific mark, and formatting the disk;
and the initialization processing unit is used for initializing a specific file system of the disk processed after the formatting so as to add the disk into the storage cluster.
The invention provides a method and a system for automatically and dynamically expanding a disk based on a timing task, which comprises the following steps: setting a specific mark on a disk which is not in the storage cluster; deploying the same timing task on each node in the storage cluster; automatically detecting whether each node has a disk with a specific mark or not according to the timing task; if yes, formatting the disk and adding the disk into the storage cluster; if not, the timing task is ended. The invention uses the consistency timing task to carry out active disk detection, does not need to adopt a drive program detection reporting mode with high technical complexity, is more efficient than the traditional storage capacity expansion mode, realizes dynamic capacity expansion of the disk, reduces the work of operation and maintenance personnel and improves the work efficiency of a storage cluster.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in 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 embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a method for automatically and dynamically expanding a disk based on a timed task according to an embodiment of the present invention;
fig. 2 is a specific flowchart of a method for automatically and dynamically expanding a disk based on a timed task according to an embodiment of the present invention;
fig. 3 is an architecture diagram of a method for automatically and dynamically expanding a disk based on a timed task according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, 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 invention.
The invention provides a method for automatically and dynamically expanding a disk based on a timed task, which comprises the following steps of:
s101, setting a specific mark on a disk which is not in a storage cluster;
s102, deploying the same timing task on each node in the storage cluster;
s103, automatically detecting whether each node has a magnetic disk with a specific mark or not according to the timing task;
if yes, go to step S104; if not, executing step S105;
s104, formatting the disk and adding the disk into a storage cluster;
and S105, finishing the timing task.
In the above automatic dynamic disk capacity expansion method based on a timed task provided in the embodiment of the present invention, first, a specific flag (for example, the flag is "unbown") is set on a disk that is not in a storage cluster; then the same timing task is deployed on each node in the storage cluster (the data consistency rule of the distributed system is followed); then, automatically detecting whether each node has a magnetic disk with a specific mark (such as 'un') according to the timing task; if yes, formatting the disk and adding the disk into the storage cluster; if not, the timing task is ended. The consistency timing task is used for active disk detection, a driver program detection reporting mode with high technical complexity is not needed, the method is more efficient than the traditional storage capacity expansion mode, dynamic capacity expansion of the disk is achieved, operation and maintenance personnel are reduced, and the working efficiency of the storage cluster is improved.
It should be noted that, because the invention is a distributed storage cluster consistency timing task independent of master-slave node switching and a scheme of automatically detecting and adding a disk, no other human intervention is needed except for manual insertion of a disk, the invention is suitable for a distributed storage cluster, and can reduce the development difficulty of developers and the working complexity of operation and maintenance personnel.
In specific implementation, in the above method for automatically and dynamically expanding a disk based on a timed task according to the embodiment of the present invention, as shown in fig. 2, step S103 automatically detects whether each node has a disk with a specific flag according to the timed task, which specifically includes the following steps:
s201, judging whether a node corresponding to the timing task is a main node or not;
if the node is the master node, executing step S202; if the node is not the master node, executing step S105;
s202, the main node sends out inquiry commands to all nodes periodically, and whether the specific marked disks exist on each node is automatically detected.
It should be noted that all nodes include the master node and other slave nodes.
In specific implementation, in the above method for automatically and dynamically expanding a disk based on a timed task according to an embodiment of the present invention, as shown in fig. 2, step S104 is to format and add the disk to a storage cluster, and specifically includes:
s203, the main node sends out an instruction to format the disk;
and S204, initializing a specific file system of the disk subjected to the formatting post-processing to enable the disk to be added into the storage cluster.
In specific implementation, in the above method for automatically and dynamically expanding a disk based on a timed task according to an embodiment of the present invention, as shown in fig. 3, the method further includes:
when the main node is switched, the switched main node automatically executes a timing task.
Because the timing task is the same on each node, when the main node is switched, no additional operation is needed, and the normal operation of the automatic dynamic capacity expansion disk service is ensured.
Based on the same inventive concept, embodiments of the present invention further provide a disk automatic dynamic capacity expansion system based on a timing task, and because the principle of solving the problem of the system is similar to the foregoing disk automatic dynamic capacity expansion method based on a timing task, the implementation of the system may refer to the implementation of the disk automatic dynamic capacity expansion method based on a timing task, and repeated details are omitted.
In specific implementation, the automatic dynamic disk capacity expansion system based on the timed task provided in the embodiment of the present invention specifically includes:
the specific mark setting module is used for setting a specific mark on a disk which is not in the storage cluster;
the timing task deployment module is used for deploying the same timing task on each node in the storage cluster;
the disk judgment module is used for automatically detecting whether each node has a disk with a specific mark or not according to the timing task; if yes, adding the disk into the storage cluster; if not, the timing task is ended.
In the automatic dynamic capacity expansion system of the disk based on the timed task provided by the embodiment of the invention, the automatic dynamic capacity expansion is realized through the interaction of the three modules, and compared with a mode that a driver detects the hot plug of the disk and actively reports the hot plug and then issues a capacity expansion instruction, the implementation is simple, the complex process of developing the driver is omitted, and the working hours of developers are reduced.
In a specific implementation, in the automatic dynamic disk capacity expansion system based on a timed task according to an embodiment of the present invention, the disk determining module may specifically include:
the main node judging unit is used for judging whether one node corresponding to the timing task is a main node; if the nodes are the main nodes, the main nodes send query instructions to all the nodes periodically, and whether the specific marked disks exist on each node is automatically detected; and if the node is not the main node, ending the timing task.
Further, in a specific implementation, in the automatic dynamic capacity expansion system of a disk based on a timed task provided in the embodiment of the present invention, the disk determining module may further include:
the formatting processing unit is used for sending an instruction by the main node after the main node judging unit judges the disk with the specific mark, and formatting the disk;
and the initialization processing unit is used for initializing a specific file system of the disk processed after the formatting so as to add the disk into the storage cluster.
The embodiment of the invention provides a method and a system for automatically and dynamically expanding a disk based on a timing task, wherein the method comprises the following steps: setting a specific mark on a disk which is not in the storage cluster; deploying the same timing task on each node in the storage cluster; automatically detecting whether each node has a disk with a specific mark or not according to the timing task; if yes, formatting the disk and adding the disk into the storage cluster; if not, the timing task is ended. The invention uses the consistency timing task to carry out active disk detection, does not need to adopt a drive program detection reporting mode with high technical complexity, is more efficient than the traditional storage capacity expansion mode, realizes dynamic capacity expansion of the disk, reduces the work of operation and maintenance personnel and improves the work efficiency of a storage cluster.
Finally, it should also be noted that, in this document, terms such as "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The method and the system for automatically and dynamically expanding the capacity of the disk based on the timed task are described in detail, and specific examples are applied in the method to explain the principle and the implementation mode of the invention, and the description of the embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (7)

1. A method for automatically and dynamically expanding a disk based on a timing task is characterized by comprising the following steps:
setting a specific mark on a disk which is not in the storage cluster;
deploying the same timing task on each node in the storage cluster;
automatically detecting whether each node has a disk with the specific mark according to the timing task;
if so, formatting the disk and adding the disk to the storage cluster;
if not, the timing task is ended.
2. The method according to claim 1, wherein the step of automatically detecting whether the node has the disk with the specific mark according to the timed task includes:
judging whether a node corresponding to the timing task is a main node;
if the node is a main node, the main node sends out query instructions to all nodes periodically, and whether a disk with the specific mark exists on each node is automatically detected;
and if the node is not the main node, the timing task is ended.
3. The automatic dynamic capacity expansion method for a disk based on a timed task according to claim 2, wherein formatting and adding the disk to the storage cluster specifically includes:
sending out an instruction by the main node, and formatting the disk;
and initializing a specific file system for the disk processed after formatting so as to add the disk into the storage cluster.
4. The method according to claim 3, further comprising:
and when the main node is switched, the switched main node automatically executes the timing task.
5. The utility model provides an automatic dynamic dilatation system of disk based on regularly task which characterized in that includes:
the specific mark setting module is used for setting a specific mark on a disk which is not in the storage cluster;
the timing task deployment module is used for deploying the same timing task on each node in the storage cluster;
the disk judgment module is used for automatically detecting whether each node has a disk with the specific mark or not according to the timing task; if so, adding the disk into the storage cluster; if not, the timing task is ended.
6. The automatic dynamic disk capacity expansion system based on the timed task according to claim 5, wherein the disk judgment module specifically includes:
the main node judging unit is used for judging whether one node corresponding to the timing task is a main node; if the node is a main node, the main node sends out query instructions to all nodes periodically, and whether a disk with the specific mark exists on each node is automatically detected; and if the node is not the main node, the timing task is ended.
7. The automatic dynamic capacity expansion system of a disk based on a timed task according to claim 6, wherein the disk determining module further includes:
the formatting processing unit is used for sending an instruction by the main node after the main node judging unit judges the disk with the specific mark, and formatting the disk;
and the initialization processing unit is used for initializing a specific file system of the disk processed after the formatting so as to add the disk into the storage cluster.
CN201710765142.0A 2017-08-30 2017-08-30 Automatic dynamic disk capacity expansion method and system based on timed task Active CN107562382B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710765142.0A CN107562382B (en) 2017-08-30 2017-08-30 Automatic dynamic disk capacity expansion method and system based on timed task

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710765142.0A CN107562382B (en) 2017-08-30 2017-08-30 Automatic dynamic disk capacity expansion method and system based on timed task

Publications (2)

Publication Number Publication Date
CN107562382A CN107562382A (en) 2018-01-09
CN107562382B true CN107562382B (en) 2020-05-29

Family

ID=60978407

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710765142.0A Active CN107562382B (en) 2017-08-30 2017-08-30 Automatic dynamic disk capacity expansion method and system based on timed task

Country Status (1)

Country Link
CN (1) CN107562382B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109358813B (en) * 2018-10-10 2022-03-04 郑州云海信息技术有限公司 Capacity expansion method and device for distributed storage system
CN109521958B (en) * 2018-10-22 2022-02-18 郑州云海信息技术有限公司 Delay processing method and device for data distribution
CN112445802A (en) * 2020-12-03 2021-03-05 中国建设银行股份有限公司 Method and device for expanding database, electronic equipment and computer storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105743671B (en) * 2014-12-10 2020-07-14 华为技术有限公司 Capacity expansion method, controller and system
CN106571943A (en) * 2015-10-10 2017-04-19 北京国双科技有限公司 Distributed-type configuration cluster capacity-expanding method and device
KR102449193B1 (en) * 2015-12-04 2022-09-29 삼성전자주식회사 Memory package including buffer, expandable memory module and multi-module memory system

Also Published As

Publication number Publication date
CN107562382A (en) 2018-01-09

Similar Documents

Publication Publication Date Title
CN107562382B (en) Automatic dynamic disk capacity expansion method and system based on timed task
CN109376197B (en) Data synchronization method, server and computer storage medium
WO2016165470A1 (en) Vnf instance processing method and device, and vnfm
CN104714811A (en) Method and device for manufacturing difference upgrade package and system difference upgrade method and device
CN102404603B (en) Detection method and the system of the USB device plug on Set Top Box
CN104601366A (en) Configuration service method and device for control and service nodes
WO2016183918A1 (en) Method and device for processing storage space
CN105591778A (en) Method and system for updating configuration file in distributed system
CN103440111A (en) Method for expanding disk space of virtual machines, host machines and platform
CN108445788B (en) Hotel scene control method and related device
CN111666266A (en) Data migration method and related equipment
CN102891879A (en) Method and device for supporting cluster expansion
CN104361098A (en) Method applied to customization of nodes in topological graph of cloud system
CN103248522A (en) Performance data reporting method and device
CN104268097A (en) Metadata processing method and system
CN107621994B (en) Method and device for creating data snapshot
CN105260266A (en) Snapshot volume writing method and dependent snapshot system
CN103581262A (en) Master-and-backup data synchronizing method, device and system
CN101242201B (en) A master-slave system maintenance method, system and device
CN112527561B (en) Data backup method and device based on Internet of things cloud storage
CN110209418B (en) Program updating method, device, equipment and computer readable storage medium
CN106843925B (en) Dynamic loading method for functional module of DSP
CN108055159A (en) A kind of clustered node operation synchronous method and device
CN112905696B (en) Multi-computer-room synchronization method based on transaction identifier, computing device and storage medium
CN109358813A (en) A kind of expansion method and device of distributed memory system

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