Storage management method and device, electronic equipment and storage medium

By identifying the hot data types of virtual machine runtime data and matching them to storage regions, the problem of low storage system performance was solved, enabling effective storage of hot data in the fast storage layer and improving the overall performance of the system.

CN116643704BActive Publication Date: 2026-11-24BEIJING TOPSEC NETWORK SECURITY TECH +2
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310722926.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-16
Publication Date
2026-11-24
Estimated Expiration
2043-06-16

AI Technical Summary

Technical Problem

Existing storage methods result in low overall storage system performance. After hot data is migrated to cold data storage media, frequent access to cold data reduces system performance.

Method used

By identifying the data hotness type of virtual machine running data and matching it with the current storage area, data migration is performed to ensure that hot data is stored in the hot data layer and cold data is stored in the cold data layer. Hot data is identified and managed by using data attributes such as business, access frequency and access time.

Benefits of technology

This improves the overall performance of the storage system, ensuring that hot data is mainly stored in the hot data layer that is accessed quickly, reducing frequent access to the cold data layer, and improving the system's read and write performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116643704B_ABST
    Figure CN116643704B_ABST
Patent Text Reader

Abstract

This application provides a storage management method, apparatus, electronic device, and storage medium, relating to the field of storage technology. The method identifies the data popularity type of virtual machine runtime data based on its data attributes and matches this data popularity type with the current storage area of ​​the runtime data to determine whether hot data is stored in the hot data layer and cold data in the cold data layer. Based on the matching results, storage management of the runtime data can be performed, such as migrating mismatched data. This ensures that data of different popularity types are stored in their corresponding storage areas, so that hot data is mostly stored in the hot data layer and not in the cold data layer for extended periods, thereby effectively improving the overall performance of the storage system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of storage technology, and more specifically, to a storage management method, apparatus, electronic device, and storage medium. Background Technology

[0002] With the advent of the big data era, the volume of data is constantly increasing, driving a surge in demand for storage. Traditional single-mode storage media can no longer meet these needs. Therefore, a tiered storage technology has been proposed. This technology typically defines frequently accessed or recently generated data as "hot data," while other data is defined as "cold data." Hot data is stored in storage media that allows for fast read speeds, while cold data is stored in storage media with slower read speeds. This approach reduces the cost of data storage.

[0003] The current approach typically involves storing data in the storage medium corresponding to hot data first, and then migrating it to the storage medium corresponding to cold data after a period of time. This results in hot data being migrated to the storage medium corresponding to cold data, causing access to hot data to become frequent reading of data in the storage medium corresponding to cold data, thereby reducing the overall performance of the storage system. Summary of the Invention

[0004] The purpose of this application is to provide a storage management method, apparatus, electronic device, and storage medium to improve the problem of low overall performance of storage systems caused by existing storage methods.

[0005] In a first aspect, embodiments of this application provide a storage management method, the method comprising:

[0006] The current storage area for the stored virtual machine runtime data is obtained, wherein the storage area includes a hot data layer and a cold data layer, and the runtime data is preferentially stored in the hot data layer during initial storage;

[0007] The data popularity type of the operational data is identified based on its data attributes, and the data popularity type includes hot data and cold data;

[0008] Match the data popularity type with the current storage area to obtain a matching result;

[0009] The running data is stored and managed based on the matching results.

[0010] In the above implementation process, the data popularity type of the running data is identified based on the data attributes of the virtual machine's running data, and the data popularity type is matched with the current storage area of ​​the running data to determine whether hot data is stored in the hot data layer and cold data is stored in the cold data layer. In this way, the storage management of the running data can be performed according to the matching results, such as migrating mismatched data. This allows data of different popularity types to be stored in the corresponding storage areas, so that hot data is mostly in the hot data layer and will not be in the cold data layer for a long time, thereby effectively improving the overall performance of the storage system.

[0011] Optionally, the data attributes include at least one of the following: the business to which the data belongs, the frequency of data access, the time of data access, and the source of the data;

[0012] Identifying the data popularity type of the operational data based on its data attributes includes at least one of the following determination methods:

[0013] If the business to which the operational data belongs is the target business, then the data popularity type of the operational data is determined to be hot data;

[0014] If the data access frequency of the running data is greater than the set frequency, then the data popularity type of the running data is determined to be hot data;

[0015] If the data access time of the running data is a set time period, then the data popularity type of the running data is determined to be hot data;

[0016] If the data source of the running data is a set source, then the data popularity type of the running data is determined to be hot data.

[0017] In the above implementation process, by identifying the data heat type of the running data based on the above data attributes, hot data and cold data can be effectively identified, and the accurate identification of hot data can be achieved.

[0018] Optionally, if the data attribute includes data access frequency, the data access frequency is obtained in the following way:

[0019] The virtual machine runs a designated process that monitors the data access frequency of the running data.

[0020] In the above implementation process, the data access frequency is monitored by setting up a process in the virtual machine. This eliminates the need for additional resources for monitoring and can be achieved using the existing process, thus realizing the rational use of resources.

[0021] Optionally, if the data attributes include at least two of the following: the service to which the data belongs, the data access frequency, the data access time, and the data source, then in the hot data layer, the hot data is allocated a corresponding storage ratio according to each attribute.

[0022] If the data popularity type of the running data is determined to be hot data based on the target data attributes and the matching result indicates that the data popularity type does not match the current storage area, then the step of managing the storage of the running data based on the matching result includes:

[0023] Based on the storage ratio of hot data in the hot data layer determined by the target data attributes, the operational data is migrated to the hot data layer. This ensures that different types of hot data can be stored in the hot data layer according to their corresponding storage ratios.

[0024] Optionally, the current storage area for obtaining the stored virtual machine runtime data includes:

[0025] Obtain the storage location of the runtime data on the cloud disk;

[0026] The current storage area of ​​the running data in the storage system is determined based on the storage location of the cloud hard drive.

[0027] Optionally, obtaining the storage location of the runtime data on the cloud disk includes:

[0028] Obtain the mapping relationship between data and cloud disk storage location through the file system;

[0029] The file system determines the storage location of the runtime data on the cloud disk according to the mapping relationship.

[0030] In the above implementation process, the mapping relationship between data and cloud disk storage location can be quickly obtained through the file system.

[0031] Optionally, obtaining the storage location of the runtime data on the cloud disk includes:

[0032] A new access service is created on the host machine corresponding to the virtual machine. The new access service is used to detect the storage location of data on the cloud disk.

[0033] The file system receives read requests for the running data;

[0034] The file system converts the read request into an I / O request for the cloud disk and sends the I / O request to the new access service.

[0035] The storage location of the cloud disk corresponding to the IO request is obtained through the new access service, and this storage location is determined as the storage location of the cloud disk where the running data is located.

[0036] In the above implementation process, a new access service is created to obtain the mapping relationship between data and cloud disk storage location, which is applicable to scenarios where the mapping relationship cannot be obtained through the file system.

[0037] Optionally, the step of storing and managing the runtime data based on the matching result includes:

[0038] If the matching result indicates that the data popularity type does not match the current storage area, the running data is migrated to another data layer. This allows mismatched data to be migrated to the corresponding storage area, thereby achieving tiered storage of hot and cold data and improving storage performance.

[0039] Secondly, embodiments of this application provide a storage management device, the device comprising:

[0040] The storage area determination module is used to obtain the current storage area of ​​the stored virtual machine running data, wherein the storage area includes a hot data layer and a cold data layer, and the running data is preferentially stored in the hot data layer during initial storage;

[0041] A heat type determination module is used to identify the heat type of the running data based on the data attributes of the running data, wherein the heat type includes hot data and cold data;

[0042] The matching module is used to match the data popularity type with the current storage area to obtain a matching result;

[0043] The management module is used to store and manage the running data based on the matching results.

[0044] Thirdly, embodiments of this application provide an electronic device, including a processor and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps of the method provided in the first aspect above are performed.

[0045] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the steps of the method provided in the first aspect above.

[0046] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing embodiments of this application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description

[0047] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0048] Figure 1 A flowchart illustrating a storage management method provided in an embodiment of this application;

[0049] Figure 2 This application provides a schematic diagram illustrating the location mapping relationship between a cloud hard drive location and a data block in a storage system.

[0050] Figure 3 This is a schematic diagram illustrating a structure for obtaining the mapping relationship between data and cloud disk location through a new access service, as provided in an embodiment of this application.

[0051] Figure 4 A structural block diagram of a storage management device provided in an embodiment of this application;

[0052] Figure 5 This is a schematic diagram of the structure of an electronic device for performing a storage management method, provided as an embodiment of this application. Detailed Implementation

[0053] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.

[0054] It should be noted that the terms "system" and "network" in the embodiments of this invention can be used interchangeably. "Multiple" refers to two or more; therefore, in the embodiments of this invention, "multiple" can also be understood as "at least two". "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / ", unless otherwise specified, generally indicates that the preceding and following related objects have an "or" relationship.

[0055] This application provides a storage management method. This method identifies the data popularity type of the running data based on the data attributes of the virtual machine's running data, and matches the data popularity type with the current storage area of ​​the running data to determine whether hot data is stored in the hot data layer and cold data is stored in the cold data layer. Thus, the storage management of the running data can be performed according to the matching results, such as migrating mismatched data. This allows data of different popularity types to be stored in the corresponding storage areas, so that hot data is mostly in the hot data layer and does not stay in the cold data layer for a long time, thereby effectively improving the overall access performance of the storage system.

[0056] Please refer to Figure 1 , Figure 1 A flowchart of a storage management method provided in this application embodiment, the method including the following steps:

[0057] Step S110: Obtain the current storage area of ​​the stored virtual machine runtime data.

[0058] The storage area includes a hot data layer and a cold data layer. Understandably, the multiple storage media in the storage system can be pre-layered. For example, some storage media with high read / write performance can be designated as the hot data layer to enable fast data read / write, while some storage media with low read / write performance can be designated as the cold data layer. The specific rules for this layering and the number of storage media can be flexibly set according to the actual situation.

[0059] This application stores data in a hot data layer and a cold data layer, which can be understood as a tiered storage technology. Tiered storage is a method of dividing data into multiple layers according to needs and using different storage media and technologies based on the data requirements of different layers. In hyperconverged systems, tiered storage generally has two layers: an SSD layer, also called the hot data layer, which is typically used to store data that requires fast access, and a mechanical hard drive layer, also called the cold data layer, which is typically used to store large amounts of data that are accessed less frequently.

[0060] Understandably, there are other ways to divide the hot data layer and the cold data layer. For example, the cache in the SSD can be used as the hot data layer and the remaining space can be used as the cold data layer. This method can also achieve layered storage of data, so that data with different reading requirements can be stored in different data layers.

[0061] The runtime data of a virtual machine includes database data, data from various services, and data from various application software. This runtime data can be preferentially stored in the hot data layer during initial storage. This ensures that some runtime data that is originally hot data can always remain in the hot data layer without being migrated, thus achieving high access performance for hot data.

[0062] In some implementations, runtime data can undergo a preliminary identification during initial storage. For example, some system files, such as system logs and system operation data, are typically read only once during boot or written only once. Storing this data in the hot data layer would waste its storage space. Therefore, these files can be stored in the cold data layer during initial storage. After subsequent data popularity type identification, this data will also be considered cold data, thus avoiding data migration and reducing the resource consumption associated with data migration.

[0063] Step S120: Identify the data popularity type of the running data based on the data attributes of the running data.

[0064] Data popularity is categorized into "hot data" and "cold data." Hot data refers to data with high access frequency, while cold data refers to data with low access frequency. In practical applications, data popularity can be further subdivided, such as including "warm data," which falls between hot and cold data—data with moderate but not infrequent access. Hot data can also be further subdivided, such as into "first-hot data," "second-hot data," etc. This allows for more granular storage of different types of data, thereby improving the overall performance of the storage system.

[0065] Understandably, if we further subdivide the data popularity types, then we can also divide the data layers into multiple layers, such as hot data layers, warm data layers, and cold data layers. The division of data layers corresponds to the division of data popularity types; that is, the number of data layers corresponds to the number of data popularity types. The specific division rules can be flexibly chosen in practice.

[0066] In some implementations, data attributes may include at least one of the following: the service to which the data belongs, the frequency of data access, the time of data access, and the source of the data.

[0067] The business to which the data belongs can be understood as the specific business running on the virtual machine, such as virus scanning, traffic monitoring, and data filtering. The data source can refer to a specific type of data, such as the runtime data of an application, the data of a service process, or the data of a database. Understandably, in practical applications, data attributes can be flexibly configured according to the actual situation. Furthermore, data attributes are not limited to those listed above; in practice, more data attributes can be configured as needed to identify data popularity types from more perspectives.

[0068] In specific identification, at least one of the following judgment methods may be included:

[0069] If the business to which the running data belongs is the target business, then the data popularity type of the running data is determined to be hot data; otherwise, it is cold data.

[0070] If the data access frequency of the running data is greater than the set frequency, the data popularity type of the running data is determined to be hot data; otherwise, it is cold data.

[0071] If the data access time of the running data is within a set time period, then the data popularity type of the running data is determined to be hot data; otherwise, it is cold data.

[0072] If the data source for the running data is the set source, then the data popularity type of the running data is determined to be hot data; otherwise, it is cold data.

[0073] The target business can be user-defined and flexibly configured according to actual needs. For example, for data filtering, the data may need to be read frequently, so this data can be considered "hot data." Data access frequency can also reflect data popularity; frequent access indicates high data popularity. This frequency setting can be flexibly configured according to actual conditions. Data access time can also reflect data popularity. For example, if the access time is recent, it indicates high data popularity. The set time period can refer to a period close to the current time, such as 4 hours before the current time. If data is accessed within this time period, it is considered hot data. Data from certain specified sources can also be considered hot data. For example, data from certain databases that are frequently read can be considered hot data.

[0074] In other words, if the running data meets at least one of the above judgment criteria, it can be considered as hot data; if it does not meet any of the above judgment criteria, it can be considered as cold data.

[0075] Step S130: Match the data popularity type with the current storage area to obtain the matching result.

[0076] The purpose of this matching is to determine whether hot data is stored in the hot data layer and whether cold data is stored in the cold data layer. In principle, hot data should be stored in the hot data layer and cold data should be stored in the cold data layer. However, since data is initially stored preferentially in the hot data layer, and if the storage space in the hot data layer is full, data will be stored in the cold data layer. This can lead to some data that was originally hot being stored in the cold data layer and vice versa. Therefore, it is necessary to identify these incorrectly stored data.

[0077] For example, if the data type of the running data is hot data, but the current storage area is a cold data layer, then the two are considered to be mismatched. If the data type of the running data is hot data, and the current storage area is a hot data layer, then the two are considered to be matched. Conversely, if the data type of the running data is cold data, and the current storage area is a hot data layer, then the two are considered to be mismatched. If the data type of the running data is cold data, and the current storage area is a cold data layer, then the two are considered to be matched.

[0078] Step S140: Store and manage the running data based on the matching results.

[0079] Using the above matching method, if the matching result indicates a mismatch between the data popularity type and the current storage area, the running data is migrated to another data layer. For example, if the running data's popularity type is "hot data" and the current storage area is a "cold data layer," the running data is migrated to the hot data layer; if the running data's popularity type is "cold data" and the current storage area is a hot data layer, the running data is migrated to the cold data layer. Conversely, if the matching result indicates a match between the data popularity type and the current storage area, the running data is not migrated; instead, the mismatched data is migrated. This ensures that hot data is mostly stored in the hot data layer and not in the cold data layer for extended periods. The access performance of the hot data layer is generally much higher than that of the cold data layer. Therefore, storing hot data in the hot data layer avoids the performance bottleneck caused by frequent access to hot data in the cold data layer. This solution effectively achieves layered storage of hot and cold data, improving data storage performance.

[0080] In some implementations, to conserve storage management resources, the execution time of the above method can be set to a period, such as executing the method at regular intervals. This means that the data is stored and managed using the above method periodically to achieve data migration. In other words, once the migration cycle is complete, the execution of the above method steps is triggered.

[0081] In the above implementation process, the data popularity type of the running data is identified based on the data attributes of the virtual machine's running data, and the data popularity type is matched with the current storage area of ​​the running data to determine whether hot data is stored in the hot data layer and cold data is stored in the cold data layer. In this way, the storage management of the running data can be performed according to the matching results, such as migrating mismatched data. This allows data of different popularity types to be stored in the corresponding storage areas, so that hot data is mostly in the hot data layer and will not be in the cold data layer for a long time, thereby effectively improving the overall performance of the storage system.

[0082] Based on the above embodiments, if the above data attributes include data access frequency, the data access frequency can be obtained in the following way: by monitoring the data access frequency of running data through a set process running in the virtual machine.

[0083] The "configuration process" can refer to a process shared by multiple virtual machines on the host machine, such as an agent process, which does not affect the existing business of the virtual machines. In hyperconverged systems, virtual machines typically run agent processes, mainly used to collect virtual machine statistics and modify virtual machine configurations online. In this solution, a data monitoring function is added to this agent process, which is used to monitor the data access frequency, such as the number of read and write operations of statistical data, and then obtain the data access frequency based on the number of read and write operations.

[0084] Understandably, the configured process can also be other processes, such as a new process created by the user that runs in each virtual machine to monitor the data access frequency within that virtual machine. Alternatively, the configured process can be another process shared by all virtual machines, in which case there is no need to create a new process; the new functionality can simply be added to an existing process.

[0085] In some implementations, if the data attributes include the multiple attributes mentioned above, the data can be identified first using attributes other than data access frequency. Only when other attributes cannot identify the data or when all other attributes identify the data as cold data, then a designated process is activated to monitor the data access frequency. In this way, if the running data can be identified as hot data through other attributes, there is no need to activate the designated process to monitor the data access frequency. Instead, the designated process is activated only when other attributes cannot identify the data. This reduces the resource consumption of the designated process, allowing it to have more resources to perform its main functions (such as the agent process's main function of collecting virtual machine statistics and modifying virtual machine configurations online).

[0086] In other implementations, when calculating the access frequency of statistics, the configuration process can also filter out some data. For example, system operation data and system logs, which are likely to be cold data, can be excluded from the statistics because this part of the data was initially stored in the cold data layer and is very likely to remain cold data. Therefore, the configuration process can exclude this data and perform data access frequency statistics on the remaining data. This can reduce the workload of the configuration process and improve its efficiency.

[0087] Based on the above embodiments, if the data attributes include at least two of the following: the service to which the data belongs, the data access frequency, the data access time, and the data source, then in the hot data layer, the hot data is allocated a corresponding storage ratio according to each attribute.

[0088] For example, in the hot data layer, the storage ratio of hot data belonging to the target business (which can be called important business data) in the hot data layer is a%, the storage ratio of hot data whose access time is within a set time period (which can be called recently accessed data) in the hot data layer is b%, and the storage ratio of hot data whose access frequency is greater than the set frequency (which can be called the most frequently used data) in the hot data layer is c%. If the hot data layer only stores these three types of hot data, then a% + b% + c% < 100%, and the remaining space is reserved space for storing newly created data blocks.

[0089] Some hot data may satisfy both the criteria of belonging to the target business and having a data access frequency greater than a set frequency. In this case, the storage space for hot data can be prioritized. For example, hot data can be prioritized to occupy the storage space corresponding to the hot data of the target business. If the storage space is insufficient, then the storage space for hot data corresponding to the data access frequency can be occupied. In other words, if the storage ratio of these types of hot data in the hot data layer is fully occupied, the hot data needs to be stored in the cold data layer. When the next migration cycle arrives, if some storage space is released in the hot data layer, the hot data will be stored in the cold data layer.

[0090] In some implementations, when performing data storage management, if the data popularity type of the running data is determined to be hot data based on the target data attributes and the matching result shows that the data popularity type does not match the current storage area, the running data can be migrated to the hot data layer according to the storage ratio of hot data in the hot data layer determined by the target data attributes.

[0091] The target data attribute refers to one of the aforementioned data attributes. For example, the target data attribute is the data access frequency, and its corresponding storage ratio is c%. During migration, the remaining storage space corresponding to the target data attribute in the hot data layer can be calculated first. If the storage space occupied by the running data does not exceed the remaining storage space, all the running data can be migrated to the hot data layer. If it exceeds the remaining storage space, some of the running data can be migrated to the hot data layer, and the remaining running data can wait for the next migration. Alternatively, if there is still remaining storage space for other data attributes in the hot data layer, the remaining running data can be migrated to the storage space corresponding to other data attributes in the hot data layer.

[0092] In other implementations, in addition to migration management based on matching results, migration management based on the storage ratio of various hot data in the hot data layer (in this method, the target data attributes are multiple) also includes: for example, first counting whether the total amount of important business data exceeds a set threshold (a%). If not, all of them are marked as hot data to be migrated. If they exceed the threshold, they are sorted according to data access frequency, and the data at the top of the sort is marked as hot data to be migrated. For the remaining unmarked data, they are sorted according to data access time, and the data with the most recent access time b% is marked as hot data to be migrated. Finally, among the remaining data, they are sorted according to data access frequency, and the data at the top c% is marked as hot data to be migrated. In this way, the data that needs to be migrated can be counted.

[0093] Next, determine how much of this hot data to be migrated is already in the hot data layer. For the hot data to be migrated that is already stored in the hot data layer, no operation is needed. Then, determine which data in the hot data layer does not belong to the hot data to be migrated. Migrate the data that is not hot data to be migrated to the cold data layer for storage, and migrate the hot data to be migrated in the cold data layer to the hot data layer. In this way, the migration can be carried out according to the storage ratio of various hot data, so as to store various hot data in the hot data layer according to the corresponding storage ratio.

[0094] In a hyperconverged system, the virtual hard disk (i.e., cloud disk) used by the virtual machine is the block storage of the storage system. The size of the virtual hard disk may be between several GB and several TB. The block storage can be seen as composed of multiple small data blocks at the underlying level. In a distributed block storage system, the request sent by the virtual machine to the storage system is to read or write a certain location of the block device. The storage system converts the received location and length information into reading or writing a certain small data block, thereby realizing the reading and writing of data.

[0095] Therefore, when obtaining the current storage area of ​​the running data, it is necessary to first obtain the storage location of the running data on the cloud disk, and then determine the current storage area of ​​the running data in the storage system based on the storage location of the cloud disk.

[0096] like Figure 2 As shown in the diagram, the first layer represents the mapping relationship between data and cloud disks. This mapping relationship is established and maintained by the file system in the virtual machine. The second layer represents the mapping relationship between cloud disks and the underlying storage system. This mapping relationship is established and maintained by the distributed storage system and can be directly queried through the storage system.

[0097] Therefore, in some implementations, the mapping relationship between data and cloud disk storage location can be obtained through the file system, and then the storage location of the running data on the cloud disk can be determined based on the mapping relationship.

[0098] In this way, the file system can directly map the relationships through some system calls. For example, the xfs and ext4 file systems can obtain the above mapping relationships through the fiemap system call.

[0099] In other cases, some file systems may not be able to obtain the mapping relationship through the above calls. For such scenarios, this application provides an implementation method, including: creating a new access service in the host machine corresponding to the virtual machine. The new access service is used to detect the storage location of data on the cloud disk. Then, it receives read requests for running data through the file system, converts the read requests into IO requests for the cloud disk, and sends the IO requests to the new access service. The new access service obtains the storage location of the cloud disk corresponding to the IO request and determines the storage location as the storage location of the cloud disk where the running data is located.

[0100] like Figure 3 As shown, the left side represents the normal data read / write I / O path within the virtual machine. To achieve the location mapping between the cloud disk and the data, this solution generates the cloud disk on the host machine, and the file system is also mounted on the host machine. This can be understood as providing the host machine with an interface to access the cloud disk; the host machine and the virtual machine see the same cloud disk and file system. The virtual machine originally had an access service used to handle normal data read / write operations within the virtual machine.

[0101] Create a new access service on the host machine. This new access service is the same as the virtual machine's access service, except that the new access service can carry an identifier when it starts up, which indicates that the new access service is only used to detect the storage location of data on the cloud disk and cannot be used for ordinary IO read and write.

[0102] User read and write requests are sent to this new access service. Since the virtual machine's access service is independent, the new access service doesn't receive IO requests from the virtual machine. Therefore, the data read by both file systems is identical. At this point, only the host machine needs to perform read operations on the file system. The file system receives a read request, converts it into an IO request for the cloud disk, and then sends the IO request to the new access service. Upon receiving the IO request, the new access service records the location of the cloud disk containing the running data. After all data is read, the mapping between the data and the cloud disk location is obtained. Once the new access service obtains the location information, it returns the IO request directly without forwarding it to the storage system for actual data reading. This entire probing process doesn't consume the storage system's disk bandwidth, significantly improving probing speed.

[0103] In some implementations, the mapping relationship between data and cloud disk storage location can be obtained first through the file system. If the file system cannot obtain the mapping relationship, it can then be obtained by creating a new access service. Alternatively, a new access service can be created but not activated. If the file system cannot obtain the mapping relationship, the new access service can then be activated to obtain it. This allows for rapid acquisition of the mapping relationship.

[0104] After identifying the hot data in the above embodiments, the storage location of this hot data on the cloud disk can be obtained first, and then the storage location can be sent to the storage system. The storage system can then determine which small data blocks these data are stored in based on the storage location, and mark these small data blocks as hot data blocks, indicating the data blocks where the hot data is located. When performing data migration later, the location of the hot data can be known, so the storage area where the hot data is located can be directly determined, and it can be determined whether it needs to be migrated. For example, it can be determined whether these hot data blocks are in the cold data layer. If so, they need to be migrated; if not, they do not need to be migrated.

[0105] Since the amount of data may continue to increase and occupy more and more space, the agent process mentioned above can periodically retrieve the location information of all hot data on the cloud disk and send it to the storage system. The storage system updates the storage location of the corresponding hot data according to the location information of the cloud disk, that is, updates the corresponding hot data block.

[0106] In the above implementation process, a new access service is created to obtain the mapping relationship between data and cloud disk storage location, which is applicable to scenarios where the mapping relationship cannot be obtained through the file system.

[0107] Therefore, in this embodiment, by identifying the data popularity type, important business data in the virtual machine, such as a database file, can be automatically identified and stored in the hot data layer. This ensures that the reading and writing of important business data are all done in the hot data layer, guaranteeing that the read and write performance of the business meets the standards. Furthermore, this application sets the settings for business data within the virtual machine, rather than for the entire virtual machine. This reduces the amount of irrelevant data falling into the hot data layer, improving space utilization. For example, a virtual machine may be 100GB in size, but only 10GB may contain important business data, with the remainder being system operation data and system logs. By identifying this data, the corresponding data can be placed in the corresponding storage area, avoiding the problem of inaccurate hot data statistics affecting the performance of important businesses, rather than storing all the data of the entire virtual machine in the hot data layer. This allows for better utilization of the hot data layer's storage space, effectively improving the overall performance of the storage system and supporting more virtual machine services.

[0108] Please refer to Figure 4 , Figure 4 This is a structural block diagram of a storage management device 200 provided in an embodiment of this application. The device 200 may be a module, program segment, or code on an electronic device. It should be understood that this device 200 is similar to the one described above. Figure 1 The method implementation corresponds to this and can be executed. Figure 1 The various steps involved in the method embodiment and the specific functions of the device 200 can be found in the description above. To avoid repetition, detailed descriptions are omitted here.

[0109] Optionally, the device 200 includes:

[0110] Storage area determination module 210 is used to obtain the current storage area of ​​the stored virtual machine running data, wherein the storage area includes a hot data layer and a cold data layer, and the running data is preferentially stored in the hot data layer during initial storage;

[0111] The heat type determination module 220 is used to identify the heat type of the running data based on the data attributes of the running data, wherein the heat type includes hot data and cold data;

[0112] Matching module 230 is used to match the data popularity type with the current storage area to obtain a matching result;

[0113] The management module 240 is used to store and manage the running data according to the matching results.

[0114] Optionally, the data attributes include at least one of the following: the business to which the data belongs, the data access frequency, the data access time, and the data source; the popularity type determination module 220 is used to identify the data popularity type through at least one of the following judgment methods:

[0115] If the business to which the operational data belongs is the target business, then the data popularity type of the operational data is determined to be hot data;

[0116] If the data access frequency of the running data is greater than the set frequency, then the data popularity type of the running data is determined to be hot data;

[0117] If the data access time of the running data is a set time period, then the data popularity type of the running data is determined to be hot data;

[0118] If the data source of the running data is a set source, then the data popularity type of the running data is determined to be hot data.

[0119] Optionally, if the data attribute includes data access frequency, the data access frequency is obtained in the following way:

[0120] The virtual machine runs a designated process that monitors the data access frequency of the running data.

[0121] Optionally, if the data attributes include at least two of the following: the service to which the data belongs, the data access frequency, the data access time, and the data source, then in the hot data layer, the hot data is allocated a corresponding storage ratio according to each attribute.

[0122] If the data popularity type of the running data is determined to be hot data based on the target data attributes and the matching result is that the data popularity type does not match the current storage area, then the management module 240 is used to migrate the running data to the hot data layer according to the storage ratio of hot data in the hot data layer determined by the target data attributes.

[0123] Optionally, the storage area determination module 210 is used to obtain the storage location of the running data on the cloud disk; and determine the current storage area of ​​the running data in the storage system based on the storage location of the cloud disk.

[0124] Optionally, the storage area determination module 210 is used to obtain the mapping relationship between data and cloud disk storage location through the file system; and to determine the storage location of the running data on the cloud disk according to the mapping relationship through the file system.

[0125] Optionally, the storage area determination module 210 is configured to create a new access service in the host machine corresponding to the virtual machine, the new access service being used to detect the storage location of data on the cloud disk; receive read requests for the running data through the file system; convert the read requests into IO requests for the cloud disk through the file system, and send the IO requests to the new access service; obtain the storage location of the cloud disk corresponding to the IO request through the new access service, and determine the storage location as the storage location of the cloud disk where the running data is located.

[0126] Optionally, the management module 240 is configured to migrate the running data to another data layer if the matching result indicates that the data popularity type does not match the current storage area.

[0127] It should be noted that those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0128] Please refer to Figure 5 , Figure 5This is a schematic diagram of an electronic device for executing a storage management method, provided in an embodiment of this application. The electronic device may include: at least one processor 310, such as a CPU; at least one communication interface 320; at least one memory 330; and at least one communication bus 340. The communication bus 340 is used to establish direct communication between these components. In this embodiment, the communication interface 320 is used for signaling or data communication with other node devices. The memory 330 may be high-speed RAM or non-volatile memory, such as at least one disk storage device. Optionally, the memory 330 may also be at least one storage device located remotely from the aforementioned processor. The memory 330 stores computer-readable instructions. When these computer-readable instructions are executed by the processor 310, the electronic device performs the aforementioned... Figure 1 The method and process are shown.

[0129] Understandable. Figure 5 The structure shown is for illustrative purposes only; the electronic device may also include components that are more advanced than those shown. Figure 5 The more or fewer components shown, or having the same Figure 5 The different configurations shown. Figure 5 The components shown can be implemented using hardware, software, or a combination thereof.

[0130] This application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, performs the following... Figure 1 The method process executed by the electronic device in the illustrated method embodiment.

[0131] This embodiment discloses a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, and when the program instructions are executed by a computer, the computer can perform the methods provided in the above-described method embodiments, such as including:

[0132] The current storage area for the stored virtual machine runtime data is obtained, wherein the storage area includes a hot data layer and a cold data layer, and the runtime data is preferentially stored in the hot data layer during initial storage;

[0133] The data popularity type of the operational data is identified based on its data attributes, and the data popularity type includes hot data and cold data;

[0134] Match the data popularity type with the current storage area to obtain a matching result;

[0135] The running data is stored and managed based on the matching results.

[0136] In summary, the embodiments of this application provide a storage management method, apparatus, electronic device, and storage medium. The method identifies the data popularity type of the running data based on the data attributes of the virtual machine's running data and matches the data popularity type with the current storage area of ​​the running data to determine whether hot data is stored in the hot data layer and whether cold data is stored in the cold data layer. Thus, storage management of the running data can be performed based on the matching results, such as migrating mismatched data. This allows data of different popularity types to be stored in the corresponding storage areas, ensuring that hot data is mostly in the hot data layer and does not remain in the cold data layer for extended periods, thereby effectively improving the overall performance of the storage system.

[0137] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.

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

[0139] Furthermore, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0140] In this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between these entities or operations.

[0141] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A storage management method, characterized in that, The method includes: The current storage area for the stored virtual machine runtime data is obtained, wherein the storage area includes a hot data layer and a cold data layer, and the runtime data is preferentially stored in the hot data layer during initial storage; The data popularity type of the operational data is identified based on its data attributes, and the data popularity type includes hot data and cold data; Match the data popularity type with the current storage area to obtain a matching result; The running data is stored and managed according to the matching results; The step of obtaining the current storage area of ​​the stored virtual machine's runtime data includes: obtaining the storage location of the runtime data on the cloud disk and sending the storage location of the runtime data on the cloud disk to the storage system; the storage system determines the current storage area of ​​the runtime data in the storage system based on the storage location of the cloud disk and identifies the small data block where the runtime data is located as a hot data block; The step of storing and managing the running data according to the matching result includes: determining the current storage area where the running data is located based on the hot data block; if the matching result indicates that the data heat type does not match the current storage area, then the running data is migrated to another data layer. Specifically, a set process running in the virtual machine periodically obtains the storage location of the running data on the cloud disk and sends the obtained storage location to the storage system, so that the storage system updates the hot data block according to the storage location of the running data on the cloud disk.

2. The method according to claim 1, characterized in that, The data attributes include at least one of the following: the business to which the data belongs, the frequency of data access, the time of data access, and the source of the data. Identifying the data popularity type of the operational data based on its data attributes includes at least one of the following determination methods: If the business to which the operational data belongs is the target business, then the data popularity type of the operational data is determined to be hot data; If the data access frequency of the running data is greater than the set frequency, then the data popularity type of the running data is determined to be hot data; If the data access time of the running data is a set time period, then the data popularity type of the running data is determined to be hot data; If the data source of the running data is a set source, then the data popularity type of the running data is determined to be hot data.

3. The method according to claim 2, characterized in that, If the data attribute includes data access frequency, the data access frequency is obtained in the following way: The virtual machine runs a designated process that monitors the data access frequency of the running data.

4. The method according to claim 2, characterized in that, If the data attributes include at least two of the following: the business to which the data belongs, the data access frequency, the data access time, and the data source, then in the hot data layer, the hot data is allocated a corresponding storage ratio according to each attribute. If the data popularity type of the running data is determined to be hot data based on the target data attributes and the matching result indicates that the data popularity type does not match the current storage area, then the step of managing the storage of the running data based on the matching result includes: Based on the storage ratio of hot data in the hot data layer determined by the target data attributes, the running data is migrated to the hot data layer.

5. The method according to claim 1, characterized in that, The step of obtaining the storage location of the runtime data on the cloud disk includes: Obtain the mapping relationship between data and cloud disk storage location through the file system; The file system determines the storage location of the runtime data on the cloud disk according to the mapping relationship.

6. The method according to claim 1, characterized in that, The step of obtaining the storage location of the runtime data on the cloud disk includes: A new access service is created on the host machine corresponding to the virtual machine. The new access service is used to detect the storage location of data on the cloud disk. The file system receives read requests for the running data; The file system converts the read request into an I / O request for the cloud disk and sends the I / O request to the new access service. The storage location of the cloud disk corresponding to the IO request is obtained through the new access service, and this storage location is determined as the storage location of the cloud disk where the running data is located.

7. A storage management device, characterized in that, The device includes: The storage area determination module is used to obtain the current storage area of ​​the stored virtual machine running data, wherein the storage area includes a hot data layer and a cold data layer, and the running data is preferentially stored in the hot data layer during initial storage; A heat type determination module is used to identify the heat type of the running data based on the data attributes of the running data, wherein the heat type includes hot data and cold data; The matching module is used to match the data popularity type with the current storage area to obtain a matching result; The management module is used to store and manage the running data based on the matching results; The storage area determination module is used to obtain the storage location of the running data on the cloud disk and send the storage location of the running data on the cloud disk to the storage system; the storage system determines the current storage area of ​​the running data in the storage system according to the storage location of the cloud disk and identifies the small data block where the running data is located as a hot data block. The management module is used to determine the current storage area where the running data is located based on the hot data block. If the matching result is that the data heat type does not match the current storage area, the running data is migrated to another data layer. Specifically, a set process running in the virtual machine periodically obtains the storage location of the running data on the cloud disk and sends the obtained storage location to the storage system, so that the storage system updates the hot data block according to the storage location of the running data on the cloud disk.

8. An electronic device, characterized in that, It includes a processor and a memory, the memory storing computer-readable instructions that, when executed by the processor, perform the method as described in any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it performs the method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Data migration method and device, electronic equipment and medium

    CN111880744A