CN112306373B - 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
CN112306373B
CN112306373B CN201910702391.4A CN201910702391A CN112306373B CN 112306373 B CN112306373 B CN 112306373B CN 201910702391 A CN201910702391 A CN 201910702391A CN 112306373 B CN112306373 B CN 112306373B
Authority
CN
China
Prior art keywords
virtual storage
data disk
disk
host
cluster
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
CN201910702391.4A
Other languages
Chinese (zh)
Other versions
CN112306373A (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
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

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 and system, an electronic device and a computer readable storage medium, wherein the method comprises the following steps: adding the newly added host into a current cluster, and deploying 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 application, when the capacity is expanded, the virtual storage of the current cluster is created or expanded in a self-adaptive manner according to the number of the original hosts in the current cluster, so that the manual intervention process 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 technology, and more particularly, to a cluster expansion method and system, an electronic device, and a computer readable storage medium.
Background
The cloud service platform provides the iso-compliance service, and with the increase of the client demands, the hardware resources of the existing all-in-one machine are insufficient to meet the business demands of clients, so that the capacity expansion of the all-in-one machine is required to be dynamically performed.
In order to meet the demand of clients on cluster expansion, at present, cluster expansion is mainly realized by a manual expansion mode, a new host computer, a configuration data communication network and a storage communication network are manually added, and VS (virtual storage) is built or expanded, so that the manual intervention mode is not only inflexible, but also wastes a great amount of manpower and material resources seriously.
Therefore, how to solve the above problems is a great concern for those skilled in the art.
Disclosure of Invention
The application aims to provide a cluster capacity expansion method and system, electronic equipment 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 expansion method, including:
adding the newly added host into a current cluster, and deploying 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 original host number 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 or not;
if the newly added host and the original host both contain empty data disks, determining the first empty data disk in the newly added host and the second empty data disk in the original host as target data disks;
judging whether the virtual storage exists in the current cluster or not;
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, creating 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 empty data disk is not detected in the original host, acquiring a third data disk with the minimum disk utilization rate in the original host;
Acquiring all components in the third data disk, and performing migration operation on all the components;
and after the migration operation is completed, determining the third data disk and the first data disk as the target data disk.
Optionally, after the obtaining the third data disk with the minimum disk usage rate in the original host, the method further includes:
If the third data disk fails to be acquired, acquiring 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 a 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;
And if the virtual storage does not exist in the current cluster, determining a fourth data disk from the original host, and migrating all components from the third data disk to the fourth data disk.
Optionally, the determining the fourth data disk from the original host includes:
acquiring all local storages except the third data disk in the data disk of the original host;
And determining the disk with the minimum disk use rate in all the local storage as the fourth data disk.
Optionally, the creating or expanding the virtual storage of the current cluster based on the original host number includes:
When the number of the original hosts is multiple, detecting whether a cloud security service platform is positioned 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 preset operation after migration;
If the cloud security service platform is not located in the virtual storage, directly executing the preset operation;
the preset operation includes:
controlling all virtual machines in the virtual storage to be shut down, and adding all empty idle data disks in the newly-added host to the virtual storage;
And migrating the cloud security service platform to virtual storage added with the idle data disk, and controlling all virtual machines to start.
Optionally, the migrating the cloud security service platform from the virtual storage to the fifth data disk includes:
And acquiring a fifth data disk with 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 migrating the cloud security service platform to the virtual storage after adding the idle data disk, the method further includes: obtaining the residual data disk in the newly-added host computer at present;
And carrying out formatting operation on the residual data disk, and adding the formatted disk as a cache disk into the virtual storage.
In order 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 into the current cluster and deploying the network configuration in the current cluster;
the host acquisition module is used for acquiring the original host number in the current cluster;
and the cluster expansion module is used for creating or expanding the virtual storage of the current cluster based on the original host number.
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 any of the cluster expansion methods as previously disclosed 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 expansion method as described in any of the foregoing disclosures.
According to the scheme, the cluster capacity expansion method provided by the application comprises the following steps: adding the newly added host into a current cluster, and deploying 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 application, when the capacity is expanded, the virtual storage of the current cluster is created or expanded in a self-adaptive manner according to the number of the original hosts in the current cluster, so that the manual intervention process 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, electronic equipment and a computer readable storage medium, and the technical effects can be realized.
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 as claimed.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a cluster expansion method disclosed in an embodiment of the present application;
Fig. 2 is a schematic flow chart of a cluster expansion method according to an embodiment of the present application;
FIG. 3 is a flowchart of another cluster expansion method according to an embodiment of the present application;
FIG. 4 is a flow chart of yet another cluster expansion method disclosed in an embodiment of the present application;
Fig. 5 is a schematic flow chart of another cluster expansion method according to an embodiment of the present application;
FIG. 6 is a flowchart of a component migration process in a cluster expansion method according to an embodiment of the present application;
Fig. 7 is a schematic flow chart of a component migration process in a cluster expansion method according to an embodiment of the present application;
FIG. 8 is a flow chart of a cluster expansion method according to an embodiment of the present application;
Fig. 9 is a flowchart of a cluster expansion method according to another embodiment of the present application;
fig. 10 is a schematic flow chart of a cluster expansion method according to an embodiment of the present application;
FIG. 11 is a block diagram of a cluster expansion system according to an embodiment of the present application;
Fig. 12 is a block diagram of an electronic device according to an embodiment of the present application;
Fig. 13 is a block diagram of another electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In the prior art, in order to meet the demand of clients on cluster expansion, the cluster expansion is mainly realized in a manual expansion mode at present, a new host computer is manually added, a data communication network and a storage communication network are configured, a VS (virtual switch) or a VS is established, and the manual intervention mode is not only inflexible, but also seriously wastes a large amount of manpower and material resources.
Therefore, the embodiment of the application discloses a cluster capacity expansion method, which avoids the manual capacity expansion process and saves a large amount of human resources.
Referring to fig. 1 and fig. 2, a flow chart of a cluster expansion method disclosed in an embodiment of the present application, as shown in fig. 1 and fig. 2, includes:
S101: adding the newly added host into a current cluster, and deploying network configuration in the current cluster;
In a specific implementation, when the cluster expands, a newly added host is added to the cluster of the secure resource pool, and a network configuration of the current cluster is deployed, wherein the cluster is a group of computers, and provides a group of network resource services for users 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 capacity 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 number of original hosts, so that host capacity expansion is implemented according to the capacity expansion algorithm. If the current cluster has VS, directly expanding the VS; if the current cluster does not create the VS, creating the corresponding VS according to the capacity expansion algorithm. For example, if the original host number is 1, virtual storage needs to be created and expanded; if the original host number is 2, the original host number is greater than 1, which indicates that the cluster and the corresponding virtual storage already exist, so that when the cluster is expanded under the condition that the original host number is greater than 1, the virtual storage of the current cluster can be directly expanded.
According to the scheme, the cluster capacity expansion method provided by the application comprises the following steps: adding the newly added host into a current cluster, and deploying 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 application, when the capacity is expanded, the virtual storage of the current cluster is created or expanded in a self-adaptive manner according to the number of the original hosts in the current cluster, so that the manual intervention process is avoided, the capacity expansion efficiency is improved, and a large amount of human resources are saved.
The embodiment of the application discloses another cluster expansion method, and compared with the previous embodiment, the embodiment further describes a cluster expansion process when the number of the original hosts is one. Specific:
referring to fig. 3, a flowchart of another cluster expansion method provided by an embodiment of the present application, as shown in fig. 3, includes:
S201: adding the newly added host into a current cluster, and deploying 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 or not;
S203: if the newly added host and the original host both contain empty data disks, determining the first empty data disk in the newly added host and the second empty data disk in the original host as target data disks;
S204: judging whether the virtual storage exists in the current cluster or not;
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, creating 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 between the original host and the newly added host to be expanded, if so, after judging whether virtual storage exists, it is directly created or expanded by using the empty data disks.
It should be noted that, if a plurality of empty data disks are detected in the process of detecting whether the original host and the newly added host have empty data disks, any data disk may be selected as a target data disk for creating or expanding the virtual storage.
Based on the above embodiment, the embodiment of the application discloses another cluster expansion method. Specific:
referring to fig. 4, a flowchart of still another cluster expansion method provided by an embodiment of the present application, as shown in fig. 4, includes:
s301: adding the newly added host into a current cluster, and deploying 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 or not;
S303: if the newly added host and the original host both contain empty data disks, taking the empty data disks of the newly added host and the empty data disks of the original host as target data disks;
S304: if the empty data disk is not detected in the original host, acquiring a third data disk with the minimum disk utilization rate in the original host;
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 or not;
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, creating the virtual storage by using the target data disk.
After detecting whether the newly added host and the original host contain empty data disks or not, if the original host does not detect the empty data disks, the embodiment obtains a third data disk with the minimum disk usage rate in the original host, namely, a data disk with the minimum capacity occupation, migrates all components in the searched third data disk, and after migration is completed, extends or creates virtual storage by taking the third data disk and the first data disk with the empty data disk in the newly added host as target data disks.
Further, as shown in fig. 5, based on the above embodiment, if the current local storage in step S304 fails to obtain, the embodiment may further obtain the solid state disk in the original host, and use the solid state disk and the first data disk that is empty in the newly added host as the target data disk to create or extend the VS. 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, but when virtual storage is not available in the early stage, the SSD disk may be initialized and stored in a local manner.
In addition, after the component is migrated and after whether virtual storage exists is detected, whether the operation is completed or whether the detection is successful is further determined, if the operation fails or the detection fails, corresponding exception processing is performed, for example, corresponding detailed error information can be printed, and the error information is returned to the foreground interface for display.
On the basis of the foregoing embodiments, this embodiment is further described with respect to the component migration process. Specific:
Referring to fig. 6 and fig. 7, a flow chart of a component migration process in a cluster expansion method according to an embodiment of the present application, as shown in fig. 6 and fig. 7, includes:
s401: judging whether the virtual storage exists in the current cluster or not;
S402: if the virtual storage exists in the current cluster, migrating all the components to the virtual storage;
S403: and if the virtual storage does not exist in the current cluster, determining a fourth data disk from the original host, and migrating all components from the third data disk to the fourth data disk.
In this embodiment, when components are migrated, whether a current cluster has a VS is determined, and if yes, all components are migrated to the VS; if not, determining a fourth data disk from the original 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 storage except the third data disk in the data disk of the original host, determining the data disk with the minimum disk use rate in all the local storage, and determining the data disk as a fourth data disk.
It can be understood that the above component migration process can ensure the idempotency of migration, migrate components to VS as much as possible, and effectively save migration times and migration time.
The embodiment of the application discloses a cluster expansion method, and in comparison with the previous embodiment, the embodiment specifically further describes a cluster expansion process when the number of original hosts is multiple. Specific:
Referring to fig. 8, a flowchart of still another cluster expansion method provided by an embodiment of the present application, as shown in fig. 8, includes:
s501: adding the newly added host into a current cluster, and deploying network configuration in the current cluster;
S502: when the number of the original hosts is multiple, detecting whether a cloud security service platform is positioned 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 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 independently developed platform for providing service security delivery in a cloud security scene. Additionally, there are currently some limitations due to the underlying mechanisms of the super fusion all-in-one machine, such as: when expanding, all disks need to be added into VS,2 hosts expand 3 hosts, and because of the arbitration mechanism of VS in HCI, all virtual devices on VS need to be shut down, so that the disks can be successfully added into the VS.
As can be seen from the above, in this embodiment, before migrating the cloud security service platform from the virtual storage to the fifth data disk, whether the cloud security service platform is located in the virtual storage is detected first, if yes, the cloud security service platform is migrated from the virtual storage to the fifth data disk, and after migration, a preset operation is executed; 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 above-mentioned 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 after the addition is completed, migrating the cloud security service platform back to the virtual storage with the idle data disks added, so as to control all virtual machines to start up, and completing the expansion of the cluster.
The embodiment of the application discloses a cluster capacity expansion method, and compared with the previous embodiment, the embodiment further describes the migration process of a cloud security service platform. Specific:
referring to fig. 9 and fig. 10, a flowchart of a cluster expansion method according to an embodiment of the present application, as shown in fig. 9, includes:
s601: adding the newly added host into a current cluster, and deploying network configuration in the current cluster;
s602: when the number of the original hosts is multiple, detecting whether a cloud security service platform is positioned in the virtual storage;
S603: if the cloud security service platform is located in the virtual storage, acquiring a fifth data disk with disk capacity larger than a preset capacity threshold value in the original host;
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 powered off, and adding all empty idle data disks of a newly-added host to the virtual storage;
s606: and migrating the cloud security service platform to the virtual storage, and controlling all virtual machines to start.
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 original 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 original host may include: and judging whether the system disk capacity of the original host is larger than a preset capacity threshold, and performing migration only when the system disk capacity is enough. For example, if the actual occupied disk size of the current cloud security service platform is 15G, but the system disk only has 10G of residual capacity, migration cannot be performed, if the residual capacity of only 15G cannot be performed, it is necessary to ensure that the residual capacity is greater than a preset capacity threshold, 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 generally defined as 5G, that is, for the cloud security service platform actually occupying 15G of disk size, the migration of the platform can be realized only when the system disk needs to satisfy the residual capacity greater than 20G. After judging whether the system disk capacity of the original host is larger than a preset capacity threshold, determining whether to migrate the cloud security service platform to the system disk according to a judging result. If the system disk capacity of the original host is not greater than the preset capacity threshold, detecting local storage except the system disk in the newly-added host, and migrating the cloud security service platform to the local storage. When the system disk capacity of the original host is not greater than a preset capacity threshold and the newly-added host does not contain local storage except the system disk, the embodiment further detects whether the newly-added host contains a solid state disk SSD, if so, the cloud security service platform is migrated to the initialized solid state disk after the solid state disk is initialized.
In addition, after the cloud security service platform is migrated from the virtual storage to the preset disk, the embodiment may further include: and formatting the residual data disk of the newly added host computer, and adding the formatted disk as a buffer disk into the virtual storage.
The following describes a cluster expansion system provided by the embodiment of the present application, and the cluster expansion system described below and the cluster expansion method described above may be referred to each other.
Referring to fig. 11, a block diagram of a cluster expansion system provided by an embodiment of the present application, as shown in fig. 11, includes:
a network deployment module 100, configured to add a new host to a current cluster and deploy a network configuration in the current cluster;
a host acquisition module 200, configured to acquire an original host number in the current cluster;
the cluster expansion module 300 is configured to create or expand the virtual storage of the current cluster based on the original host number.
On the basis of the foregoing embodiment, as a preferred implementation manner, a cluster expansion module in a cluster expansion system provided in this embodiment may include:
The disk detection sub-module is used for detecting whether the original hosts in the newly-added host and the current cluster contain empty data disks or not when the original host number is one;
The disk determining sub-module is used for determining a first empty data disk in the newly added host and a second empty data disk in the original host as a target data disk if the newly added host and the original host both contain empty data disks;
the first judging submodule is used for judging whether the virtual storage exists in the current cluster or not;
The disk adding module is used for adding the target data disk to the virtual storage if the virtual storage exists in the current cluster;
and the storage creation sub-module is used for creating the virtual storage by utilizing the target data disk if the current cluster does not detect the virtual storage.
On the basis of the foregoing embodiment, as a preferred implementation manner, the cluster expansion system provided in this embodiment may further include:
the disk acquisition module is used for acquiring a third data disk with the minimum disk utilization rate in the original host if the empty data disk is not detected in the original 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 expansion system provided in this embodiment may further include:
the hard disk acquisition module is used for acquiring the solid state disk in the original host if the third data disk fails to acquire, 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 judging submodule is used for judging whether the virtual storage exists in the current cluster or not;
a first migration submodule, configured to migrate, if the virtual storage exists in the current cluster, all components into the virtual storage;
And the second migration submodule is used for determining a fourth data disk from the original host computer and migrating 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 manner, the second migration submodule provided in this embodiment may include:
the residual acquisition unit is used for acquiring all local storages except the third data disk in the data disk of the original host;
and the target determining unit is used for determining the disk with the minimum disk use rate in all the local storage as the fourth data disk.
On the basis of the foregoing embodiment, as a preferred implementation manner, a cluster expansion module in a cluster expansion system provided in this embodiment may include:
The platform detection sub-module is used for detecting whether the cloud security service platform is positioned in the virtual storage or not when the number of the original hosts is multiple;
the platform migration sub-module 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 workflow of a preset operation sub-module after migration;
The operation execution sub-module is used for directly starting the workflow of a 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 virtual machines in the virtual storage to be shut down and adding all empty idle data disks in the newly-added host 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 the starting of all the virtual machines.
On the basis of the foregoing embodiment, as a preferred implementation manner, the power-on control unit provided in this embodiment is specifically configured to: obtaining a fifth data disk with 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 expansion system provided in this embodiment may further include:
the residual acquisition module is used for acquiring residual data disks in the newly-added host computer at present;
and the cache adding module is used for carrying out formatting operation on the residual data disk and adding the formatted disk serving as a cache disk into the virtual storage.
The application also provides an electronic device, referring to fig. 12, and a block diagram of the electronic device provided in the embodiment of the application, as shown in fig. 12, includes:
A memory 11 for storing a computer program;
the processor 12 is configured to execute the computer program to implement the steps provided in 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 execution of the computer readable instructions in the non-volatile storage medium. The processor 12 may be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor or other data processing chip in some embodiments, providing computing and control capabilities for the electronic device, and executing the computer program stored in the memory 11 may implement the following steps:
Adding the newly added host into a current cluster, and deploying 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 subroutine stored in the memory 11, the following steps may 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 or not; if the newly added host and the original host both contain empty data disks, determining the first empty data disk in the newly added host and the second empty data disk in the original host as target data disks; judging whether the virtual storage exists in the current cluster or not; 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, creating the virtual storage by using the target data disk.
Preferably, when the processor 12 executes the computer subroutine stored in the memory 11, the following steps may be implemented: if the empty data disk is not detected in the original host, acquiring a third data disk with the minimum disk utilization rate in the original host; acquiring all components in the third data disk, and performing migration operation on all the components; and 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 subroutine stored in the memory 11, the following steps may be implemented: if the third data disk fails to be acquired, acquiring 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 subroutine stored in the memory 11, the following steps may 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; and if the virtual storage does not exist in the current cluster, determining a fourth data disk from the original host, and migrating all components from the third data disk to the fourth data disk.
Preferably, when the processor 12 executes the computer subroutine stored in the memory 11, the following steps may be implemented: acquiring all local storages except the third data disk in the data disk of the original host; and determining the disk with the minimum disk use rate in all the local storage as the fourth data disk.
Preferably, when the processor 12 executes the computer subroutine stored in the memory 11, the following steps may be implemented: when the number of the original hosts is multiple, detecting whether a cloud security service platform is positioned 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 preset operation after migration; if the cloud security service platform is not located in the virtual storage, directly executing the preset operation; the preset operation includes: controlling all virtual machines in the virtual storage to be shut down, and adding all empty idle data disks in the newly-added host to the virtual storage; and migrating the cloud security service platform to virtual storage added with the idle data disk, and controlling all virtual machines to start.
Preferably, when the processor 12 executes the computer subroutine stored in the memory 11, the following steps may be implemented: and acquiring a fifth data disk with 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 subroutine stored in the memory 11, the following steps may be implemented: obtaining the residual data disk in the newly-added host computer at present; and carrying out formatting operation on the residual data disk, and adding the formatted disk as a cache disk into the virtual storage.
On the basis of the above embodiment, as a preferred implementation manner, referring to fig. 13, the electronic device further includes:
An input interface 13, which is connected to the processor 12, for obtaining externally imported computer programs, parameters and instructions, which are stored in 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 entered by a user. The input device can be a touch layer covered on a display screen, can also be a key, a track ball or a touch pad arranged on a terminal shell, and can also be a keyboard, a touch pad or a mouse, etc.
A display unit 14 is 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-control liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like.
A network port 15, which is connected to the processor 12 and is used for communication connection with external terminal devices. 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 technology (MHL), a Universal Serial Bus (USB), a High Definition Multimedia Interface (HDMI), a wireless fidelity technology (WiFi), a Bluetooth communication technology with low power consumption, a communication technology based on IEEE802.11s, and the like.
Fig. 13 shows only an electronic device with components 11-15, it will be understood by those skilled in the art that the configuration shown in fig. 13 is not limiting of the electronic device and may include fewer or more components than shown, or may combine certain components, or a different arrangement of components.
The present application also provides a computer-readable storage medium, which may include: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes. The storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of any of the cluster expansion methods disclosed above.
According to the scheme, the cluster capacity expansion method provided by the application comprises the following steps: adding the newly added host into the current cluster, and deploying the network configuration in the current cluster; acquiring the number of original hosts in a current cluster; virtual storage for the current cluster is created or expanded based on the original host number. According to the application, when the capacity is expanded, the virtual storage of the current cluster is created or expanded in a self-adaptive manner according to the number of the original hosts in the current cluster, so that the manual intervention process is avoided, the capacity expansion efficiency is improved, and a large amount of human resources are saved.
In the description, each embodiment is described in a progressive manner, and each embodiment is mainly described by the differences from other embodiments, so that the same similar parts among the embodiments are mutually referred. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section. It should be noted that it will be apparent to those skilled in the art that various modifications and adaptations of the application can be made without departing from the principles of the application and these modifications and adaptations are intended to be within the scope of the application as defined in the following claims.
It should also be noted that in this 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. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.

Claims (11)

1. A cluster expansion method, comprising:
adding the newly added host into a current cluster, and deploying network configuration in the current cluster;
Acquiring the number of original hosts in the current cluster;
creating or expanding virtual storage of the current cluster based on the original host number;
when the number of the original hosts is one, detecting whether empty data disks exist in the original hosts and the newly added hosts in the current cluster;
If yes, after judging whether the virtual storage exists, directly creating or expanding by using any empty data disk;
When the number of the original hosts is multiple, detecting whether a cloud security service platform is positioned 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 preset operation after migration;
If the cloud security service platform is not located in the virtual storage, directly executing the preset operation;
the preset operation includes: controlling all virtual machines in the virtual storage to be shut down, and adding all empty idle data disks in the newly-added host to the virtual storage; and migrating the cloud security service platform to virtual storage added with the idle data disk, and controlling all virtual machines to start.
2. The method for cluster expansion according to claim 1, wherein if yes, after determining whether the virtual storage already exists, directly creating or expanding by using an empty data disk, including:
if the newly added host and the original host both contain empty data disks, determining the first empty data disk in the newly added host and the second empty data disk in the original host as target data disks;
judging whether the virtual storage exists in the current cluster or not;
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, creating the virtual storage by using the target data disk.
3. The method for cluster expansion according to claim 2, wherein after detecting whether the original host and the new host in the current cluster have empty data disks when the original host number is one, further comprising:
if the empty data disk is not detected in the original host, acquiring a third data disk with the minimum disk utilization rate in the original host;
Acquiring all components in the third data disk, and performing migration operation on all the components;
and after the migration operation is completed, determining the third data disk and the first data disk as the target data disk.
4. The method for cluster expansion according to claim 3, wherein after the obtaining the third data disk with the minimum disk usage rate in the original host, the method further comprises:
If the third data disk fails to be acquired, acquiring 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. A cluster expansion method according to claim 3, wherein said performing a migration operation on all 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;
And if the virtual storage does not exist in the current cluster, determining a fourth data disk from the original host, and migrating all components from the third data disk to the fourth data disk.
6. The method of claim 5, wherein determining a fourth data disk from the original host comprises:
acquiring all local storages except the third data disk in the data disk of the original host;
And determining the disk with the minimum disk use rate in all the local storage as the fourth data disk.
7. The cluster expansion method according to claim 1, 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 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.
8. The cluster expansion method according to claim 1, wherein after the cloud security service platform is migrated to the virtual storage after the idle data disk is added, further comprising:
obtaining the residual data disk in the newly-added host computer at present;
And carrying out formatting operation on the residual data disk, and adding the formatted disk as a cache disk into the virtual storage.
9. A cluster expansion system, comprising:
the network deployment module is used for adding the newly added host into the current cluster and deploying the network configuration in the current cluster;
the host acquisition module is used for acquiring the original host number in the current cluster;
the cluster expansion module is used for creating or expanding the virtual storage of the current cluster based on the original host number;
The empty data disk detection module is used for detecting whether empty data disks exist in the original host and the newly-added host in the current cluster when the number of the original hosts is one;
The data disk creation or expansion module is used for directly creating or expanding by using any empty data disk after judging whether the virtual storage exists or not if yes;
The cloud security service platform detection module is used for detecting whether the cloud security service platform is positioned in the virtual storage or not when the number of the original hosts is multiple;
the first preset operation execution module 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 executing preset operation after migration;
The second preset operation execution module is used for directly executing the preset operation if the cloud security service platform is not located in the virtual storage;
the preset operation includes: controlling all virtual machines in the virtual storage to be shut down, and adding all empty idle data disks in the newly-added host to the virtual storage; and migrating the cloud security service platform to virtual storage added with the idle data disk, and controlling all virtual machines to start.
10. An electronic device, comprising:
A memory for storing a computer program;
Processor for implementing the steps of the cluster expansion method according to any of claims 1 to 8 when executing said computer program.
11. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the cluster expansion method according to any of claims 1 to 8.
CN201910702391.4A 2019-07-31 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 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 2019-07-31 Cluster capacity expansion method and system, electronic equipment and storage medium

Publications (2)

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

Family

ID=74486176

Family Applications (1)

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

Country Status (1)

Country Link
CN (1) CN112306373B (en)

Families Citing this family (1)

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

Citations (12)

* 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
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
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
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
CN109508223A (en) * 2017-09-14 2019-03-22 顺丰科技有限公司 A kind of virtual machine batch creation method, system and equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7752412B2 (en) * 2006-09-29 2010-07-06 Sandisk Corporation Methods of managing file allocation table information
US8856337B2 (en) * 2011-08-16 2014-10-07 Hitachi, Ltd. Method and apparatus of cluster system provisioning for virtual maching environment

Patent Citations (12)

* 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
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
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
"VMWare增加***硬盘容量(扩容)的操作方法";legend02uwn;《CSDN》;全文 *

Also Published As

Publication number Publication date
CN112306373A (en) 2021-02-02

Similar Documents

Publication Publication Date Title
US11868785B2 (en) Application program page processing method and device
CN110069219B (en) Data storage method and system, electronic equipment and storage medium
US20190220216A1 (en) Memory reclaiming method and terminal
KR101971389B1 (en) Federation-based memory management
CN101650660B (en) Booting a computer system from central storage
US20190205160A1 (en) Application Process Management Method And Terminal Device
CN105637470B (en) Method and computing device for dirty data management
CN110704161B (en) Virtual machine creation method and device and computer equipment
AU2017232694B2 (en) Method, apparatus, server and storage medium of erasing cloud host in cloud-computing environment
CN106294387B (en) Data migration method and device
US11232066B2 (en) Method for data migration and terminal
CN108345496B (en) Method and device for running application program
CN104580375A (en) Method and equipment for determining UI style information of target application
CN112306373B (en) Cluster capacity expansion method and system, electronic equipment and storage medium
CN106775445B (en) Data migration method and device
CN115221156A (en) Database cluster capacity expansion method and device, computer equipment and storage medium
CN106325972B (en) Virtual machine management method and network equipment
WO2023098614A1 (en) Cloud instance capacity expansion/reduction method and related device therefor
CN112698908A (en) Cloud computing resource expansion processing method and device, storage medium and processor
CN109981798A (en) A kind of method for writing data, system and electronic equipment and storage medium
CN111538520B (en) Updating method and device for super-converged cluster, terminal and storage medium
CN112463228A (en) Storage pool hybrid deployment method and device
CN116028433B (en) Data migration method and electronic equipment
CN116149802B (en) Data pushing method, device, storage medium and apparatus
KR101669567B1 (en) Method for managing a placement of virtual machine

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