Bare metal data cleaning method and device, equipment and medium

By controlling the shutdown of the bare metal server through a smart network card, creating an index file and using a cleanup image to create a second cloud disk, and loading a disk cleanup operating system, the problem of inconvenient local disk cleanup on bare metal servers is solved, achieving efficient and highly adaptable data cleanup results.

CN118916337AActive Publication Date: 2024-11-08CHINA UNITED NETWORK COMM GRP CO LTD +2
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410954682.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-16
Publication Date
2024-11-08
Estimated Expiration
2044-07-16

AI Technical Summary

Technical Problem

Existing technologies make it inconvenient to clean up local disks on bare metal servers, especially the data left behind after tenants terminate their leases, which cannot be effectively cleaned up, posing a risk of data leakage. Furthermore, existing methods are complex and have poor adaptability.

Method used

The system controls the shutdown of the bare metal server via a smart network card, creates an index file, uses a cleanup image to create a second cloud disk, maps it to a virtual hard disk, loads the disk cleanup operating system, and cleans up local disk data based on the index file.

Benefits of technology

It achieves efficient and highly adaptable local disk data cleanup, avoids data leaks, simplifies the operation process, and reduces maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118916337A_ABST
    Figure CN118916337A_ABST
Patent Text Reader

Abstract

The invention provides a data cleaning method and device for bare metal, equipment and a medium. The method comprises the steps that if an intelligent network card obtains a user unsubscribing request, a bare metal server is controlled to enter a shutdown state, and a first cloud disk of a user instance is cleaned; an index file used for recording a deletion mode of data corresponding to the user instance is created, a second cloud disk is created according to the cleaning mirror image, and the second cloud disk can be used for obtaining the index file; and mapping the second cloud disk to a virtual hard disk of the bare metal server, obtaining the index file by starting the virtual hard disk, and cleaning data corresponding to the user instance in a local disk of the bare metal server according to the index file. According to the method, the bare metal local disk can be cleaned, and resource occupation of a bare metal server by a user can be better eliminated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing, and in particular to a bare metal data cleaning method, device, equipment and medium. Background Art

[0002] Bare metal is a physical server, also known as a bare metal server; a bare metal server is also configured with devices similar to other servers, including network cards, hard disks, CPUs and other hardware; cloud computing is a method of providing computing resources (such as servers, etc.) through the Internet. In cloud computing, bare metal servers are distributable resources and can be reused.

[0003] When a tenant's lease on a bare metal server expires, if the tenant does not renew the lease, the right to use the relevant resources in the bare metal server can be allocated to other subsequent tenants in need; however, the data left on the disk after the previous tenant's use is garbage data for the next tenant, and there is a risk of data leakage for the previous tenant; the existing technology has corresponding cleaning methods for data on cloud disks, but there is no applicable cleaning method for local disks.

[0004] Therefore, the present application proposes a bare metal data cleaning method to solve the above problems. Summary of the invention

[0005] The present application provides a bare metal data cleaning method, device, equipment and medium to solve the problem of inconvenience in cleaning local disks in the prior art.

[0006] In a first aspect, the present application provides a bare metal data cleaning method, comprising:

[0007] If the smart network card receives a user unsubscribe request, it controls the bare metal server to enter the shutdown state and cleans up the first cloud disk of the user instance;

[0008] Creating an index file for recording a deletion mode of data corresponding to the user instance, and creating a second cloud disk according to the cleanup image, wherein the second cloud disk can be used to obtain the index file;

[0009] The second cloud disk is mapped to the virtual hard disk of the bare metal server, the index file is obtained by starting the virtual hard disk, and the data corresponding to the user instance in the local disk of the bare metal server is cleaned up according to the index file.

[0010] In a possible implementation, the step of creating a second cloud disk according to the cleaned image includes:

[0011] The smart network card obtains the cleanup image recorded in the cloud management component server, so that the cloud management component server creates the second cloud disk according to the cleanup image, wherein the cleanup image is a disk cleanup operating system template.

[0012] In a possible implementation, mapping the second cloud disk to the virtual hard disk of the bare metal server includes:

[0013] The smart network card updates the identifier corresponding to the cleaned image through the cloud management component server, and obtains the network connection information of the second cloud disk, so that the second cloud disk is bound to the smart network card;

[0014] The smart network card maps the second cloud disk to the virtual hard disk of the bare metal server through the smart network card interface.

[0015] In a possible implementation, after mapping the second cloud disk to the virtual hard disk of the bare metal server, the method further includes:

[0016] The smart network card sends a startup request to the bare metal server, wherein the bare metal server starts the virtual hard disk according to the startup request;

[0017] The step of obtaining the index file by starting the virtual hard disk includes:

[0018] The disk cleaning operating system in the second cloud disk is loaded by starting the virtual hard disk, and the disk wiping program in the disk cleaning operating system is used to control the bare metal server to obtain the index file from the smart network card.

[0019] In a possible implementation, the cleaning up the data corresponding to the user instance in the local disk of the bare metal server according to the index file includes:

[0020] Identify the media type of the disk in the bare metal server through a disk cleaning program in the operating system of the second cloud disk, and obtain the local disk;

[0021] The data corresponding to the user instance in the local disk is cleaned up through the deletion mode in the index file, wherein the deletion mode includes the type and path of the deleted data.

[0022] In a possible implementation, after cleaning the data corresponding to the user instance in the local disk of the bare metal server according to the index file, the method further includes:

[0023] The smart network card obtains the cleaning progress of the data corresponding to the user instance in the local disk of the bare metal server;

[0024] If the cleaning progress is 100%, it is confirmed that the cleaning of the data corresponding to the user instance in the local disk of the bare metal server is completed, and a shutdown request is sent to the bare metal server to control the bare metal server to enter a shutdown state.

[0025] In a possible implementation, if the cleaning progress is 100%, the method further includes:

[0026] The smart network card cancels the mapping of the second cloud disk to the virtual hard disk of the bare metal server through the smart network card interface;

[0027] The smart network card deletes the second cloud disk through the cloud management component server to complete the user unsubscription.

[0028] In a second aspect, the present application provides a bare metal data cleaning device, comprising:

[0029] The acquisition module is used to control the bare metal server to enter a shutdown state and clean up the first cloud disk of the user instance if the smart network card obtains a user unsubscribe request;

[0030] A creation module, used to create an index file for recording a deletion mode of data corresponding to the user instance, and to create a second cloud disk according to the cleanup image, wherein the second cloud disk can be used to obtain the index file;

[0031] A cleaning module is used to map the second cloud disk to the virtual hard disk of the bare metal server, obtain the index file by starting the virtual hard disk, and clean up the data corresponding to the user instance in the local disk of the bare metal server according to the index file.

[0032] In a second aspect, the present application provides a bare metal data cleaning device, including: at least one processor and a memory;

[0033] The memory stores computer-executable instructions;

[0034] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the bare metal data cleaning method as described above.

[0035] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the bare metal data cleaning method as described above.

[0036] The present application provides a bare metal data cleaning method, device, equipment and medium. If the smart network card obtains a user cancellation request, the bare metal server is controlled to enter a shutdown state and the first cloud disk of the user instance is cleaned up; an index file for recording the deletion mode of the data corresponding to the user instance is created, and a second cloud disk is created according to the cleanup image, wherein the second cloud disk can be used to obtain the index file; the second cloud disk is mapped to the virtual hard disk of the bare metal server, the index file is obtained by starting the virtual hard disk, and the data corresponding to the user instance in the local disk of the bare metal server is cleaned up according to the index file.

[0037] In the above method, after the user who subscribes to the bare metal server does not renew the lease, the user can send a user cancellation request to the smart network card. After the smart network card receives the user cancellation request, it can start to clear the resources occupied and the data generated by the user in the cloud disk and local disk corresponding to the bare metal server; the user who subscribes to the bare metal server can access and manage hardware resources through the user instance, and the data corresponding to the user instance can be in the cloud disk and the local disk; during the clearing process, the smart network card controls the bare metal server to shut down, and can clear the first cloud disk corresponding to the user instance in a conventional manner; to clean up the local disk, an index file is created, the deletion mode of the data corresponding to the user instance is recorded in the index file, and a second cloud disk for obtaining the index file is created according to the cleaning image, and the second cloud disk is mapped to the virtual hard disk of the bare metal server, so that the bare metal server can obtain the index file and clean up the data corresponding to the user instance in the local disk of the bare metal server according to the corresponding deletion mode; this application can better clear the user's resource occupation of the bare metal server after the user cancels. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0039] Figure 1 A schematic diagram of a bare metal data cleaning scenario provided in an embodiment of the present application;

[0040] Figure 2 A schematic diagram of a bare metal data cleaning method provided in an embodiment of the present application Figure 1 ;

[0041] Figure 3 A schematic diagram of a bare metal data cleaning method provided in an embodiment of the present application Figure 2 ;

[0042] Figure 4 A schematic diagram of a bare metal data cleaning method provided in an embodiment of the present application Figure 3 ;

[0043] Figure 5 A schematic diagram of a bare metal data cleaning method provided in an embodiment of the present application Figure 4 ;

[0044] Figure 6 A diagram of a bare metal data cleaning device provided by an embodiment of the present invention;

[0045] Figure 7 A hardware schematic diagram of a bare metal data cleaning device provided in an embodiment of the present invention.

[0046] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0047] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0048] Bare metal is a physical server, also known as a bare metal server. Bare metal servers are also configured with devices similar to other servers, including network cards, hard drives, CPUs and other hardware. In cloud computing scenarios, bare metal is a resource that can be allocated to users and is reusable. After the first tenant's use expires and the subscription is no longer renewed, the user's right to use the resource can be reclaimed and allocated to other tenants. However, during the use of the bare metal, the first tenant will leave all data on the bare metal disk. If this part of the data is not cleaned up, it will be useless garbage data for the second user. For the first user, it poses a security risk of data leakage. Therefore, data cleaning on bare metal is a must.

[0049] Because it is a disk cleanup operation, the program to perform disk cleanup cannot be started from the local hard disk. In the existing bare metal cloud disk mounting solutions, almost all disk cleanup is performed by starting the server with PXE. This processing method has the following problems:

[0050] Bare metal network cards must support the PXE function, but there are many types of bare metal servers with different hardware models, and some network cards do not support the PXE function; the bare metal management node must be in the same Layer 2 network (LAN) as the bare metal; the bare metal port on the switch must be configured in the same network as the bare metal management node to ensure network connectivity. The cloud platform must be able to control the switch, and switches come in many models, and different models have different commands. When encountering new models, compatibility adaptation is required, which makes the architecture extremely complex and consumes a lot of maintenance and testing time costs;

[0051] Moreover, the existing processing methods do not specifically clean up the local disk of the bare metal server.

[0052] The bare metal data cleaning method provided in this application is intended to solve the above technical problems of the prior art.

[0053] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0054] Figure 1 A schematic diagram of a bare metal data cleaning scenario provided in an embodiment of the present application. Figure 1 As shown, the system includes: bare metal (bare metal server), smart network card, cloud management component server, backend storage server; bare metal includes CPU, local disk, business network port, interconnection network port, etc.; smart network card includes 10G network port, management network port, interconnection network port, etc.; cloud management component server includes management network port, etc.; backend server includes storage network, storage pool and mirror pool, etc.;

[0055] Smart NICs can be directly plugged into bare metal. Under normal circumstances, bare metal boots from the local disk. The power on and off of smart NICs and bare metal do not affect each other. The link aggregation bond0 composed of the 10G network ports of smart NICs can be mapped to the bare metal server, and it appears as a real network card device on the server. Normal business traffic of bare metal flows out through this network port. The management network port of smart NICs is used to manage the inflow and outflow of traffic, such as the interactive access between services mentioned later. The intercommunication network port of smart NICs and the intercommunication network port of bare metal are a pair of devices used to support network communication between smart NICs and bare metal.

[0056] Different services are also deployed on the smart network card to clean up bare metal data, such as nova-compute service, snap service, and spdk service;

[0057] There can be one or more cloud management component servers, which can be freely deployed according to different business forms. They are mainly used to run other cloud management components, such as glance services and cinder services.

[0058] The back-end storage server is used to maintain network storage. Image files, cloud disk files, etc. can be created on the back-end storage server, and network connection information can be generated for these files for connection with bare metal or virtual machines. The server has a management network port for communicating with the cloud management server network. The server also has a storage network port, through which bare metal or virtual machines connect to the cloud disk.

[0059] This embodiment arranges the above-mentioned hardware and software conditions, and can clean up the data generated by the unsubscribed users on the cloud disk and local disk. The cleaning process is as follows:

[0060] If the smart network card receives a user unsubscribe request, it controls the bare metal server to enter a shutdown state through the intercommunication network port, and cleans up the first cloud disk of the user instance in a conventional manner;

[0061] The smart network card creates an index file for recording a deletion mode of data corresponding to the user instance, and creates a second cloud disk according to the cleanup image, wherein the second cloud disk can be used to obtain the index file;

[0062] The smart network card maps the second cloud disk to the virtual hard disk of the bare metal server through the 10 Gigabit network port and the service network port, that is, loads the disk cleaning operating system, obtains the index file by starting the virtual hard disk, and cleans up the data corresponding to the user instance in the local disk of the bare metal server according to the index file.

[0063] Figure 2 A schematic diagram of a bare metal data cleaning method provided in an embodiment of the present application Figure 1 .like Figure 2 As shown, the method includes:

[0064] S201. If the smart network card receives a user unsubscribe request, the bare metal server is controlled to enter a shutdown state, and the first cloud disk of the user instance is cleaned up.

[0065] SmartNIC is a network interface card that has its own CPU, memory and other units. It can offload network tasks that are traditionally handled by the server CPU, and can also provide storage device simulation for the server. SmartNIC also supports establishing a channel with the server to interact with the server over the network. This application uses the storage device simulation feature to attach network storage outside the bare metal server to the bare metal server. The bare metal server uses the network storage to start and perform local data cleanup.

[0066] During the period of leasing a bare metal server, a user instance is generated. The user instance includes a user name, password, and management data. The data corresponding to the user instance is stored in the local disk of the bare metal server and the first cloud disk. After the user stops renewing the subscription, a cancellation request for the user instance is sent to the smart network card. After receiving the cancellation request, the smart network card first controls the bare metal server to shut down through the smart network card, and the bare metal server enters the shutdown state. The first cloud disk and network of the user instance, as well as the information bound to the user instance recorded in the database are cleaned up to complete the data of the user instance related to the first cloud disk.

[0067] S202: Create an index file for recording a deletion mode of data corresponding to the user instance, and create a second cloud disk according to the cleanup image, wherein the second cloud disk can be used to obtain the index file.

[0068] In order to clean up the local disk of the bare metal server, select a reasonable index file for deleting the data corresponding to the user instance in the local disk. The index file stores the deletion mode of the data corresponding to the user instance and the path location where the cleaning results are to be saved. In this way, data cleaning can be gradually completed according to the instructions of the index file.

[0069] In order to delete the local disk data, a second cloud disk is created according to the cleanup image. The second cloud disk is associated with the index file. The index file can be loaded when the second cloud disk is started, and data cleaning is realized accordingly. The cleanup image is a cleanup template selected from the image pool. There are many different types of system templates stored in the image pool. One can be selected from them to create a cloud disk according to the needs. In this way, the system can be used when the cloud disk is started, such as using the cleanup template.

[0070] The specific process of creating a second cloud disk is as follows:

[0071] In an example, the smart network card obtains the cleanup image recorded in the cloud management component server, so that the cloud management component server creates the second cloud disk according to the cleanup image, wherein the cleanup image is a disk cleanup operating system template.

[0072] Preferably, the nova-compute service of the smart network card obtains the cleanup image recorded in the glance service of the cloud management component server, so that the cinder service of the cloud management component server creates the second cloud disk based on the cleanup image, wherein the cleanup image is a disk cleanup operating system template, and the second cloud disk creates a disk cleanup operating system based on the template.

[0073] The nova-compute service under the OpenStack architecture can be used to manage the life cycle of an image, including operations such as uploading, querying, updating, and deleting an image; the glance service can be used to manage the life cycle of an image, including operations such as uploading, querying, updating, and deleting an image; the cinder service can be used to manage the life cycle of a cloud disk, including operations such as uploading, querying, updating, and deleting a cloud disk; if a cloud disk is created based on an image, the image stored in the backend will be copied to a new cloud disk, and a clean cloud disk, i.e., the second cloud disk, will be copied based on the clean image;

[0074] The corresponding cleanup image is recorded in the glance service. The appropriate cleanup image can be queried through the glance service. After the query, the cleanup image can be used to create a second cloud disk through the cinder service.

[0075] S203: Map the second cloud disk to the virtual hard disk of the bare metal server, obtain the index file by starting the virtual hard disk, and clean up the data corresponding to the user instance in the local disk of the bare metal server according to the index file.

[0076] The bare metal server is powered on, and the disk cleaning operating system is used by loading the second cloud disk. To enable the bare metal server to load the second cloud disk, the second cloud disk needs to be mapped to the virtual hard disk of the bare metal server. Starting the virtual hard disk means starting the disk cleaning operating system in the second cloud disk. The index file is obtained through the disk cleaning operating system, and the data corresponding to the user instance in the local disk of the bare metal server is cleaned according to the indication of the deletion mode in the index file; wherein the deletion mode records information such as the target deletion file, deletion order, and path;

[0077] For example, the step of obtaining the index file by starting the virtual hard disk includes:

[0078] The disk cleaning operating system in the second cloud disk is loaded by starting the virtual hard disk, and the disk wiping program in the disk cleaning operating system is used to control the bare metal server to obtain the index file from the smart network card.

[0079] The disk cleaning operating system includes a disk wiping program, and the disk wiping program includes a method for retrieving the index file; after the virtual hard disk loads the disk cleaning operating system in the second cloud disk, the index file can be obtained to facilitate subsequent cleaning according to the instructions of the index file.

[0080] The control process of booting a bare metal server:

[0081] For example, after mapping the second cloud disk to the virtual hard disk of the bare metal server, the method further includes:

[0082] The smart network card sends a startup request to the bare metal server, wherein the bare metal server starts the virtual hard disk according to the startup request.

[0083] After the nova-compute service of the smart network card confirms that the second cloud disk has been created and mapped, it sends a startup request to the bare metal server. At this time, when the bare metal server is started according to the startup request, it is started from the second cloud disk mapped in the virtual hard disk.

[0084] In an embodiment of the present application, after a user who subscribes to a bare metal server no longer renews the lease, the user can send a user cancellation request to the smart network card. After the smart network card receives the user cancellation request, it can start to clear the resources occupied and the data generated by the user in the cloud disk and local disk corresponding to the bare metal server. The user who subscribes to the bare metal server can access and manage hardware resources through the user instance, and the data corresponding to the user instance can be in the cloud disk and the local disk. During the clearing process, the smart network card controls the bare metal server to shut down, and can clear the first cloud disk corresponding to the user instance in a conventional manner. To clear the local disk, an index file is created, and the deletion mode of the data corresponding to the user instance is recorded in the index file, and a second cloud disk for obtaining the index file is created according to the clearing image, and the second cloud disk is mapped to the virtual hard disk of the bare metal server, so that the bare metal server can obtain the index file and clear the data corresponding to the user instance in the local disk of the bare metal server according to the corresponding deletion mode. The present application can better clear the user's occupation of resources on the bare metal server after the user cancels.

[0085] Figure 3 A schematic diagram of a bare metal data cleaning method provided in an embodiment of the present application Figure 2 .like Figure 3 As shown, the method includes:

[0086] S301. The smart network card updates the identifier corresponding to the cleanup image through the cloud management component server, and obtains the network connection information of the second cloud disk, so that the second cloud disk is bound to the smart network card.

[0087] Preferably, the nova-compute service of the smart network card updates the identifier corresponding to the cleanup image through the cinder service of the cloud management component server, and obtains the network connection information of the second cloud disk, so that the second cloud disk is bound to the smart network card.

[0088] The nova-compute service of the smart network card can call the cinder service through the management network port to update the identification (attachments) corresponding to the cleanup image. After obtaining the identification, the network connection information of the second cloud disk can be obtained, so that the smart network card can communicate with the second cloud disk and bind the second cloud disk to the smart network card.

[0089] S302. The smart network card maps the second cloud disk to the virtual hard disk of the bare metal server through the smart network card interface.

[0090] Preferably, the nova-compute service of the smart network card calls the snap service and the spdk service to map the second cloud disk to the virtual hard disk of the bare metal server.

[0091] After the second cloud disk is bound to the smart network card, the smart network card can manage the second cloud disk and map the cloud disk to the virtual hard disk of the bare metal server through the smart network card interface (snap service and spdk service) for use as an additional disk.

[0092] In the embodiment of the present application, the process of binding the smart network card to the second cloud disk and mapping the second cloud disk to the bare metal server allows the bare metal server to delete local disk data through the second cloud disk.

[0093] Figure 4 A schematic diagram of a bare metal data cleaning method provided in an embodiment of the present application Figure 3 .like Figure 4 As shown, the method includes:

[0094] S401. Identify the media type of the disk in the bare metal server through the disk cleaning program in the operating system in the second cloud disk, and obtain the local disk.

[0095] After the bare metal server is powered on, the disk cleaning operating system is automatically loaded from the attached disk. After the system starts, the disk wiping program is loaded. The disk wiping program can pull the index file from the smart network card, or identify the cloud disk and local disk according to the media type of the disk in the bare metal server to confirm the local disk to be cleaned.

[0096] S402: Clean up the data corresponding to the user instance in the local disk through the deletion mode in the index file, wherein the deletion mode includes the type and path of the deleted data.

[0097] The deletion mode in the index file includes a deletion instruction for cleaning up data corresponding to the user instance in the local disk, including an indication of the type of data to be deleted and a path. The deletion mode can be defined according to requirements.

[0098] In the embodiment of the present application, a disk cleaning operating system is loaded through an additional disk, so that the bare metal server can find the local disk to be cleaned, thereby completing the cleaning according to the index file.

[0099] Figure 5 A schematic diagram of a bare metal data cleaning method provided in an embodiment of the present application Figure 4 .like Figure 5 As shown, the method includes:

[0100] S501. The smart network card obtains the cleaning progress of the data corresponding to the user instance in the local disk of the bare metal server.

[0101] When the bare metal server is cleaning up the local disk, the cleaning progress is synchronized to the nova-compute service of the smart network card. That is, the smart network card can obtain the cleaning progress of the data corresponding to the user instance and store the cleaning progress in the corresponding database for subsequent management.

[0102] S501: If the cleaning progress is 100%, confirm that the cleaning of the data corresponding to the user instance in the local disk of the bare metal server is completed, and send a shutdown request to the bare metal server to control the bare metal server to enter a shutdown state.

[0103] If the cleaning progress is 100%, the corresponding cleaning is confirmed to be completed, and the bare metal server can be controlled to shut down, that is, a shutdown request is sent to the bare metal server to control the bare metal server to enter the shutdown state;

[0104] The second cloud disk used to clean up the local disk of the bare metal server can be deleted after completing the task to avoid occupying resources:

[0105] In an example, the smart network card cancels the mapping of the second cloud disk to the virtual hard disk of the bare metal server through the smart network card interface;

[0106] The smart network card deletes the second cloud disk through the cloud management component server to complete the user unsubscription.

[0107] Preferably, the nova-compute service of the smart network card cancels the mapping of the second cloud disk to the virtual hard disk of the bare metal server through the snap service and the spdk service;

[0108] The nova-compute service of the smart network card deletes the second cloud disk through the cinder service of the cloud management component server to complete the user unsubscription.

[0109] By creating the service used by the second cloud disk, delete the second cloud disk in the reverse process, unmap and delete the second cloud disk in sequence; in this way, the user has completely completed the unsubscription.

[0110] In the embodiment of the present application, during the cleanup process of the bare metal server, the smart network card is cleaned up synchronously, which facilitates timely follow-up management, completes the local disk cleanup, deletes the second cloud disk, and better clears resource occupation, and the method of the present application has good adaptability.

[0111] Figure 6 A bare metal data cleaning device diagram provided by an embodiment of the present invention, such as Figure 6 As shown, the device includes: an acquisition module 601, a creation module 602, and a cleaning module 603;

[0112] The acquisition module 601 is used to control the bare metal server to enter a shutdown state and clean up the first cloud disk of the user instance if the smart network card obtains a user unsubscription request.

[0113] The creation module 602 is used to create an index file for recording the deletion mode of the data corresponding to the user instance, and create a second cloud disk according to the cleanup image, wherein the second cloud disk can be used to obtain the index file.

[0114] The creation module 602 is also used for the smart network card to obtain the cleanup image recorded in the cloud management component server, so that the cloud management component server creates the second cloud disk according to the cleanup image, wherein the cleanup image is a disk cleanup operating system template.

[0115] The cleaning module 603 is used to map the second cloud disk to the virtual hard disk of the bare metal server, obtain the index file by starting the virtual hard disk, and clean up the data corresponding to the user instance in the local disk of the bare metal server according to the index file.

[0116] The cleaning module 603 is further used for the smart network card to update the identifier corresponding to the cleaning image through the cloud management component server, and obtain the network connection information of the second cloud disk, so that the second cloud disk is bound to the smart network card;

[0117] The smart network card maps the second cloud disk to the virtual hard disk of the bare metal server through the smart network card interface.

[0118] The cleaning module 603 is also used to load the disk cleaning operating system in the second cloud disk by starting the virtual hard disk, and control the bare metal server to obtain the index file from the smart network card through the disk wiping program in the disk cleaning operating system.

[0119] The cleaning module 603 is further used to identify the media type of the disk in the bare metal server through the disk cleaning program in the operating system in the second cloud disk, and obtain the local disk;

[0120] The data corresponding to the user instance in the local disk is cleaned up through the deletion mode in the index file, wherein the deletion mode includes the type and path of the deleted data.

[0121] The present application also provides a bare metal data cleaning device, comprising: at least one processor and a memory;

[0122] The memory stores computer-executable instructions;

[0123] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs a bare metal data cleaning method.

[0124] Figure 7 The hardware diagram of the bare metal data cleaning device provided by the embodiment of the present invention is as follows. Figure 7 As shown, the bare metal data cleaning device 70 provided in this embodiment includes: at least one processor 701 and a memory 702. The device 70 also includes a communication component 703. The processor 701, the memory 702 and the communication component 703 are connected via a bus 704.

[0125] In the specific implementation process, at least one processor 701 executes the computer execution instructions stored in the memory 702, so that at least one processor 701 executes the above bare metal data cleaning method.

[0126] The specific implementation process of the processor 701 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.

[0127] In the above Figure 7 In the illustrated embodiment, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0128] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.

[0129] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.

[0130] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the method described above is implemented.

[0131] The computer-readable storage medium mentioned above can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special purpose computer.

[0132] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.

[0133] The division of the units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, which may be electrical, mechanical or other forms.

[0134] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0135] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0136] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variation, use or adaptation of the present invention, which follows the general principles of the present invention and includes common knowledge or conventional techniques in the art not disclosed by the present invention, is not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof.

Claims

1. A bare metal data cleaning method, characterized in that: include: If the smart network card receives a user unsubscribe request, it controls the bare metal server to enter the shutdown state and cleans up the first cloud disk of the user instance; Creating an index file for recording a deletion mode of data corresponding to the user instance, and creating a second cloud disk according to the cleanup image, wherein the second cloud disk can be used to obtain the index file; The second cloud disk is mapped to the virtual hard disk of the bare metal server, the index file is obtained by starting the virtual hard disk, and the data corresponding to the user instance in the local disk of the bare metal server is cleaned up according to the index file.

2. The method according to claim 1, characterized in that The step of creating a second cloud disk according to the cleaned image includes: The smart network card obtains the cleanup image recorded in the cloud management component server, so that the cloud management component server creates the second cloud disk according to the cleanup image, wherein the cleanup image is a disk cleanup operating system template.

3. The method according to claim 1, characterized in that: Mapping the second cloud disk to the virtual hard disk of the bare metal server includes: The smart network card updates the identifier corresponding to the cleaned image through the cloud management component server, and obtains the network connection information of the second cloud disk, so that the second cloud disk is bound to the smart network card; The smart network card maps the second cloud disk to the virtual hard disk of the bare metal server through the smart network card interface.

4. The method according to claim 1, characterized in that: After mapping the second cloud disk to the virtual hard disk of the bare metal server, the method further includes: The smart network card sends a startup request to the bare metal server, wherein the bare metal server starts the virtual hard disk according to the startup request; The step of obtaining the index file by starting the virtual hard disk includes: The disk cleaning operating system in the second cloud disk is loaded by starting the virtual hard disk, and the disk wiping program in the disk cleaning operating system is used to control the bare metal server to obtain the index file from the smart network card.

5. The method according to claim 1, characterized in that The cleaning up the data corresponding to the user instance in the local disk of the bare metal server according to the index file includes: Identify the media type of the disk in the bare metal server through a disk cleaning program in the operating system of the second cloud disk, and obtain the local disk; The data corresponding to the user instance in the local disk is cleaned up through the deletion mode in the index file, wherein the deletion mode includes the type and path of the deleted data.

6. The method according to claim 1, characterized in that After cleaning the data corresponding to the user instance in the local disk of the bare metal server according to the index file, the method further includes: The smart network card obtains the cleaning progress of the data corresponding to the user instance in the local disk of the bare metal server; If the cleaning progress is 100%, it is confirmed that the cleaning of the data corresponding to the user instance in the local disk of the bare metal server is completed, and a shutdown request is sent to the bare metal server to control the bare metal server to enter a shutdown state.

7. The method according to claim 6, characterized in that If the cleaning progress is 100%, the method further includes: The smart network card cancels the mapping of the second cloud disk to the virtual hard disk of the bare metal server through the smart network card interface; The smart network card deletes the second cloud disk through the cloud management component server to complete the user unsubscription.

8. A bare metal data cleaning device, characterized in that: include: The acquisition module is used to control the bare metal server to enter a shutdown state and clean up the first cloud disk of the user instance if the smart network card obtains a user unsubscribe request; A creation module, used to create an index file for recording a deletion mode of data corresponding to the user instance, and to create a second cloud disk according to the cleanup image, wherein the second cloud disk can be used to obtain the index file; A cleaning module is used to map the second cloud disk to the virtual hard disk of the bare metal server, obtain the index file by starting the virtual hard disk, and clean up the data corresponding to the user instance in the local disk of the bare metal server according to the index file.

9. A bare metal data cleaning device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the bare metal data cleaning method as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the bare metal data cleaning method as described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Bare metal server control method and device, and medium

    CN114995954A

  • Cloud disk hot plug method and device, intelligent network card, host and storage medium

    CN116010320A

  • Data cleaning method and device, equipment and storage medium

    CN116774918A

  • System and a method for lean methodology implementation in information technology

    US20170068963A1