CN113391757B - Node expansion method and device and migration node - Google Patents

Node expansion method and device and migration node Download PDF

Info

Publication number
CN113391757B
CN113391757B CN202010171580.6A CN202010171580A CN113391757B CN 113391757 B CN113391757 B CN 113391757B CN 202010171580 A CN202010171580 A CN 202010171580A CN 113391757 B CN113391757 B CN 113391757B
Authority
CN
China
Prior art keywords
disk
node
security domain
physical
physical disk
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
CN202010171580.6A
Other languages
Chinese (zh)
Other versions
CN113391757A (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.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital 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 Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN202010171580.6A priority Critical patent/CN113391757B/en
Publication of CN113391757A publication Critical patent/CN113391757A/en
Application granted granted Critical
Publication of CN113391757B publication Critical patent/CN113391757B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/0604Improving or facilitating administration, e.g. storage management
    • 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/062Securing 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/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0647Migration mechanisms
    • 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]
    • 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/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • G06F3/0689Disk arrays, e.g. RAID, JBOD

Abstract

The embodiment of the invention provides a node expansion method, a node expansion device and an immigration node. The method comprises the following steps: switching to a data reconstruction prohibition state, and refusing to execute data reconstruction operation by the node in the data reconstruction prohibition state; when the physical disks of other nodes are migrated to the migration node, determining a security domain to which the physical disks belong in the other nodes as a target security domain, wherein the other nodes are in the state of prohibiting data reconstruction in advance; adding the physical disk into a target security domain, and starting a service corresponding to the physical disk to manage the physical disk; and after determining that the disk migration is finished, terminating the data reconstruction prohibition state. The node expansion can be realized in a physical disk migration mode without data migration, unnecessary data reconstruction is avoided by limiting data reconstruction of the nodes, and the rapid node expansion is realized, so that the data pressure is effectively reduced.

Description

Node expansion method and device and migration node
Technical Field
The present invention relates to the technical field of storage devices, and in particular, to a node expansion method and apparatus, and an immigration node.
Background
To reduce the data pressure on the nodes in the storage system, the nodes in the storage system may be expanded to equalize the data pressure on each node. In the related art, a new node may be added to the storage system, and part of data in the node that exists originally may be migrated to the storage medium in the new node.
However, when the amount of data is large, data migration may take much time, resulting in excessive time cost for node expansion. Therefore, it is difficult to effectively reduce the data pressure.
Disclosure of Invention
The embodiment of the invention aims to provide a node expansion method, a node expansion device and a node, so as to realize rapid node expansion, and further effectively reduce the data pressure of the node. The specific technical scheme is as follows:
in a first aspect of the embodiments of the present invention, a node expansion method is provided, which is applied to an migrating node, where the migrating node is a node newly added in a storage pool cluster, the storage pool cluster includes a plurality of nodes, and at least one other node except the migrating node includes at least one security domain, and each security domain includes at least one physical disk, and the method includes:
switching to a data reconstruction prohibition state, and refusing to execute data reconstruction operation by the node in the data reconstruction prohibition state;
when the physical disks of the other nodes are migrated to the migration node, determining a security domain to which the physical disks belong in the other nodes as a target security domain, wherein the other nodes are in the state of prohibiting data reconstruction in advance;
adding the physical disk into a target security domain;
and after determining that the disk migration is finished, terminating the data reconstruction prohibition state.
In a possible embodiment, the terminating the data reconstruction disabled state after determining that the disk migration is finished includes:
and when all the physical disks included in the target security domain are migrated to the migration node, terminating the data reconstruction prohibition state.
In a possible embodiment, the total capacity of the physical disks included in each of the security domains in the other nodes is the same.
In a possible embodiment, each physical disk in the other nodes stores a disk identifier of the physical disk, where the disk identifier is used to indicate a security domain to which the physical disk belongs in the other nodes;
the determining, as a target security domain, a security domain to which the physical disk belongs in the other nodes includes:
acquiring a disk identifier stored in the physical disk;
and determining the security domain represented by the disk identification as a target security domain.
In one possible embodiment, the disk identifier is a disk number;
the determining the security domain represented by the disk identifier as the target security domain includes:
and determining the security domain corresponding to the acquired disk number as a target security domain according to the preset corresponding relationship between the disk number and the security domain.
In a second aspect of the embodiments of the present invention, there is provided a node expansion apparatus, applied to an migrating node, where the migrating node is a node newly added in a storage pool cluster, the storage pool cluster includes a plurality of nodes, and at least one other node except the migrating node includes at least one security domain, and each security domain includes at least one physical disk, the method includes:
the data reconstruction switch module is used for switching to a data reconstruction forbidding state, and the nodes in the data reconstruction forbidding state refuse to execute data reconstruction operation;
a disk service loading module, configured to determine, when the physical disk of the other node is migrated to the migration node, a security domain to which the physical disk belongs in the other node, as a target security domain, where the other node is in the prohibited data reconfiguration state in advance;
the disk service starting module is used for adding the physical disk into a target security domain;
and the data reconstruction switch module is further used for terminating the data reconstruction prohibition state after the disk migration is determined to be finished.
In a possible embodiment, the data reconfiguration switch module is specifically configured to terminate the data reconfiguration disabled state when all the physical disks included in the target security domain are migrated to the migration node.
In a possible embodiment, the total capacity of the physical disks included in each of the security domains in the other nodes is the same.
In a possible embodiment, each physical disk in the other nodes stores a disk identifier of the physical disk, where the disk identifier is used to indicate a security domain to which the physical disk belongs in the other nodes;
the disk service loading module is specifically configured to obtain a disk identifier stored in the physical disk;
and determining the security domain represented by the disk identification as a target security domain.
In one possible embodiment, the disk identifier is a disk number;
the disk service loading module is specifically configured to determine, according to a preset correspondence between a disk number and a security domain, a security domain corresponding to the acquired disk number, and use the security domain as a target security domain.
In a third aspect of the embodiments of the present invention, there is provided an migration node, where the storage pool cluster includes a plurality of nodes, and at least one other node except the migration node includes at least one security domain, and each security domain includes at least one physical disk, where the node includes:
a physical disk slot position for inserting a physical disk;
a memory for storing a computer program;
a processor adapted to perform the method steps of any of the above first aspects when executing a program stored in the memory.
In a fourth aspect of embodiments of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, which, when being executed by a processor, carries out any of the above-mentioned method steps.
The node expansion method, the node expansion device and the migration node provided by the embodiment of the invention can realize node expansion in a physical disk migration mode without data migration, and avoid unnecessary data reconstruction by limiting the data reconstruction of the node so as to realize rapid node expansion, thereby effectively reducing data pressure. Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
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 embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1a is a schematic structural diagram of a storage pool cluster according to an embodiment of the present invention before a node is newly added;
fig. 1b is a schematic structural diagram of a storage pool cluster according to an embodiment of the present invention after a node is newly added;
fig. 2 is a schematic flowchart of a node expansion method according to an embodiment of the present invention;
fig. 3a is a schematic structural diagram of a single node according to an embodiment of the present invention;
fig. 3b is a schematic structural diagram of a newly added node in a storage pool cluster in an application scenario in which a single node is extended to three nodes according to an embodiment of the present invention;
fig. 3c is a schematic structural diagram of an expanded storage pool cluster node in an application scenario in which a single node is expanded to three nodes according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a method for single-node expansion to multi-node according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a node expansion apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an migration node 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.
In order to more clearly describe the node extension method provided in the embodiment of the present invention, an application scenario of the node extension method provided in the embodiment of the present invention will be described below. The storage pool cluster may include a plurality of nodes, which may vary depending on the application scenario. For ease of description, assuming that the storage pool clusters are as shown in FIG. 1a, the reference numbers in FIG. 1a have the meanings indicated in the following table:
reference numerals Refers to
101 Node 1
102 Node 2
111 Security domain 1
112 Security domain 2
113 Security domain 3
114 Security domain 4
121 Physical disk 1
122 Physical disk 2
123 Physical disk 3
124 Physical disk 4
125 Physical disk 5
126 Physical disk 6
127 Physical disk 7
128 Physical disk 8
It should be understood that fig. 1a is a schematic diagram illustrating a possible structure of a storage pool cluster according to an embodiment of the present invention, and in other possible embodiments, the number of security domains included in each node in the storage pool cluster and the number of physical disks included in each security domain may be different, which is not limited by the embodiment.
In the storage pool cluster, different security domains in each node are isolated from each other, that is, if a plurality of security domains exist in one node, a physical disk in one security domain of the plurality of security domains fails, and the security of data stored in physical disks in other security domains is not affected.
And each physical disk in each security domain corresponds to one or more services that manage the physical disk. The number of services corresponding to each physical disk may be different according to different actual application scenarios, for example, if only one logical partition exists in one physical disk, the logical partition may be regarded as one virtual disk in the storage system, and the virtual disk may be managed by one service in the storage pool cluster, that is, the physical disk corresponds to one service. For another example, if there are multiple logical partitions in one physical disk, the multiple logical partitions may be regarded as multiple virtual disks in the storage pool cluster, and the multiple virtual disks may be managed by multiple services in the storage pool cluster, that is, the physical disk corresponds to the multiple services. And different virtual disks can be managed by different services or the same service, and similarly, different physical disks can be managed by different services or the same service.
For example, the physical disk 1 in the security domain 1 corresponds to one service for managing the physical disk 1, the physical disk 3 in the security domain 2 corresponds to one service for managing the physical disk 3, and the services corresponding to the physical disk 1 and the physical disk 3 may be the same or different, which is not limited in this embodiment.
For practical purposes, the user may need to expand the nodes of the storage pool cluster to more than 2, and for convenience of description, it is assumed that the nodes need to be expanded to 3. Then a node may be added to the storage pool cluster, and after adding a node, the structure of the storage pool cluster may be as shown in fig. 1b, where 103 is the added node. At this time, the newly added node does not include a physical disk, and the physical disk needs to be added to the newly added node to complete node expansion. It can be understood that the virtual disk is obtained by dividing the physical disk base on a logical level, and therefore the newly added node does not include the physical disk nor the virtual disk.
Referring to fig. 2, fig. 2 is a schematic flow chart of a node expansion method according to an embodiment of the present invention, where the method is applied to a newly added node, and for convenience of description, the method may include:
s201, switching to a state of prohibiting data reconstruction.
The node in the disabled data reconfiguration state refuses to perform the data reconfiguration operation. The preset data reconstruction switch is turned off to switch the immigration node to the state of prohibiting data reconstruction. When the disk of the node is changed, for example, the original physical disk is pulled out, or a new physical disk is inserted, or the physical disk is logically partitioned again, the node performs data reconstruction, so that the changed disk can normally work. And the nodes in the state of prohibiting data reconstruction do not execute the data reconstruction operation after the disk is changed.
S202, when the physical disks of other nodes are migrated to the migration node, determining a security domain to which the physical disks belong in the other nodes as a target security domain.
The other nodes refer to nodes in the storage pool cluster except for the migration node, and it is understood that the other nodes and the migration node are referred to as storage nodes, and the nodes are referred to by different names only for distinguishing the nodes for convenience of description, and do not indicate that the other nodes and the migration node are substantially different. And the other nodes comprise at least one security domain, each security domain comprising at least 1 physical disk. For example, taking fig. 1b as an example, the other nodes may be node 1 and node 2. The other nodes are in the data reconstruction prohibition state in advance, and as described above with respect to the data reconstruction prohibition state, because the other nodes and the migration node are in the data reconstruction prohibition state, when the physical disk is migrated from the other nodes to the migration node, the other nodes and the migration node do not trigger data reconstruction.
It can be understood that, because the virtual disk is established on the logical level of the physical disk, determining the security domain to which the physical disk belongs in other nodes may refer to determining the security domain to which the virtual disk partitioned by the physical disk belongs in other nodes on the logical level, or may refer to directly determining the security domain to which the physical disk belongs in other nodes.
The other nodes may refer to one node in the storage pool cluster except the migration node, or may refer to a plurality of nodes in the storage pool cluster except the migration node. Taking fig. 1b as an example, the other node may be node 1, node 2, or node 1 and node 2. The physical disks of other nodes are migrated to the migration node, which may refer to migrating the physical disk 3 and the physical disk 4 in the node 1 to the migration node, or migrating the physical disk 5 and the physical disk 6 in the node 2 to the migration node, or migrating the physical disk 3 and the physical disk 4 in the node 1, and the physical disk 5 and the physical disk 6 in the node 2 to the migration node. The present embodiment does not limit this.
And S203, adding the physical disk into the target security domain.
It will be appreciated that the physical disk migrated to the migration node originally belongs to the target security domain in the other nodes. Before the physical disk is pulled out from other nodes and migrated to the migration node, the physical disk belongs to a pulled-out state, but since each node is in a data reconstruction disabled state and no data reconstruction operation is performed, the storage pool cluster also retains the relevant information of the physical disk.
And after the physical disk is migrated to the migration node, the physical disk is in a state of being inserted into the migration node, and the physical disk is added into the target security domain. After being migrated to the migration node, the physical disk still belongs to the target security domain, so that the migration node can provide the same working environment for the physical disk in other nodes as the physical disk. For example, for a physical disk inserted into a node, the node may manage the physical disk through a service preset for the physical disk, and assuming that the physical disk is managed by other nodes through a service a before being migrated to a migration node, after the physical disk is migrated to the migration node, the migration node may start the service a to manage the physical disk according to a corresponding relationship between the service and the physical disk. The above-mentioned starting service manages the physical disk, and may refer to starting the service to manage the virtual disk for each virtual disk divided from the physical disk. The physical disk is actually in the same working environment as before migration, and only the position is migrated from other nodes to the migration node, so that the physical disk can normally operate.
It can be understood that, since the virtual disk is established on the logical level of the physical disk, it is equivalent to add the physical disk to the target security domain, and add all virtual disks partitioned from the physical disk to the target security domain.
And S204, after the disk migration is determined to be finished, terminating the state of forbidding data reconstruction.
The end of the disk migration may be determined when a disk migration end instruction input by a user is received, and for example, when the node manages the physical disk through the service, the end of the disk migration may be determined after the corresponding service is started and management of the physical disk is started. When the physical disk migrated to the migration node is multiple physical disks, it may be determined that the disk migration is finished after each physical disk is added to the corresponding target security domain.
For example, in one possible embodiment, the migration of physical disks may be in units of security domains. As shown in fig. 1b, for example, all physical disks in the security domain 1 may be migrated to the migration node. After all the physical disks included in the target security domain are migrated to the migration node, the disk migration is considered to be finished, and the data reconstruction prohibition state is terminated.
It can be understood that, at this time, because part of the physical disks in the other nodes are migrated to the migration node, the migration node also has a certain storage capacity, and thus can share the data pressure with the other nodes to reduce the data pressure borne by a single node.
By adopting the embodiment, on one hand, the node expansion can be realized in a physical disk migration mode without data migration, unnecessary data reconstruction is avoided by limiting the data reconstruction of the node, the time cost of the node expansion can be effectively reduced, and the data pressure is effectively reduced.
On the other hand, for the user, the node expansion can be realized only by adding the newly added node into the storage pool cluster and migrating the physical disk to the migration node, and the operation is simple and convenient.
For more clearly explaining the node extension method provided by the embodiment of the present invention, an application scenario in which a single node is extended to multiple nodes is taken as an example, and for convenience of description, it is assumed that the single node is extended to the three nodes, and in other application scenarios, the single node may be extended to other number of nodes, which is not limited in the embodiment.
Referring to fig. 3 a-3 c, the reference numerals in fig. 3 a-3 c have the meanings indicated in the following table:
reference numerals Refers to
101 Node 1
102 Node 2
103 Node 3
111 Security domain 1
112 Security domain 2
113 Security domain 3
121 Physical disk 1
122 Physical disk 2
123 Physical disk 3
124 Physical disk 4
125 Physical disk 5
126 Physical disk 6
The structure of a single node may be as shown in fig. 3a, where the single node only includes a node 1, and the node 1 includes 3 security domains, which are respectively denoted as a security domain 1, a security domain 2, and a security domain 3, where the security domain 1 includes a physical disk 1 and a physical disk 2, the security domain 2 includes a physical disk 3 and a physical disk 4, and the security domain 3 includes a physical disk 5 and a physical disk 6.
A user needs to expand a single node to three nodes according to actual needs, and then two newly added nodes may be added to the storage pool cluster, and the structure after addition may be as shown in fig. 3b, where node 2 and node 3 are newly added nodes.
The following description will be made in conjunction with steps performed by the nodes and the users in the application scenario, and may refer to fig. 4, which includes:
s401, the user closes the data reconstruction switch, so that all the nodes in the storage pool cluster are switched to a state of prohibiting data reconstruction.
S402, the user pulls the physical disk 1 and the physical disk 2 out of the node 1 and inserts the physical disk into the node 2.
And S403, the node 2 acquires the disk identifiers of the physical disk 1 and the physical disk 2, and determines the security domains to which the physical disk 1 and the physical disk 2 belong.
The disk identifier is stored in the physical disk and used for representing the security domain to which the physical disk belongs. The form of the identifier may be different according to different application scenarios, and for example, the disk identifier may be a disk number, for example, "1" is a disk identifier of the physical disk 1, and "2" is a disk identifier of the physical disk 2. In the process of pulling out and inserting the physical disk, the disk identifier stored inside the physical disk does not change, so that the node 2 can determine that the security domains to which the physical disk 1 and the physical disk 2 belong are security domains 1.
If the physical disk is divided into a virtual disk in the logical layer, the disk identifier of the physical disk may be stored in the virtual disk, and if the physical disk is divided into a plurality of virtual disks in the logical layer, the disk identifier of the physical disk may be stored in a logical partition, corresponding to the virtual disk, of the physical disk for each virtual disk. For example, assuming that the storage space of the physical disk 1 is divided into a virtual disk 1, a virtual disk 2, and a virtual disk 3, where the virtual disk 1 corresponds to the logical partition 1 in the physical disk 1, the virtual disk 2 corresponds to the logical partition 2 in the physical disk 1, and the virtual disk 3 corresponds to the logical partition 3 in the physical disk 1, it may be that disk identifiers of the physical disk 1 are written in the logical partition 1, the logical partition 2, and the logical partition 3, respectively, so that the node 2 may determine the security domain to which the virtual disks 1-3 belong according to the disk identifiers in the virtual disks 1-3.
S404, the node 2 adds the physical disk 1 and the physical disk 2 to the security domain 1, starts the service management physical disk 1 corresponding to the physical disk 1, and starts the service management physical disk 2 corresponding to the physical disk 2.
It is understood that fig. 4 is only a possible schematic diagram, and in other possible embodiments, S403 and S404 may also be executed alternately, for example, the node 2 obtains a disk identifier of the physical disk 1, determines that the physical disk 1 belongs to the security domain 1, adds the physical disk 1 to the security domain 1, and starts a service corresponding to the physical disk 1 to manage the physical disk 1. And acquiring a disk identifier of the physical disk 2, determining that the physical disk 2 belongs to the security domain 1, adding the physical disk 2 into the security domain 1, and starting a service corresponding to the physical disk 2 to manage the physical disk 2.
S405, the user pulls out the physical disk 3 and the physical disk 4 from the node 1, and inserts the physical disk into the node 3.
It can be understood that, in other possible embodiments, a user may also pull and plug the physical disks according to different orders according to actual requirements, for example, the physical disk 3 and the physical disk 4 may be pulled out from the node 1 and inserted into the node 3, and then the physical disk 1 and the physical disk 2 are pulled out from the node 1 and inserted into the node 2, which is not limited in this embodiment.
S406, the node 3 obtains the disk identifiers of the physical disks 3 and 4, and determines the security domains to which the physical disks 3 and 4 belong.
The node 3 may determine that the physical disk 3 and the physical disk 4 belong to the security domain 2.
S407, the node 3 adds the physical disk 3 and the physical disk 4 into the security domain 2, starts the service management physical disk 3 corresponding to the physical disk 3, and starts the service management physical disk 4 corresponding to the physical disk 4.
S408, the user starts a data reconstruction switch so as to switch all the nodes in the storage pool cluster to a state of prohibiting data reconstruction.
At this time, each node is allowed to execute data reconstruction operation, the node 2 performs data reconstruction on the physical disk 1 and the physical disk 2, and the node 3 performs data reconstruction on the physical disk 3 and the physical disk 4, so that the physical disk 1, the physical disk 2, the physical disk 3 and the physical disk can normally operate. Physical disks are inserted into the nodes 2 and 3, so that the method has certain storage capacity and realizes the expansion from the original single node to three nodes. The structure of the expanded node can be as shown in fig. 3 c.
For a user, only the newly added node needs to be added to the storage pool cluster, and the physical disk in the original node is migrated to the newly added node by using the security domain as a unit, so that the operation is simple and convenient. In addition, since the entire process does not require data migration, time is less spent.
In a possible embodiment, the total capacity of the physical disks included in each security domain is the same, and taking the application scenario as an example, the total capacity of the physical disks 1 and 2, the total capacity of the physical disks 3 and 4, and the total capacity of the physical disks 5 and 6 may be the same. In this case, after the nodes are expanded, the node 1 includes the physical disk 5 and the physical disk 6, the node 2 includes the physical disk 1 and the physical disk 2, and the node 3 includes the physical disk 3 and the physical disk 4, so that the total capacity of each node is the same, and load balancing can be performed better. If the total capacities of the physical disks of different security domains are different, taking the application scenario as an example, assume that the total capacities of the physical disk 1 and the physical disk 2 are 1 unit, the total capacities of the physical disk 3 and the physical disk 4 are 2 units, and the total capacities of the physical disk 5 and the physical disk 6 are 1 unit. After the nodes are expanded, if the node 1, the node 2 and the node 3 bear the same load, the pressure of the node 1 and the node 2 may be too high, and the pressure of the node 3 may be too low, which results in waste of the performance of the device. With the embodiment, the data pressures borne by the node 1, the node 2 and the node 3 are the same, so that the technical problem can be effectively avoided.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a node expansion apparatus according to an embodiment of the present invention, which may be applied to an migrating node, where the migrating node is a newly added node in a storage pool cluster, where the storage pool cluster includes a plurality of nodes, and at least one other node than the migrating node includes at least one security domain, and each security domain includes at least one physical disk, and the apparatus includes:
the data reconstruction switch module 501 is configured to switch to a data reconstruction prohibition state, where a node in the data reconstruction prohibition state refuses to perform data reconstruction operation;
a disk service loading module 502, configured to determine, when the physical disk of the other node is migrated to the migration node, a security domain to which the physical disk belongs in the other node, as a target security domain, where the other node is in the prohibited data reconfiguration state in advance;
a disk service starting module 503, configured to add the physical disk into a target security domain, and start a service corresponding to the physical disk to manage the physical disk;
the data reconstruction switch module 501 is further configured to terminate the data reconstruction disabled state after determining that the disk migration is finished.
In a possible embodiment, the data reconfiguration switch module 501 is specifically configured to terminate the data reconfiguration disabled state when all the physical disks included in the target security domain are migrated to the migration node.
In a possible embodiment, the total capacity of the physical disks included in each of the security domains in the other nodes is the same.
In a possible embodiment, each physical disk in the other nodes stores a disk identifier of the physical disk, where the disk identifier is used to indicate a security domain to which the physical disk belongs in the other nodes;
the disk service loading module 502 is specifically configured to obtain a disk identifier stored in the physical disk;
and determining the security domain represented by the disk identification as a target security domain.
In one possible embodiment, the disk identifier is a disk number;
the disk service loading module 502 is specifically configured to determine, according to a preset correspondence between a disk number and a security domain, a security domain corresponding to the acquired disk number, as a target security domain.
An embodiment of the present invention further provides a migration node, which is applied to a storage pool cluster, where the storage pool cluster includes a plurality of nodes, and at least one other node except the migration node includes at least one security domain, and each security domain includes at least one physical disk, and a node may include, as shown in fig. 6:
the disk slot is used for inserting a physical disk;
a memory 601 for storing a computer program;
the processor 602 is configured to implement the following steps when executing the program stored in the memory 601:
switching to a data reconstruction prohibition state, and refusing to execute data reconstruction operation by the node in the data reconstruction prohibition state;
when the physical disks of the other nodes are migrated to the migration node, determining a security domain to which the physical disks belong in the other nodes as a target security domain, wherein the other nodes are in the state of prohibiting data reconstruction in advance;
adding the physical disk into a target security domain;
and after determining that the disk migration is finished, terminating the data reconstruction prohibition state.
In a possible embodiment, the terminating the data reconstruction disabled state after determining that the disk migration is finished includes:
and when all the physical disks included in the target security domain are migrated to the migration node, terminating the data reconstruction prohibition state.
In a possible embodiment, the total capacity of the physical disks included in each of the security domains in the other nodes is the same.
In a possible embodiment, each physical disk in the other nodes stores a disk identifier of the physical disk, where the disk identifier is used to indicate a security domain to which the physical disk belongs in the other nodes;
the determining, as a target security domain, a security domain to which the physical disk belongs in the other nodes includes:
acquiring a disk identifier stored in the physical disk;
and determining the security domain represented by the disk identification as a target security domain.
In one possible embodiment, the disk identifier is a disk number;
the determining the security domain represented by the disk identifier as the target security domain includes:
and determining the security domain corresponding to the acquired disk number as a target security domain according to the preset corresponding relationship between the disk number and the security domain.
The migration node and other nodes often have more powerful processors, memories, and network configurations than a conventional personal computer, and the disk slots mentioned by the migration node can often be used for inserting a large number of physical disks. Hardware and software for managing the inserted physical disks may also be included in the migrating node and other nodes.
The Memory mentioned in the above migration node may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In yet another embodiment provided by the present invention, a computer-readable storage medium is further provided, which has instructions stored therein, and when the instructions are executed on a computer, the instructions cause the computer to execute any one of the node expansion methods in the above embodiments.
In yet another embodiment, a computer program product containing instructions is provided, which when run on a computer causes the computer to perform any of the above-described node expansion methods.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to be performed in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "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.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the embodiments of the apparatus, the migration node, the computer-readable storage medium, and the computer program product, which are substantially similar to the method embodiments, the description is relatively simple, and in relation to which reference may be made to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (12)

1. A node expansion method applied to an migrating node, where the migrating node is a node newly added in a storage pool cluster, the storage pool cluster includes a plurality of nodes, and at least one other node except the migrating node includes at least one security domain, and each security domain includes at least one physical disk, the method includes:
switching to a data reconstruction prohibition state, and refusing to execute data reconstruction operation by the node in the data reconstruction prohibition state;
when the physical disks of the other nodes are migrated to the migration node, determining a security domain to which the physical disks belong in the other nodes as a target security domain, wherein the other nodes are in the state of prohibiting data reconstruction in advance;
adding the physical disk into a target security domain;
and after determining that the disk migration is finished, terminating the data reconstruction prohibition state.
2. The method of claim 1, wherein terminating the prohibited data reconstruction state upon determining that the disk migration is complete comprises:
and when all the physical disks included in the target security domain are migrated to the migration node, terminating the data reconstruction prohibition state.
3. The method of claim 2, wherein the total capacity of the physical disks included in each of the security domains in the other nodes is the same.
4. The method according to claim 1, wherein each physical disk in the other nodes stores a disk identifier of the physical disk, and the disk identifier is used to indicate a security domain of the physical disk in the other nodes;
the determining, as a target security domain, a security domain to which the physical disk belongs in the other nodes includes:
acquiring a disk identifier stored in the physical disk;
and determining the security domain represented by the disk identification as a target security domain.
5. The method of claim 4, wherein the disk identification is a disk number;
the determining the security domain represented by the disk identifier as the target security domain includes:
and determining the security domain corresponding to the acquired disk number as a target security domain according to the preset corresponding relationship between the disk number and the security domain.
6. A node expansion apparatus applied to an migration node, where the migration node is a node newly added in a storage pool cluster, the storage pool cluster includes a plurality of nodes, and at least one other node except the migration node includes at least one security domain, and each security domain includes at least one physical disk, the apparatus comprising:
the data reconstruction switch module is used for switching to a data reconstruction forbidding state, and the nodes in the data reconstruction forbidding state refuse to execute data reconstruction operation;
a disk service loading module, configured to determine, when the physical disk of the other node is migrated to the migration node, a security domain to which the physical disk belongs in the other node, as a target security domain, where the other node is in the prohibited data reconfiguration state in advance;
the disk service starting module is used for adding the physical disk into a target security domain and managing the physical disk;
and the data reconstruction switch module is further used for terminating the data reconstruction prohibition state after the disk migration is determined to be finished.
7. The apparatus according to claim 6, wherein the data reconfiguration switch module is specifically configured to terminate the data reconfiguration disabled state when all physical disks included in the target security domain are migrated to the migration node.
8. The apparatus of claim 7, wherein the total capacity of the physical disks included in each of the security domains in the other nodes is the same.
9. The apparatus according to claim 6, wherein each physical disk in the other nodes stores a disk identifier of the physical disk, and the disk identifier is used to indicate a security domain of the physical disk in the other nodes;
the disk service loading module is specifically configured to obtain a disk identifier stored in the physical disk;
and determining the security domain represented by the disk identification as a target security domain.
10. The apparatus of claim 9, wherein the disk identification is a disk number;
the disk service loading module is specifically configured to determine, according to a preset correspondence between a disk number and a security domain, a security domain corresponding to the acquired disk number, and use the security domain as a target security domain.
11. An migration node for use in a storage pool cluster including a plurality of nodes therein, and at least one other node than the migration node including at least one security domain, and each security domain including at least one physical disk, the node comprising:
a disk slot for inserting a physical disk;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1 to 5 when executing a program stored in the memory.
12. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of the claims 1-5.
CN202010171580.6A 2020-03-12 2020-03-12 Node expansion method and device and migration node Active CN113391757B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010171580.6A CN113391757B (en) 2020-03-12 2020-03-12 Node expansion method and device and migration node

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010171580.6A CN113391757B (en) 2020-03-12 2020-03-12 Node expansion method and device and migration node

Publications (2)

Publication Number Publication Date
CN113391757A CN113391757A (en) 2021-09-14
CN113391757B true CN113391757B (en) 2022-05-03

Family

ID=77615794

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010171580.6A Active CN113391757B (en) 2020-03-12 2020-03-12 Node expansion method and device and migration node

Country Status (1)

Country Link
CN (1) CN113391757B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116150160B (en) * 2023-04-17 2023-06-23 北京谷数科技股份有限公司 Adjustment method and device for database cluster processing nodes and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8176012B1 (en) * 2008-10-06 2012-05-08 Netapp, Inc. Read-only mirroring for load sharing
CN102741820A (en) * 2010-02-08 2012-10-17 微软公司 Background migration of virtual storage
CN108228102A (en) * 2017-12-29 2018-06-29 北京奇虎科技有限公司 Internodal data moving method, device, computing device and computer storage media
CN109241036A (en) * 2018-08-28 2019-01-18 郑州云海信息技术有限公司 A kind of migratory system and moving method of physical data

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10140136B2 (en) * 2013-11-07 2018-11-27 Datrium, linc. Distributed virtual array data storage system and method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8176012B1 (en) * 2008-10-06 2012-05-08 Netapp, Inc. Read-only mirroring for load sharing
CN102741820A (en) * 2010-02-08 2012-10-17 微软公司 Background migration of virtual storage
CN108228102A (en) * 2017-12-29 2018-06-29 北京奇虎科技有限公司 Internodal data moving method, device, computing device and computer storage media
CN109241036A (en) * 2018-08-28 2019-01-18 郑州云海信息技术有限公司 A kind of migratory system and moving method of physical data

Also Published As

Publication number Publication date
CN113391757A (en) 2021-09-14

Similar Documents

Publication Publication Date Title
US7664927B2 (en) Hash tables
JP5932043B2 (en) Volatile memory representation of non-volatile storage set
KR101994021B1 (en) File manipulation method and apparatus
CN110858162B (en) Memory management method and device and server
CN110908609B (en) Method, system and equipment for processing disk and readable storage medium
US8862703B2 (en) Address server
WO2017050064A1 (en) Memory management method and device for shared memory database
CN109299190B (en) Method and device for processing metadata of object in distributed storage system
EP3739440A1 (en) Distributed storage system, data processing method and storage node
TW201025114A (en) File system for storage device which uses different cluster sizes
US11681447B2 (en) Method, device and computer program product of balance of storage space for file system
EP3974974A1 (en) Virtualization method and system for persistent memory
JP2016510918A (en) Identifying workloads and sizing buffers for volume replication purposes
US20120047108A1 (en) Point-in-time (pit) based thin reclamation support for systems with a storage usage map api
CN111638853A (en) Data storage method and device, storage cluster, gateway equipment and main equipment
CN113391757B (en) Node expansion method and device and migration node
CN108304142A (en) A kind of data managing method and device
CN113434470B (en) Data distribution method and device and electronic equipment
CN110032526B (en) Page caching method, system and equipment based on nonvolatile medium
CN110888769B (en) Data processing method and computer equipment
CN110413217B (en) Method, apparatus and computer program product for managing a storage system
CN112463058B (en) Fragmented data sorting method and device and storage node
US11119703B2 (en) Utilizing a set of virtual storage units distributed across physical storage units
JP2022042271A (en) Memory system and control method
CN109508140B (en) Storage resource management method and device, electronic equipment and 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