CN112306373A - Cluster capacity expansion method and system, electronic equipment and storage medium - Google Patents

Cluster capacity expansion method and system, electronic equipment and storage medium Download PDF

Info

Publication number
CN112306373A
CN112306373A CN201910702391.4A CN201910702391A CN112306373A CN 112306373 A CN112306373 A CN 112306373A CN 201910702391 A CN201910702391 A CN 201910702391A CN 112306373 A CN112306373 A CN 112306373A
Authority
CN
China
Prior art keywords
virtual storage
data disk
disk
cluster
host
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910702391.4A
Other languages
Chinese (zh)
Other versions
CN112306373B (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.)
Sangfor Technologies Co Ltd
Original Assignee
Sangfor Technologies 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 Sangfor Technologies Co Ltd filed Critical Sangfor Technologies Co Ltd
Priority to CN201910702391.4A priority Critical patent/CN112306373B/en
Priority claimed from CN201910702391.4A external-priority patent/CN112306373B/en
Publication of CN112306373A publication Critical patent/CN112306373A/en
Application granted granted Critical
Publication of CN112306373B publication Critical patent/CN112306373B/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/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0662Virtualisation aspects
    • 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/0638Organizing or formatting or addressing of data
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0823Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
    • 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)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a cluster capacity expansion method, a system, an electronic device and a computer readable storage medium, wherein the method comprises the following steps: adding the newly added host to the current cluster, and deploying the network configuration in the current cluster; acquiring the number of original hosts in the current cluster; and creating or expanding the virtual storage of the current cluster based on the original host number. According to the method and the device, when the capacity is expanded, the virtual storage of the current cluster is self-adaptively established or expanded according to the number of the original hosts in the current cluster, so that the process of manual intervention is avoided, the capacity expansion efficiency is improved, and a large amount of human resources are saved.

Description

Cluster capacity expansion method and system, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and a system for cluster expansion, an electronic device, and a computer-readable storage medium.
Background
The cloud service platform provides equal-compliance service, and with the increase of customer requirements, the original hardware resources of the all-in-one machine are not enough to meet the business requirements of customers, so that capacity expansion needs to be dynamically performed on the all-in-one machine.
In order to meet the requirement of a client on cluster expansion, at present, cluster expansion is mainly realized in a manual expansion mode, a new host, a configuration data communication network and a storage communication network are manually added, and a Virtual Storage (VS) or an expanded VS is established.
Therefore, how to solve the above problems is a great concern for those skilled in the art.
Disclosure of Invention
The present application aims to provide a cluster capacity expansion method, a cluster capacity expansion system, an electronic device, and a computer-readable storage medium, which avoid the manual capacity expansion process and save a large amount of human resources.
In order to achieve the above object, the present application provides a cluster capacity expansion method, including:
adding the newly added host to the current cluster, and deploying the network configuration in the current cluster;
acquiring the number of original hosts in the current cluster;
and creating or expanding the virtual storage of the current cluster based on the original host number.
Optionally, the creating or expanding the virtual storage of the current cluster based on the number of the original hosts includes:
when the number of the original hosts is one, detecting whether the newly added host and the original hosts in the current cluster contain empty data disks;
if the newly added host and the original host both comprise empty data disks, determining a first data disk which is empty in the newly added host and a second data disk which is empty in the original host as a target data disk;
judging whether the virtual storage exists in the current cluster;
if the virtual storage exists in the current cluster, adding the target data disk to the virtual storage;
and if the virtual storage does not exist in the current cluster, establishing the virtual storage by using the target data disk.
Optionally, after detecting whether the new host and the original host in the current cluster include empty data disks, the method further includes:
if the original host computer does not detect the empty data disk, acquiring a third data disk with the minimum disk utilization rate in the original host computer;
acquiring all components in the third data disk, and performing migration operation on all the components;
after the migration operation is completed, determining the third data disk and the first data disk as the target data disk.
Optionally, after obtaining the third data disk with the smallest disk usage rate in the primary host, the method further includes:
and if the third data disk fails to be obtained, obtaining a solid state disk in the original host, and determining the solid state disk and the first data disk as the target data disk.
Optionally, the performing migration operation on all the components includes:
judging whether the virtual storage exists in the current cluster;
if the virtual storage exists in the current cluster, migrating all the components to the virtual storage;
if the virtual storage does not exist in the current cluster, determining a fourth data disk from the primary host, and migrating all the components from the third data disk to the fourth data disk.
Optionally, the determining a fourth data disk from the primary host includes:
acquiring all local storages in the data disk of the original host except the third data disk;
and determining the disk with the lowest disk utilization rate in all local storages as the fourth data disk.
Optionally, the creating or expanding the virtual storage of the current cluster based on the number of the original hosts includes:
when the number of the original hosts is multiple, detecting whether a cloud security service platform is located in the virtual storage;
if the cloud security service platform is located in the virtual storage, migrating the cloud security service platform from the virtual storage to a fifth data disk, and executing a preset operation after migration;
if the cloud security service platform is not located in the virtual storage, the preset operation is directly executed;
the preset operation comprises the following steps:
controlling all virtual machines in the virtual storage to be powered off, and adding all empty idle data disks in the newly added host to the virtual storage;
and migrating the cloud security service platform to the virtual storage added with the idle data disk, and controlling all the virtual machines to be started.
Optionally, the migrating the cloud security service platform from the virtual storage to a fifth data disk includes:
and acquiring a fifth data disk with the disk capacity larger than a preset capacity threshold value in the original host, and migrating the cloud security service platform from the virtual storage to the fifth data disk.
Optionally, after the cloud security service platform is migrated to the virtual storage to which the idle data disk is added, the method further includes: acquiring a residual data disk in the current newly added host;
and formatting the residual data disk, and adding the formatted disk serving as a cache disk into the virtual storage.
To achieve the above object, the present application provides a cluster expansion system, including:
the network deployment module is used for adding the newly added host to the current cluster and deploying the network configuration in the current cluster;
the host acquisition module is used for acquiring the number of original hosts in the current cluster;
and the cluster capacity expansion module is used for establishing or expanding the virtual storage of the current cluster based on the number of the original hosts.
To achieve the above object, the present application provides an electronic device including:
a memory for storing a computer program;
a processor for implementing the steps of the cluster capacity method as disclosed in any one of the preceding publications when executing the computer program.
To achieve the above object, the present application provides a computer-readable storage medium having stored thereon a computer program, which when executed by a processor, implements the steps of the cluster capacity method as disclosed in any one of the preceding publications.
According to the above scheme, the cluster capacity expansion method provided by the application includes: adding the newly added host to the current cluster, and deploying the network configuration in the current cluster; acquiring the number of original hosts in the current cluster; and creating or expanding the virtual storage of the current cluster based on the original host number. According to the method and the device, when the capacity is expanded, the virtual storage of the current cluster is self-adaptively established or expanded according to the number of the original hosts in the current cluster, so that the process of manual intervention is avoided, the capacity expansion efficiency is improved, and a large amount of human resources are saved.
The application also discloses a cluster capacity expansion system, an electronic device and a computer readable storage medium, which can also achieve the technical effects.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
In order to more clearly illustrate the embodiments of the present application 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 some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a cluster capacity expansion method disclosed in an embodiment of the present application;
fig. 2 is a schematic flowchart of a cluster capacity expansion method disclosed in an embodiment of the present application;
fig. 3 is a flowchart of another cluster capacity expansion method disclosed in the embodiment of the present application;
fig. 4 is a flowchart of another cluster capacity expansion method disclosed in the embodiment of the present application;
fig. 5 is a schematic flowchart of another cluster capacity expansion method disclosed in the embodiment of the present application;
fig. 6 is a flowchart of a component migration process in a cluster capacity expansion method disclosed in an embodiment of the present application;
fig. 7 is a schematic flowchart of a component migration process in a cluster capacity expansion method disclosed in an embodiment of the present application;
fig. 8 is a flowchart of another cluster capacity expansion method disclosed in the embodiment of the present application;
fig. 9 is a flowchart of a further cluster capacity expansion method disclosed in the embodiment of the present application;
fig. 10 is a schematic flowchart of a further cluster capacity expansion method disclosed in the embodiment of the present application;
fig. 11 is a structural diagram of a cluster expansion system disclosed in an embodiment of the present application;
fig. 12 is a block diagram of an electronic device disclosed in an embodiment of the present application;
fig. 13 is a block diagram of another electronic device disclosed in the 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.
In the prior art, in order to meet the requirement of a customer on cluster expansion, at present, the cluster expansion is mainly realized in a manual expansion mode, a new host, a configuration data communication network and a storage communication network are manually added, and a VS or an expansion VS is established.
Therefore, the embodiment of the application discloses a cluster capacity expansion method, which avoids the process of manual capacity expansion and saves a large amount of human resources.
Referring to fig. 1 and fig. 2, a flowchart of a cluster capacity expansion method disclosed in an embodiment of the present application is shown in fig. 1 and fig. 2, and includes:
s101: adding the newly added host to the current cluster, and deploying the network configuration in the current cluster;
in specific implementation, when a cluster is expanded, a newly added host is added to a cluster of a security resource pool, and network configuration of a current cluster is deployed, wherein the cluster is a group of computers and provides a group of network resource services for a user as a whole, and the network configuration comprises a data communication network and a storage communication network, so that the newly added host can perform network communication with the current cluster.
S102: acquiring the number of original hosts in the current cluster;
in this step, the original host number before expansion in the current cluster is obtained.
S103: and creating or expanding the virtual storage of the current cluster based on the original host number.
In this embodiment, a corresponding capacity expansion algorithm is selected based on the original host number, so that host capacity expansion is realized according to the capacity expansion algorithm. If the current cluster has VS, directly expanding the VS; and if the VS is not created in the current cluster, creating a corresponding VS according to the capacity expansion algorithm. For example, if the number of original hosts is 1, virtual storage needs to be created and expanded; if the number of the original hosts is 2, since the number of the original hosts is greater than 1, it indicates that the cluster and the corresponding virtual storage already exist, so that when the cluster is expanded under the condition that the number of the original hosts is greater than 1, the virtual storage of the current cluster can be directly expanded.
According to the above scheme, the cluster capacity expansion method provided by the application includes: adding the newly added host to the current cluster, and deploying the network configuration in the current cluster; acquiring the number of original hosts in the current cluster; and creating or expanding the virtual storage of the current cluster based on the original host number. According to the method and the device, when the capacity is expanded, the virtual storage of the current cluster is self-adaptively established or expanded according to the number of the original hosts in the current cluster, so that the process of manual intervention is avoided, the capacity expansion efficiency is improved, and a large amount of human resources are saved.
The embodiment of the present application discloses another cluster capacity expansion method, and compared with the previous embodiment, the present embodiment further describes a cluster capacity expansion process when the number of original hosts is one. Specifically, the method comprises the following steps:
referring to fig. 3, a flowchart of another cluster capacity expansion method provided in the embodiment of the present application is shown in fig. 3, and includes:
s201: adding the newly added host to the current cluster, and deploying the network configuration in the current cluster;
s202: when the number of the original hosts is one, detecting whether the newly added host and the original hosts in the current cluster contain empty data disks;
s203: if the newly added host and the original host both comprise empty data disks, determining a first data disk which is empty in the newly added host and a second data disk which is empty in the original host as a target data disk;
s204: judging whether the virtual storage exists in the current cluster;
s205: if the virtual storage exists in the current cluster, adding the target data disk to the virtual storage;
s206: and if the virtual storage does not exist in the current cluster, establishing the virtual storage by using the target data disk.
In this embodiment, when the number of the original hosts is one, it is detected whether a pair of empty data disks exists in the original host and the newly added host to be expanded, and if so, the empty data disks are directly used for creation or expansion after judging whether virtual storage already exists.
It should be noted that, in the process of detecting whether there are empty data disks in the original host and the newly added host, when a plurality of empty data disks are detected, any data disk may be selected as the target data disk for creating or expanding the virtual storage.
On the basis of the above embodiments, the present application embodiment discloses another cluster capacity expansion method. Specifically, the method comprises the following steps:
referring to fig. 4, a flowchart of another cluster capacity expansion method provided in an embodiment of the present application is shown in fig. 4, and includes:
s301: adding the newly added host to the current cluster, and deploying the network configuration in the current cluster;
s302: when the number of the original hosts is one, detecting whether the newly added host and the original hosts in the current cluster contain empty data disks;
s303: if the newly added host and the original host both comprise empty data disks, taking the empty data disks of the newly added host and the original host as target data disks;
s304: if the original host computer does not detect the empty data disk, acquiring a third data disk with the minimum disk utilization rate in the original host computer;
s305: acquiring all components in the third data disk, and performing migration operation on all the components;
s306: after the migration operation is completed, determining the third data disk and the first data disk as the target data disk;
s307: judging whether the virtual storage exists in the current cluster;
s308: if the virtual storage exists in the current cluster, adding the target data disk to the virtual storage;
s309: and if the virtual storage does not exist in the current cluster, establishing the virtual storage by using the target data disk.
After detecting whether the new host and the original host include empty data disks, if no empty data disk is detected in the original host, the third data disk with the smallest disk utilization rate in the original host, that is, the data disk with the smallest capacity occupation, is obtained, all the components in the found third data disk are migrated, and after the migration is completed, the third data disk and the first data disk which is empty in the new host are used as target data disks to perform expansion or creation of virtual storage.
Further, as shown in fig. 5, on the basis of the foregoing embodiment, if the current local storage acquisition fails in step S304, this embodiment may further acquire the solid state disk in the original host, and use the empty first data disk in the solid state disk and the newly added host as the target data disk for creating or expanding the VS. It should be noted that the virtual storage is also divided into a data disk and a cache disk, and a mechanical hard disk is generally used as the data disk and an SSD (solid state disk) is used as the cache disk.
In addition, in this embodiment, after the component is migrated and whether virtual storage exists is detected, whether the operation is completed or whether the detection is successful is further determined, and if the operation fails or the detection fails, corresponding exception handling is performed, for example, corresponding detailed error information may be printed, and the error message is returned to the foreground interface for display.
On the basis of the foregoing embodiments, the present embodiment further describes the component migration process. Specifically, the method comprises the following steps:
referring to fig. 6 and fig. 7, a flowchart of a component migration process in a cluster capacity expansion method according to an embodiment of the present application is shown in fig. 6 and fig. 7, and includes:
s401: judging whether the virtual storage exists in the current cluster;
s402: if the virtual storage exists in the current cluster, migrating all the components to the virtual storage;
s403: if the virtual storage does not exist in the current cluster, determining a fourth data disk from the primary host, and migrating all the components from the third data disk to the fourth data disk.
In this embodiment, when a component is migrated, it is determined whether a VS exists in the current cluster, and if yes, all components are migrated to the VS; if not, determining a fourth data disk from the primary host, and migrating all components from the third data disk to the fourth data disk.
It should be noted that, in this embodiment, the specific process of determining the fourth data disk includes: and acquiring all local storages of the data disks of the original host except the third data disk, determining the data disk with the minimum disk utilization rate in all the local storages, and determining the data disk as a fourth data disk.
It can be understood that the component migration process can ensure the idempotency of migration, migrate a component to the VS as much as possible, and effectively save the migration times and migration time.
The embodiment of the present application discloses another cluster capacity expansion method, and compared with the previous embodiment, the present embodiment specifically describes a cluster capacity expansion process when the number of original hosts is multiple. Specifically, the method comprises the following steps:
referring to fig. 8, a flowchart of another cluster capacity expansion method provided in an embodiment of the present application is shown in fig. 8, and includes:
s501: adding the newly added host to the current cluster, and deploying the network configuration in the current cluster;
s502: when the number of the original hosts is multiple, detecting whether a cloud security service platform is located in the virtual storage;
s503: if the cloud security service platform is located in the virtual storage, migrating the cloud security service platform from the virtual storage to a fifth data disk, and executing a preset operation after migration;
s504: and if the cloud security service platform is not located in the virtual storage, directly executing the preset operation.
It should be noted that the cloud security service platform is an autonomously developed platform for providing service security delivery in a cloud security scenario. In addition, currently there are some limitations due to the underlying mechanisms of the hyper-converged integrative machine, such as: the single host expands 2 hosts, the disk needs to be added into the VS completely during the expansion, and the 2 hosts expand 3 hosts, because of the arbitration mechanism of the VS in the HCI, all virtual devices on the VS need to be shut down, and the disk can be successfully added into the VS.
As can be seen from the above, in this embodiment, before the cloud security service platform is migrated from the virtual storage to the fifth data disk, it is first detected whether the cloud security service platform is located in the virtual storage, if so, the cloud security service platform is migrated from the virtual storage to the fifth data disk, and a preset operation is executed after the migration; if not, the step of migrating the cloud security service platform from the virtual storage to the fifth data disk is skipped, and the preset operation is directly executed.
It should be noted that the preset operation may specifically include: and controlling all virtual machines in the virtual storage to shut down, adding all empty idle data disks of the newly added host to the virtual storage, and migrating the cloud security service platform back to the virtual storage to which the idle data disks are added after the addition is finished, so as to control all the virtual machines to start up and finish the expansion of the cluster.
The embodiment of the application discloses another cluster capacity expansion method, and compared with the previous embodiment, the embodiment further describes the migration process of the cloud security service platform. Specifically, the method comprises the following steps:
referring to fig. 9 and fig. 10, a flowchart of a further cluster capacity expansion method provided in an embodiment of the present application is shown in fig. 9, and includes:
s601: adding the newly added host to the current cluster, and deploying the network configuration in the current cluster;
s602: when the number of the original hosts is multiple, detecting whether a cloud security service platform is located in the virtual storage;
s603: if the cloud security service platform is located in the virtual storage, acquiring a fifth data disk of which the disk capacity in the original host is larger than a preset capacity threshold;
s604: migrating the cloud security service platform from the virtual storage to the fifth data disk;
s605: controlling all virtual machines in the virtual storage to be shut down, and adding all empty idle data disks of the newly added host to the virtual storage;
s606: and migrating the cloud security service platform to the virtual storage, and controlling all the virtual machines to be started.
In this embodiment, when the cloud security service platform is migrated, a fifth data disk with a disk capacity greater than a preset capacity threshold in the primary host is obtained, and the cloud security service platform is migrated from the virtual storage to the fifth data disk. Specifically, the process of acquiring the fifth data disk in the primary host may include: and judging whether the system disk capacity of the original host is larger than a preset capacity threshold value or not, and only when the system disk capacity is enough, carrying out migration. For example, if the size of the actually occupied disk of the current cloud security service platform is 15G, but the system disk has only 10G of remaining capacity, the migration cannot be performed, and if the remaining capacity of only 15G cannot be migrated, it is necessary to ensure that the remaining capacity is greater than a preset capacity threshold, where the preset capacity threshold is the sum of the actual size of the cloud security service platform and a preset constant, and the preset constant is usually defined as 5G, that is, for the cloud security service platform actually occupying the size of the disk of 15G, the migration of the platform can be implemented only when the system disk needs to satisfy the condition that the remaining capacity is greater than 20G. And after judging whether the system disk capacity of the original host is larger than a preset capacity threshold value, determining whether to transfer the cloud security service platform to the system disk according to a judgment result. And if the system disk capacity of the original host is not larger than the preset capacity threshold, detecting local storage except the system disk in the newly added host, and transferring the cloud security service platform to the local storage. When the system disk capacity of the original host is not greater than the preset capacity threshold and the newly added host does not include local storage other than the system disk, the embodiment further detects whether the newly added host includes the SSD, and if so, the cloud security service platform is migrated to the initialized solid state disk after the solid state disk is initialized.
In addition, in this embodiment, after migrating the cloud security service platform from the virtual storage to the preset disk, the method may further include: and formatting the residual data disk of the current newly added host, and adding the formatted disk serving as a cache disk into the virtual storage.
In the following, a cluster expansion system provided by an embodiment of the present application is introduced, and a cluster expansion system described below and a cluster expansion method described above may be referred to each other.
Referring to fig. 11, a structure diagram of a cluster expansion system provided in an embodiment of the present application is shown in fig. 11, and includes:
a network deployment module 100, configured to add the newly added host to a current cluster, and deploy a network configuration in the current cluster;
a host obtaining module 200, configured to obtain the number of original hosts in the current cluster;
a cluster capacity expansion module 300, configured to create or expand the virtual storage of the current cluster based on the number of original hosts.
On the basis of the foregoing embodiment, as a preferred implementation manner, the cluster capacity expansion module in the cluster capacity expansion system provided in this embodiment may include:
the disk detection submodule is used for detecting whether the newly added host and the original host in the current cluster contain empty data disks or not when the number of the original hosts is one;
a disk determining submodule, configured to determine, if both the new host and the original host include an empty data disk, a first data disk that is empty in the new host and a second data disk that is empty in the original host as a target data disk;
the first judgment submodule is used for judging whether the virtual storage exists in the current cluster;
a disk adding module, configured to add the target data disk to the virtual storage if the virtual storage exists in the current cluster;
and the storage creating submodule is used for creating the virtual storage by using the target data disk if the virtual storage is not detected by the current cluster.
On the basis of the foregoing embodiment, as a preferred implementation manner, the cluster capacity expansion system provided in this embodiment may further include:
a disk obtaining module, configured to obtain a third data disk with a smallest disk usage rate in the primary host if a null data disk is not detected in the primary host;
the component migration module is used for acquiring all components in the third data disk and performing migration operation on all the components;
and the deleting module is used for determining the third data disk and the first data disk as the target data disk after the migration operation is completed.
On the basis of the foregoing embodiment, as a preferred implementation manner, the cluster capacity expansion system provided in this embodiment may further include:
and the hard disk acquisition module is used for acquiring the solid state disk in the original host if the third data disk fails to be acquired, and determining the solid state disk and the first data disk as the target data disk.
On the basis of the foregoing embodiment, as a preferred implementation manner, the component migration module in the cluster expansion system provided in this embodiment may include:
the second judgment submodule is used for judging whether the virtual storage exists in the current cluster;
a first migration submodule, configured to migrate all the components to the virtual storage if the virtual storage exists in the current cluster;
a second migration submodule, configured to determine a fourth data disk from the primary host and migrate all the components from the third data disk to the fourth data disk if the virtual storage does not exist in the current cluster.
On the basis of the foregoing embodiment, as a preferred implementation, the second migration sub-module provided in this embodiment may include:
a residual obtaining unit, configured to obtain all local storages in the data disk of the original host except for the third data disk;
and the target determining unit is used for determining the disk with the lowest disk utilization rate in all the local storages as the fourth data disk.
On the basis of the foregoing embodiment, as a preferred implementation manner, the cluster capacity expansion module in the cluster capacity expansion system provided in this embodiment may include:
the platform detection submodule detects whether a cloud security service platform is located in the virtual storage or not when the number of the original hosts is multiple;
the platform migration submodule is used for migrating the cloud security service platform from the virtual storage to a fifth data disk if the cloud security service platform is located in the virtual storage, and starting a working process of a preset operation submodule after migration;
the operation execution sub-module is used for directly starting the working process of the preset operation sub-module if the cloud security service platform is not located in the virtual storage;
the preset operation submodule comprises:
the shutdown control unit is used for controlling all the virtual machines in the virtual storage to be shut down and adding all the empty idle data disks in the newly added host computer to the virtual storage;
and the starting control unit is used for migrating the cloud security service platform to the virtual storage added with the idle data disk and controlling all the virtual machines to be started.
On the basis of the foregoing embodiment, as a preferred implementation manner, the boot control unit provided in this embodiment is specifically configured to: acquiring a fifth data disk with the disk capacity larger than a preset capacity threshold value in the original host, and migrating the cloud security service platform from the virtual storage to the fifth data disk
On the basis of the foregoing embodiment, as a preferred implementation manner, the cluster capacity expansion system provided in this embodiment may further include:
a residual obtaining module, configured to obtain a residual data disk in the newly added host at present;
and the cache adding module is used for carrying out formatting operation on the residual data disk and adding the formatted disk into the virtual storage as a cache disk.
The present application further provides an electronic device, referring to fig. 12, a structure diagram of an electronic device provided in an embodiment of the present application is shown in fig. 12, and includes:
a memory 11 for storing a computer program;
the processor 12, when executing the computer program, may implement the steps provided by the above embodiments.
Specifically, the memory 11 includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer-readable instructions, and the internal memory provides an environment for the operating system and the computer-readable instructions in the non-volatile storage medium to run. The processor 12, which in some embodiments may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor or other data Processing chip, provides computing and control capabilities for the electronic device, and when executing the computer program stored in the memory 11, the following steps may be implemented:
adding the newly added host to the current cluster, and deploying the network configuration in the current cluster; acquiring the number of original hosts in the current cluster; and creating or expanding the virtual storage of the current cluster based on the original host number.
Preferably, when the processor 12 executes the computer subprogram stored in the memory 11, the following steps can be implemented: when the number of the original hosts is one, detecting whether the newly added host and the original hosts in the current cluster contain empty data disks; if the newly added host and the original host both comprise empty data disks, determining a first data disk which is empty in the newly added host and a second data disk which is empty in the original host as a target data disk; judging whether the virtual storage exists in the current cluster; if the virtual storage exists in the current cluster, adding the target data disk to the virtual storage; and if the virtual storage does not exist in the current cluster, establishing the virtual storage by using the target data disk.
Preferably, when the processor 12 executes the computer subprogram stored in the memory 11, the following steps can be implemented: if the original host computer does not detect the empty data disk, acquiring a third data disk with the minimum disk utilization rate in the original host computer; acquiring all components in the third data disk, and performing migration operation on all the components; after the migration operation is completed, determining the third data disk and the first data disk as the target data disk.
Preferably, when the processor 12 executes the computer subprogram stored in the memory 11, the following steps can be implemented: and if the third data disk fails to be obtained, obtaining a solid state disk in the original host, and determining the solid state disk and the first data disk as the target data disk.
Preferably, when the processor 12 executes the computer subprogram stored in the memory 11, the following steps can be implemented: judging whether the virtual storage exists in the current cluster; if the virtual storage exists in the current cluster, migrating all the components to the virtual storage; if the virtual storage does not exist in the current cluster, determining a fourth data disk from the primary host, and migrating all the components from the third data disk to the fourth data disk.
Preferably, when the processor 12 executes the computer subprogram stored in the memory 11, the following steps can be implemented: acquiring all local storages in the data disk of the original host except the third data disk; and determining the disk with the lowest disk utilization rate in all local storages as the fourth data disk.
Preferably, when the processor 12 executes the computer subprogram stored in the memory 11, the following steps can be implemented: when the number of the original hosts is multiple, detecting whether a cloud security service platform is located in the virtual storage; if the cloud security service platform is located in the virtual storage, migrating the cloud security service platform from the virtual storage to a fifth data disk, and executing a preset operation after migration; if the cloud security service platform is not located in the virtual storage, the preset operation is directly executed; the preset operation comprises the following steps: controlling all virtual machines in the virtual storage to be powered off, and adding all empty idle data disks in the newly added host to the virtual storage; and migrating the cloud security service platform to the virtual storage added with the idle data disk, and controlling all the virtual machines to be started.
Preferably, when the processor 12 executes the computer subprogram stored in the memory 11, the following steps can be implemented: and acquiring a fifth data disk with the disk capacity larger than a preset capacity threshold value in the original host, and migrating the cloud security service platform from the virtual storage to the fifth data disk.
Preferably, when the processor 12 executes the computer subprogram stored in the memory 11, the following steps can be implemented: acquiring a residual data disk in the current newly added host; and formatting the residual data disk, and adding the formatted disk serving as a cache disk into the virtual storage.
On the basis of the above embodiment, as a preferred implementation, referring to fig. 13, the electronic device further includes:
and the input interface 13 is connected with the processor 12 and is used for acquiring computer programs, parameters and instructions imported from the outside, and storing the computer programs, parameters and instructions into the memory 11 under the control of the processor 12. The input interface 13 may be connected to an input device for receiving parameters or instructions manually input by a user. The input device may be a touch layer covered on a display screen, or a button, a track ball or a touch pad arranged on a terminal shell, or a keyboard, a touch pad or a mouse, etc.
A display unit 14, connected to the processor 12, for displaying data processed by the processor 12 and for displaying a visual user interface. The display unit 14 may be an LED display, a liquid crystal display, a touch-controlled liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, and the like.
And the network port 15 is connected with the processor 12 and is used for performing communication connection with each external terminal device. The communication technology adopted by the communication connection can be a wired communication technology or a wireless communication technology, such as a mobile high definition link (MHL) technology, a Universal Serial Bus (USB), a High Definition Multimedia Interface (HDMI), a wireless fidelity (WiFi), a bluetooth communication technology, a low power consumption bluetooth communication technology, an ieee802.11 s-based communication technology, and the like.
Fig. 13 shows only an electronic device with components 11-15, and those skilled in the art will appreciate that the structure shown in fig. 13 does not constitute a limitation of the electronic device, and may include fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
The present application also provides a computer-readable storage medium, which may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk. The storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of any of the previously disclosed cluster capacity methods.
According to the above scheme, the cluster capacity expansion method provided by the application includes: adding the newly added host to the current cluster, and deploying the network configuration in the current cluster; acquiring the number of original hosts in a current cluster; virtual storage of the current cluster is created or expanded based on the number of primary hosts. According to the method and the device, when the capacity is expanded, the virtual storage of the current cluster is self-adaptively established or expanded according to the number of the original hosts in the current cluster, so that the process of manual intervention is avoided, the capacity expansion efficiency is improved, and a large amount of human resources are saved.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the system disclosed by the embodiment, the description is relatively simple because the system corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are 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.

Claims (12)

1. A method for cluster expansion, comprising:
adding the newly added host to the current cluster, and deploying the network configuration in the current cluster;
acquiring the number of original hosts in the current cluster;
and creating or expanding the virtual storage of the current cluster based on the original host number.
2. The cluster capacity expansion method according to claim 1, wherein the creating or expanding the virtual storage of the current cluster based on the original host number comprises:
when the number of the original hosts is one, detecting whether the newly added host and the original hosts in the current cluster contain empty data disks;
if the newly added host and the original host both comprise empty data disks, determining a first data disk which is empty in the newly added host and a second data disk which is empty in the original host as a target data disk;
judging whether the virtual storage exists in the current cluster;
if the virtual storage exists in the current cluster, adding the target data disk to the virtual storage;
and if the virtual storage does not exist in the current cluster, establishing the virtual storage by using the target data disk.
3. The cluster capacity expansion method according to claim 2, wherein after detecting whether the newly added host and the original host in the current cluster contain empty data disks, the method further comprises:
if the original host computer does not detect the empty data disk, acquiring a third data disk with the minimum disk utilization rate in the original host computer;
acquiring all components in the third data disk, and performing migration operation on all the components;
after the migration operation is completed, determining the third data disk and the first data disk as the target data disk.
4. The cluster capacity expansion method according to claim 3, wherein after obtaining the third data disk with the smallest disk usage rate in the primary host, the method further comprises:
and if the third data disk fails to be obtained, obtaining a solid state disk in the original host, and determining the solid state disk and the first data disk as the target data disk.
5. The cluster capacity method of claim 3, wherein the performing the migration operation on all the components comprises:
judging whether the virtual storage exists in the current cluster;
if the virtual storage exists in the current cluster, migrating all the components to the virtual storage;
if the virtual storage does not exist in the current cluster, determining a fourth data disk from the primary host, and migrating all the components from the third data disk to the fourth data disk.
6. The cluster capacity method of claim 5, wherein the determining a fourth data disk from the primary host comprises:
acquiring all local storages in the data disk of the original host except the third data disk;
and determining the disk with the lowest disk utilization rate in all local storages as the fourth data disk.
7. The cluster capacity expansion method according to claim 1, wherein the creating or expanding the virtual storage of the current cluster based on the original host number comprises:
when the number of the original hosts is multiple, detecting whether a cloud security service platform is located in the virtual storage;
if the cloud security service platform is located in the virtual storage, migrating the cloud security service platform from the virtual storage to a fifth data disk, and executing a preset operation after migration;
if the cloud security service platform is not located in the virtual storage, the preset operation is directly executed;
the preset operation comprises the following steps:
controlling all virtual machines in the virtual storage to be powered off, and adding all empty idle data disks in the newly added host to the virtual storage;
and migrating the cloud security service platform to the virtual storage added with the idle data disk, and controlling all the virtual machines to be started.
8. The cluster capacity expansion method of claim 7, wherein the migrating the cloud security service platform from the virtual storage to a fifth data disk comprises:
and acquiring a fifth data disk with the disk capacity larger than a preset capacity threshold value in the original host, and migrating the cloud security service platform from the virtual storage to the fifth data disk.
9. The cluster capacity expansion method according to claim 7, wherein after the migrating the cloud security service platform to the virtual storage after the adding of the free data disk, further comprising:
acquiring a residual data disk in the current newly added host;
and formatting the residual data disk, and adding the formatted disk serving as a cache disk into the virtual storage.
10. A cluster expansion system, comprising:
the network deployment module is used for adding the newly added host to the current cluster and deploying the network configuration in the current cluster;
the host acquisition module is used for acquiring the number of original hosts in the current cluster;
and the cluster capacity expansion module is used for establishing or expanding the virtual storage of the current cluster based on the number of the original hosts.
11. An electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the cluster capacity method according to any of claims 1 to 9 when executing the computer program.
12. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the cluster capacity method according to any of the claims 1 to 9.
CN201910702391.4A 2019-07-31 Cluster capacity expansion method and system, electronic equipment and storage medium Active CN112306373B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910702391.4A CN112306373B (en) 2019-07-31 Cluster capacity expansion method and system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910702391.4A CN112306373B (en) 2019-07-31 Cluster capacity expansion method and system, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112306373A true CN112306373A (en) 2021-02-02
CN112306373B CN112306373B (en) 2024-05-31

Family

ID=

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112925653A (en) * 2021-05-11 2021-06-08 深圳市安软科技股份有限公司 Virtualization cluster expansion method, related equipment and computer readable storage medium

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080082774A1 (en) * 2006-09-29 2008-04-03 Andrew Tomlin Methods of Managing File Allocation Table Information
US7721044B1 (en) * 2005-10-20 2010-05-18 American Megatrends, Inc. Expanding the storage capacity of a virtualized data storage system
CN102271145A (en) * 2010-06-04 2011-12-07 国云科技股份有限公司 Virtual computer cluster and enforcement method thereof
CN102646062A (en) * 2012-03-20 2012-08-22 广东电子工业研究院有限公司 Flexible capacity enlargement method for cloud computing platform based application clusters
US20130046892A1 (en) * 2011-08-16 2013-02-21 Hitachi, Ltd. Method and apparatus of cluster system provisioning for virtual maching environment
CN103262480A (en) * 2012-11-13 2013-08-21 华为技术有限公司 Method of establishing virtual cluster and network devices
WO2016160041A2 (en) * 2015-03-30 2016-10-06 Hewlett Packard Enterprise Development Lp Scalabale cloud storage solution
CN106383671A (en) * 2016-09-29 2017-02-08 乐视控股(北京)有限公司 Block device storage cluster capability expansion system and method
CN107656796A (en) * 2017-09-04 2018-02-02 顺丰科技有限公司 A kind of virtual machine cold moving method, system and equipment
WO2018144403A2 (en) * 2017-02-03 2018-08-09 Microsoft Technology Licensing, Llc Resource management for virtual machines in cloud computing systems
CN108572795A (en) * 2017-12-21 2018-09-25 北京金山云网络技术有限公司 Based on expansion method, device, equipment and the storage medium for building Storage Virtualization
CN109274537A (en) * 2018-10-25 2019-01-25 深圳供电局有限公司 A kind of continuity network virtualization platform system
CN109271172A (en) * 2018-09-17 2019-01-25 杭州安恒信息技术股份有限公司 A kind of host behavior extension method and device of swarm cluster
CN109508223A (en) * 2017-09-14 2019-03-22 顺丰科技有限公司 A kind of virtual machine batch creation method, system and equipment

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7721044B1 (en) * 2005-10-20 2010-05-18 American Megatrends, Inc. Expanding the storage capacity of a virtualized data storage system
US20080082774A1 (en) * 2006-09-29 2008-04-03 Andrew Tomlin Methods of Managing File Allocation Table Information
CN102271145A (en) * 2010-06-04 2011-12-07 国云科技股份有限公司 Virtual computer cluster and enforcement method thereof
US20130046892A1 (en) * 2011-08-16 2013-02-21 Hitachi, Ltd. Method and apparatus of cluster system provisioning for virtual maching environment
CN102646062A (en) * 2012-03-20 2012-08-22 广东电子工业研究院有限公司 Flexible capacity enlargement method for cloud computing platform based application clusters
CN103262480A (en) * 2012-11-13 2013-08-21 华为技术有限公司 Method of establishing virtual cluster and network devices
WO2016160041A2 (en) * 2015-03-30 2016-10-06 Hewlett Packard Enterprise Development Lp Scalabale cloud storage solution
CN106383671A (en) * 2016-09-29 2017-02-08 乐视控股(北京)有限公司 Block device storage cluster capability expansion system and method
WO2018144403A2 (en) * 2017-02-03 2018-08-09 Microsoft Technology Licensing, Llc Resource management for virtual machines in cloud computing systems
CN107656796A (en) * 2017-09-04 2018-02-02 顺丰科技有限公司 A kind of virtual machine cold moving method, system and equipment
CN109508223A (en) * 2017-09-14 2019-03-22 顺丰科技有限公司 A kind of virtual machine batch creation method, system and equipment
CN108572795A (en) * 2017-12-21 2018-09-25 北京金山云网络技术有限公司 Based on expansion method, device, equipment and the storage medium for building Storage Virtualization
CN109271172A (en) * 2018-09-17 2019-01-25 杭州安恒信息技术股份有限公司 A kind of host behavior extension method and device of swarm cluster
CN109274537A (en) * 2018-10-25 2019-01-25 深圳供电局有限公司 A kind of continuity network virtualization platform system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LEGEND02UWN: ""VMWare增加***硬盘容量(扩容)的操作方法"", 《CSDN》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112925653A (en) * 2021-05-11 2021-06-08 深圳市安软科技股份有限公司 Virtualization cluster expansion method, related equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN110069219B (en) Data storage method and system, electronic equipment and storage medium
US10999139B2 (en) Online upgrade method, apparatus, and system
US9672075B2 (en) Method, apparatus, and system for implementing hot migration of virtual machine
JP5510556B2 (en) Method and system for managing virtual machine storage space and physical hosts
WO2018059027A1 (en) Memory collection method and terminal
US20190188030A1 (en) Terminal background application management method and apparatus
US20190205160A1 (en) Application Process Management Method And Terminal Device
CN105874428B (en) Technology for the operating system transformation in multiple operating system environments
US10579299B2 (en) Method, apparatus, server and storage medium of erasing cloud host in cloud-computing environment
CN108345496B (en) Method and device for running application program
CN110704161A (en) Virtual machine creation method and device and computer equipment
CN111104219A (en) Binding method, device, equipment and storage medium of virtual core and physical core
CN111666266A (en) Data migration method and related equipment
CN113014608A (en) Flow distribution control method and device, electronic equipment and storage medium
CN112783605B (en) Method, device, equipment and storage medium for thermomigration of virtual machine
CN110399168A (en) Majority according to disk storage server system start method, device and equipment
US8621260B1 (en) Site-level sub-cluster dependencies
CN106775445B (en) Data migration method and device
CN106325972B (en) Virtual machine management method and network equipment
CN116185571B (en) Data migration method, device, storage medium and apparatus
CN112306373B (en) Cluster capacity expansion method and system, electronic equipment and storage medium
CN112306373A (en) Cluster capacity expansion method and system, electronic equipment and storage medium
US9690619B2 (en) Thread processing method and thread processing system for setting for each thread priority level of access right to access shared memory
CN112698908A (en) Cloud computing resource expansion processing method and device, storage medium and processor
CN111538520B (en) Updating method and device for super-converged cluster, terminal and storage medium

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