Storage space management method and device, storage medium, electronic equipment and program product
By generating address space pools and establishing linked lists in a distributed storage system, quickly finding and allocating physical storage resources, the metadata access delay problem is solved, the rapid creation of logical volumes and efficient data storage is realized, and the system performance and reliability are improved.
Patent Information
- Application Number
- CN202510667767.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-22
- Publication Date
- 2025-08-15
AI Technical Summary
The existing distributed storage systems have problems with metadata access delays during data striping, resulting in low resource utilization, complex operation and long time-consuming, and uneven distribution of logical volumes affects the performance and reliability of the storage system.
By obtaining the physical addresses of physical storage devices of different nodes in the distributed storage system, generating an address space pool and establishing a linked list, determining the logical address based on the linked list and recording the mapping relationship between the logical volume and the physical address, managing the storage space associated with the logical volume, and using the linked list structure to quickly find and allocate physical storage resources.
It realizes the rapid creation of logical volumes, avoids complex resource search and allocation processes, improves data storage and access efficiency, and ensures data redundancy and high system availability.
Smart Images

Figure CN120492366A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of distributed storage technology, and specifically, to a storage space management method and device, a storage medium, an electronic device, and a program product. Background Art
[0002] With the rapid growth of data, distributed storage technology has become a core solution for managing massive amounts of data by consolidating multiple physical storage devices into a unified namespace. This type of technology, often referred to as a unified storage namespace, abstracts distributed storage resources such as servers, disks, and nodes into a single logical storage pool. Users access data through a unified path or interface, regardless of the underlying physical location.
[0003] To ensure scalability and transparency of storage systems, related technologies stripe user data and redistribute it across multiple physical storage devices within the distributed storage system. During the data striping process, mainstream technologies use metadata to manage the mapping between user data space and the address space of physical storage devices. This results in user data access requiring metadata access to locate physical addresses through user data addresses, increasing access latency. Furthermore, traditional storage systems employ a static management model with a fixed physical address space. Specifically, during system initialization, a certain amount of physical address space is pre-allocated as storage for logical volumes. This model has the following disadvantages: First, the physical address space is fixed and cannot be dynamically adjusted based on business needs, resulting in low resource utilization. Second, as the storage system scales or business needs change, physical address space re-planning is necessary, which is complex and time-consuming. Third, the fixed nature of the physical address space leads to uneven distribution of logical volumes, making it easy for some physical address spaces to be over-occupied while others are idle, impacting the performance and reliability of the storage system.
[0004] In related technologies, there is no effective solution to the problem of metadata access delay caused by data striping. Summary of the Invention
[0005] Embodiments of the present application provide a storage space management method and apparatus, a storage medium, an electronic device, and a program product to at least solve the problem of metadata access delay caused by data striping in related technologies.
[0006] According to one embodiment of the present application, a storage space management system is provided, comprising: obtaining multiple physical addresses of multiple physical storage devices on servers corresponding to different nodes in a distributed storage system; concatenating the multiple physical addresses to generate an address space pool corresponding to the different servers, and determining a linked list corresponding to the address space pool; when it is determined that a target object initiates a logical volume creation request, determining a target number of logical addresses from the address space pool according to the linked list, and recording a mapping relationship among the logical volume, the logical address, and the target physical address associated with the logical address; and managing the storage space associated with the logical volume based on the mapping relationship, wherein the storage space includes at least two physical storage devices.
[0007] According to another embodiment of the present application, a storage space management system is provided, including: an acquisition module for acquiring multiple physical addresses of multiple physical storage devices on servers corresponding to different nodes in a distributed storage system; a first determination module for concatenating the multiple physical addresses to generate an address space pool corresponding to the different servers, and determining a linked list corresponding to the address space pool; a second determination module for determining a target number of logical addresses from the address space pool according to the linked list when determining that a target object initiates a logical volume creation request, and recording a mapping relationship among the logical volume, the logical address, and the target physical address associated with the logical address; a management module for managing the storage space associated with the logical volume based on the mapping relationship, wherein the storage space includes at least two physical storage devices.
[0008] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is configured to execute the steps of any one of the above method embodiments when run.
[0009] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0010] According to another embodiment of the present application, a computer program product is provided, including a computer program, which implements the steps of any of the above method embodiments when executed by a processor.
[0011] Through this application, by obtaining multiple physical addresses of multiple physical storage devices on servers corresponding to different nodes in a distributed storage system; concatenating the multiple physical addresses to generate an address space pool corresponding to the different servers, and determining a linked list corresponding to the address space pool; in the case of determining that a target object initiates a logical volume creation request, determining a target number of logical addresses from the address space pool according to the linked list, and recording a mapping relationship between the logical volume, the logical address, and the target physical address associated with the logical address; managing the storage space associated with the logical volume based on the mapping relationship, wherein the storage space includes at least two physical storage devices, solving the problem of metadata access delay caused by data striping when the existing distributed storage system is performing data storage, quickly finding and allocating physical storage resources through a linked list structure, realizing rapid creation of logical volumes, and avoiding the complex resource search and allocation process in traditional methods. At the same time, after the logical volume is established, the association between the user's logical address and the physical storage device is located, avoiding striping and data fragmentation in the distributed system, thereby improving the user's data storage and access efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0013] Figure 1 This is a hardware structure block diagram of a server device for a storage space management method according to an embodiment of the present application;
[0014] Figure 2 is a flowchart of a storage space management method according to an embodiment of the present application;
[0015] Figure 3 1 is a schematic diagram of the architecture of a cross-node physical storage device linked list according to an embodiment of the present application;
[0016] Figure 4 Schematic diagram of multi-level mapping of an address segment management tree according to an embodiment of the present application;
[0017] Figure 5 This is a schematic diagram of allocating logical address spaces in a unified address space according to volume sizes according to an embodiment of the present application;
[0018] Figure 6 is a schematic diagram of a space management architecture of a distributed storage system according to an embodiment of the present application;
[0019] Figure 7is a structural block diagram of a storage space management device according to an embodiment of the present application;
[0020] Figure 8 It is a block diagram of the computer system structure of the electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0021] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0022] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.
[0023] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0024] As an optional implementation method, the method embodiment provided in the embodiment of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 This is a hardware structure diagram of a server device for a storage space management method according to an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown) a processor 102 (the processor 102 may include but is not limited to a microprocessor MCU or a programmable logic device FPGA and other processing devices) and a memory 104 for storing data, wherein the above-mentioned server device may also include a transmission device 106 for communication functions and an input and output device 108. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.
[0025] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the storage space management method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implementing the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely located relative to the processor 102, and these remote memories can be connected to the server device via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0026] The transmission device 106 is used to receive or send data via a network. A specific example of the aforementioned network may include a wireless network provided by a communication provider of the server device. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0027] In this embodiment, a storage space management method is provided. Figure 2 is a flow chart of a storage space management method according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:
[0028] Step S202, obtaining multiple physical addresses of multiple physical storage devices on servers corresponding to different nodes in the distributed storage system;
[0029] Step S204, concatenating the multiple physical addresses to generate address space pools corresponding to the different servers, and determining a linked list corresponding to the address space pools;
[0030] Simply put, in a distributed storage system, data is not centrally stored on a single server, but rather distributed across physical storage devices on multiple nodes. Therefore, knowing the precise physical addresses of the physical storage devices on each node is crucial. Physical addresses help the system accurately determine which specific storage medium the data resides on and where the data blocks are located on that storage medium. This is essential for locating, reading, writing, and maintaining data. Therefore, the management system for a distributed storage system detects all participating nodes to confirm which servers are operating and communicating properly. Each node has a unique identifier used to locate it within the distributed storage system. For each identified server node, all physical storage devices on that node are scanned. These may include internal hard drives, external hard drives, storage arrays, or other types of storage media. Detailed information about each storage device is identified, including device ID, type (such as HDD or SSD), total capacity, used capacity, and remaining available capacity. Next, the available physical addresses of each physical storage device are obtained. Unlike logical addresses, physical addresses directly point to specific locations on a storage device and are typically identified by sector, block, or byte offset. For each block of physical storage space, its starting and ending physical addresses, along with associated metadata (such as device type and current status), are recorded. Ultimately, the physical address information for all physical storage devices on all nodes is aggregated to form a global physical address list or database. This list, encompassing all physical storage resource information for the distributed storage system, forms the basis for subsequent steps such as address space pool construction, logical volume creation, and data distribution decisions.
[0031] Step S206: When it is determined that the target object initiates a logical volume creation request, a target number of logical addresses are determined from the address space pool according to the linked list, and a mapping relationship between the logical volume, the logical address, and the target physical address associated with the logical address is recorded;
[0032] Step S208: managing the storage space associated with the logical volume based on the mapping relationship, wherein the storage space includes at least two physical storage devices.
[0033] As you can understand, based on the required storage capacity of the logical volume, the currently available physical addresses in the address space pool are queried and converted into a certain number of logical addresses. The selection of logical addresses takes into account multiple factors, such as the load of the physical device, redundancy strategy, and performance requirements, to achieve optimal resource allocation. Once the logical addresses are allocated, the mapping relationship between the logical volume, the logical addresses, and the physical addresses corresponding to these logical addresses is recorded. This is usually done in a metadata management system, which tracks the actual physical storage device and specific location pointed to by each logical address to ensure that data read and write operations can be carried out accurately.
[0034] Optionally, when creating a logical volume, logical addresses may be allocated on multiple physical storage devices at the same time according to storage strategies (such as RAID, erasure codes, etc.) to achieve data redundancy and distribution, and improve data reliability and read and write performance. When data is written to a logical volume, the data will actually be written to the corresponding physical storage device according to the recorded mapping relationship. If a multi-copy strategy is adopted, it will also ensure that multiple copies of the data are distributed on different devices. When reading data in a logical volume, the physical storage device and specific location where the data is located can be quickly located through the mapping relationship, thereby speeding up data retrieval and improving the responsiveness of the storage system. When the physical storage device is expanded or reduced in capacity or when a device fails, data can be migrated or reconstructed according to the mapping relationship to ensure that the consistency of data distribution and the continuity of the logical volume are not affected, while maintaining data redundancy and preventing data loss.
[0035] The above method obtains multiple physical addresses of multiple physical storage devices on servers corresponding to different nodes in a distributed storage system; concatenates the multiple physical addresses to generate an address space pool corresponding to the different servers, and determines a linked list corresponding to the address space pool; when it is determined that a target object initiates a logical volume creation request, determines a target number of logical addresses from the address space pool according to the linked list, and records a mapping relationship between the logical volume, the logical address, and the target physical address associated with the logical address; and manages the storage space associated with the logical volume based on the mapping relationship, wherein the storage space includes at least two physical storage devices. This solves the problem of metadata access delay caused by data striping in existing distributed storage systems when storing data, and quickly searches and allocates physical storage resources through a linked list structure to achieve rapid creation of logical volumes, avoiding the complex resource search and allocation process in traditional methods. At the same time, after the logical volume is established, the association between the user's logical address and the physical storage device is located, avoiding the striping and data fragmentation in the distributed system, thereby improving the user's data storage and access efficiency.
[0036] In an exemplary embodiment, determining a linked list corresponding to an address space pool includes: configuring a redundant relationship between different physical addresses in the address space pool; creating a linked list corresponding to the address space pool based on the redundant relationship and a preset address segment management tree, wherein the linked list includes at least: a physical device address management table of the address space pool, and a redundant sub-linked list for copy protection.
[0037] In a distributed storage system, data redundancy is the core strategy to ensure data reliability and high system availability. Configuring redundant relationships means setting rules to ensure that data can have multiple copies on multiple physical storage devices. Even if a device fails, the data can still be recovered from copies on other devices. Optionally, in order to more efficiently manage the address space of physical storage devices, this application uses a data structure called a "preset address segment management tree." This tree structure divides the address space into multiple segments, each of which can be further assigned to a specific physical device. Based on such a tree structure and the configured redundant relationship, a linked list can be created to manage the address space pool.
[0038] Optionally, the physical device address management table is a key data structure used to record in detail the address information and status of all physical devices in the address space pool. The address range, available capacity, health status, etc. of each physical device are registered in this table so that the system can quickly locate and allocate them. The redundant sub-linked table is used to manage copies of data. It is associated with the main linked table node. Each major data storage location (main linked table node) will have one or more redundant sub-linked table nodes pointing to other physical devices containing the same data. In this way, even if the main storage device fails, the redundant sub-linked table can be quickly used to locate and call the data backup, ensuring business continuity and data integrity.
[0039] In summary, through the above implementation, the combined use of the address segment management tree and the linked list can optimize the data distribution and access process, reduce the delay in data access, and improve storage performance.
[0040] In an exemplary embodiment, a linked list corresponding to an address space pool is created based on a redundant relationship and a preset address segment management tree, including: establishing a multi-level mapping of an object logical address to a physical storage device according to the preset address segment management tree; and creating a linked list corresponding to the address space pool according to the multi-level mapping and the redundant relationship.
[0041] It can be understood that an efficient and fault-tolerant address space pool is constructed based on the redundant relationships between the physical storage devices within the storage system and a preset address segment management tree. The preset address segment management tree is a tree-like data structure used to manage the physical address space in a distributed storage system. In this tree, each node represents a portion of the physical address space of the storage system. The root node of the tree typically represents the address space of the entire storage system, while subsequent hierarchical nodes further subdivide this space, until the final leaf node represents a contiguous address range on a specific physical device.
[0042] Optionally, multi-level mapping means mapping the logical addresses of objects in a distributed system to different levels of the physical address space. This process usually involves the following: Determine the segment to which the logical address belongs: Based on the preset address segment size (such as 1TB), calculate which large address segment the logical address belongs to. Subdivide into smaller sub-segments: Each large segment is further subdivided into several sub-segments, and each sub-segment corresponds to a child node in the tree, representing a more specific physical address space. Locate a specific physical device: Through the relative position of the logical address in the sub-segment and the mask mechanism, the specific physical device and the address range on it can be located.
[0043] Optionally, creating a linked list corresponding to the address space pool involves the following operations:
[0044] Build a physical device linked list: This linked list includes not only the address space of the primary storage device, but also the address information of all redundant storage devices. This means that each data item has at least one redundant copy, and these copies are linked to each other in a linked list.
[0045] Maintaining redundancy status: In addition to storing device information, the linked list should also contain data about the redundancy status, such as which devices have copies of the data, the number of copies, and how to quickly switch to the redundant copy when the primary copy fails.
[0046] Dynamically adjust the linked list: When the topology of the storage system changes, such as adding new storage nodes or devices, or removing old devices, the linked list needs to be updated accordingly to reflect the latest redundancy relationship and address mapping.
[0047] In summary, through the above steps, a system has been created that supports multi-level mapping of object logical addresses to physical storage devices, while ensuring data redundancy and high availability. This approach not only improves the speed and efficiency of data access but also provides data recovery capabilities in the event of hardware failures, thereby enhancing the robustness and reliability of the entire storage system. Furthermore, this approach allows the system to dynamically adjust its storage layout to adapt to changing loads and storage requirements, supporting elastic expansion and optimization of the system.
[0048] In an exemplary embodiment, a multi-level mapping of an object logical address to a physical storage device is established based on a preset address segment management tree, including: finding address segment control management information from a distributed storage system through the object address corresponding to the target object; and determining the address space index layer in the multi-level mapping based on the address segment control management information.
[0049] It is understandable that when a specific object needs to be accessed, its location in the pre-set address segment management tree must first be determined. This process is accomplished through the following steps:
[0050] The first step is to obtain the logical address of the object: the logical address is the unique identifier of the object at the user level, which is used to locate data without worrying about its physical storage location.
[0051] Step 2: Calculate the target address segment number: Divide the object's logical address by the fixed address segment size (e.g., 1TB) to determine which address segment the target object falls into. For example, if an object's logical address is 2560GB, it belongs to the third address segment (assuming the count starts at 0).
[0052] Step 3: Find the address segment control management information: Once the target address segment is determined, the detailed information of the segment can be found in the address segment control management information table of the distributed storage system, including the physical storage device corresponding to the segment and its specific address range on the device.
[0053] The fourth step is to determine the address space index layer under the multi-level mapping system based on the found address segment control management information. This involves how to further refine the logical address of the object to the level of the storage device, specifically including: Address offset calculation: subtract the starting address of the address segment from the logical address of the object to obtain the offset within the address segment. Mask bit matching: Use a certain mask mechanism (such as a 64-bit or 128-bit mask) to determine which layer and which part of the physical device the object data should be stored on. The mask bit can help the system determine the precise physical location of the data and reduce the addressing time. Locating the physical device: Combining the results of the offset and the mask bit, the specific data storage location can be directly located in the physical device index layer of the address space. For example, if the mask matching result points to device 12 of storage node 2, then it can be known that the object data is stored in a specific address range on this device.
[0054] In summary, this embodiment is a key step in data location and access in distributed storage. It implements multi-level mapping of logical addresses to physical addresses through a preset address segment management tree, effectively solving the addressing efficiency problem caused by distributed data storage, while ensuring high availability and redundancy of data.
[0055] In an exemplary embodiment, a multi-level mapping of an object logical address to a physical storage device is established based on a preset address segment management tree, including: obtaining management information corresponding to different branches in the preset address segment management tree, and calculating a mask sequence corresponding to each branch, wherein each branch manages a continuous address space of a physical storage device; and determining the physical device index layer in the multi-level mapping based on the management information and the mask sequence.
[0056] Simply put, management information is collected from different branches of the pre-set address segment management tree. This management information includes the address range covered by each branch node, the physical device identifier, the starting position and length of the address segment on that device, and other information. This information is crucial for locating data.
[0057] Optionally, a mask sequence is calculated for each branch node. The mask sequence is essentially a series of binary bits that determine which portion of a particular logical address determines the specific location of the data on the physical device. For example, if a 64-bit mask is used, each bit in the mask can be used to indicate whether a particular bit in the logical address affects the selection of the physical address. By applying the mask sequence, the object's logical address can be quickly converted to location information within the physical address space.
[0058] Optionally, after obtaining the management information and calculating the mask sequence, use this information to determine the physical device index layer in the multi-level mapping. First, calculate the target address segment to which it belongs based on the object logical address and the preset address segment size. For example, if the address segment size is set to 1TB, then the logical address 2560GB will belong to the third address segment. Then, based on the offset within the target address segment (that is, the logical address minus the starting position of the target address segment), apply the calculated mask sequence to determine the specific location of the physical device. The mask sequence helps us further subdivide the address within the target address segment and select the correct physical device based on this. Finally, determine the physical device index layer where the object data is located. This layer is directly associated with the specific physical storage device and the address segment on it. For example, by matching the mask sequence, it is known that the data is stored in the range of YGB to ZGB of device X on storage node N.
[0059] In summary, the above embodiment achieves precise location of an object's logical address on a physical storage device through a pre-set address segment management tree and mask sequence calculation. Furthermore, the use of mask sequences makes the conversion of logical addresses to physical addresses fast and efficient, eliminating the need to traverse the entire physical device list. Furthermore, the combination of the tree structure and mask sequences facilitates redundant data replication across physical devices, thereby enhancing system redundancy and high availability.
[0060] In an exemplary embodiment, a multi-level mapping of an object's logical address to a physical storage device is established based on a preset address segment management tree, including: determining address information corresponding to different branches in the preset address segment management tree, wherein the address information includes at least: node information corresponding to the current branch in the distributed storage system, device information of the physical storage device corresponding to the current branch, and size information of the address corresponding to the current branch; and determining the physical device address information layer in the multi-level mapping based on the address information.
[0061] Optional, node information: identity information of the storage node where the current branch is located, including the node's ID, distribution location, and its connection status in the distributed storage system. This information helps to understand the distribution of data in the network. Device information: information about the physical storage device associated with the current branch, including device ID, type (such as hard disk or SSD), capacity, and current status (such as availability, health). This information is the basis for determining the data storage location. Address size information: the size of the address range covered by the current branch, which is usually associated with the continuous address space of the storage device. Address size information is crucial for calculating the mapping relationship between logical addresses and physical addresses.
[0062] Optionally, the logical address of the object is decomposed into several components, including the address segment to which it belongs (determined by the hierarchical structure of the preset address segment management tree) and the offset position within the segment. Then, based on the results of the logical address analysis, the corresponding branch in the preset address segment management tree is searched, and the node information, device information, and address size information are compared to ensure the consistency of the logical address with the physical address. Finally, based on the found branch information, the starting and ending positions of the specific address segment on the physical storage device are calculated. This step may also require consideration of mask operations or other conversion rules to accurately calculate the physical address to which the logical address is mapped.
[0063] In summary, establishing an efficient data access path in a distributed storage system ensures that data can be quickly and accurately located regardless of how many physical nodes it is distributed across, thereby improving the efficiency and reliability of overall data access and management. This multi-level mapping mechanism is the foundation for distributed storage systems to implement features such as data striping, parallel read and write, redundancy protection, and load balancing.
[0064] In an exemplary embodiment, before managing the storage space associated with the logical volume based on the mapping relationship, the above method also includes: determining the segment size corresponding to the logical volume; using the address segment corresponding to the mapping relationship to divide the segment size to determine the target segment number corresponding to the logical volume; and obtaining the address segment management information block corresponding to the target segment number.
[0065] In a distributed storage system, storage space is typically divided into multiple fixed-size segments, such as address segments of 1TB, 100GB, and so on. The size of these address segments has a direct impact on data distribution, access performance, and redundancy strategies. Therefore, for each logical volume, it is first necessary to determine the address segment size it uses. This step may vary based on the expected size of the logical volume, the access mode, or the overall configuration strategy of the storage system. Once the address segment size of the logical volume is determined, it is next necessary to calculate the target segment number of the logical volume in the distributed storage system. The target segment number is the location identifier of the logical volume in the address segment management tree, which is used for subsequent storage space allocation and data positioning.
[0066] For example, divide the logical volume's starting address by the preset address segment size. This calculation will determine the large address segment within which the logical volume is located. If the logical volume's starting address is 1536GB and the address segment size is 512GB, then the target segment number is 3 (1536GB divided by 512GB equals 3).
[0067] After determining the target segment number, the next step is to access the address segment management information block. The address segment management information block contains all the important information related to a specific address segment, including: The start and end locations of the address segment: This information helps the system determine the actual range of the address segment. The physical device ID and address: This information indicates which physical storage devices are assigned to this address segment and the specific address ranges on these devices. Redundancy and distribution strategy: How data is replicated on different physical devices to achieve redundancy and how data is distributed across these devices.
[0068] In summary, by obtaining the address segment management information block corresponding to the target segment number, storage space can be accurately allocated to the logical volume. At the same time, the storage policy determines how data is distributed across physical devices, ensuring data reliability and access performance. This enables efficient and accurate mapping between logical volumes and physical storage devices.
[0069] In an exemplary embodiment, after managing the storage space associated with the logical volume based on the mapping relationship, the method further includes: determining the size of the storage space used by the address space pool based on the transfer record of the logical volume; and when it is determined that the logical volume needs storage expansion, determining the operation type of the storage expansion based on the remaining storage space size of the address space.
[0070] In a distributed storage system, a logical volume is an abstraction that provides storage services to users. Users can operate a logical volume just like a local hard drive, but the actual data is distributed across multiple physical storage devices throughout the system. Mapping relationships, which correspond between logical addresses in a logical volume and physical addresses on physical storage devices, ensure accurate storage and fast access to data in a distributed environment. Managing this mapping relationship is key to the efficient operation of a distributed storage system. Transfer records are detailed records of data transfer volume during the creation, reading, writing, and expansion of a logical volume, including but not limited to data written and deleted. By analyzing these transfer records, the current storage space occupied by the logical volume can be calculated. This information is crucial for assessing the storage requirements of logical volumes and the overall storage utilization of the system.
[0071] When a logical volume needs to be expanded, the system checks the remaining storage space in the address space pool and determines the type of storage expansion operation to be performed based on the remaining space and the logical volume expansion requirements:
[0072] Extension type A (incremental extension): If the remaining space is sufficient, the capacity of the logical volume may be expanded by adding more physical address space to the existing logical volume or by adding new physical storage devices without affecting the existing data distribution.
[0073] Expansion type B (reconstruction expansion): If the remaining space is insufficient for direct expansion, you may need to perform a data reconstruction operation to redistribute the data in the logical volume, free up space, or consolidate scattered storage resources to meet the expansion requirements of the logical volume.
[0074] Through the above process, it is possible to respond to the storage expansion needs of logical volumes with minimal overhead and in the most optimized manner, while maintaining a balanced data distribution, avoiding excessive concentration or waste of storage resources, and ensuring system stability and efficiency.
[0075] In an exemplary embodiment, after multiple physical addresses are connected in series to generate address space pools corresponding to different servers and a linked list corresponding to the address space pool is determined, the above method further includes: performing periodic detection on the address space pool; when the detection result of the periodic detection indicates that the blank address space in the address space pool is greater than or equal to a preset security space threshold, triggering a sorting operation on the linked list, wherein the sorting operation is used to reallocate the mapping relationship in the linked list corresponding to the address space pool; when the detection result of the periodic detection indicates that the blank address space in the address space pool is less than the preset security space threshold, prohibiting triggering the sorting operation on the linked list.
[0076] The address spaces of multiple physical storage devices (such as hard disks, SSDs, etc.) on multiple servers are connected in series to form one or more continuous address space pools. Each address space pool represents a logical collection of available storage space in the system, which facilitates the implementation of data distribution and redundancy strategies. For each address space pool, a linked list is established, which contains the mapping relationship of all physical addresses in the pool, as well as possible redundant backup information. Each element in the linked list is associated with a certain physical address segment and which storage device on which server the segment is located. The address space pool is periodically tested to evaluate the current storage utilization. This is achieved by calculating the blank address space (unallocated or unused storage area) in each pool. The purpose of periodic testing is to identify waste or inefficient use of storage resources and take measures to optimize the storage layout.
[0077] Optionally, if periodic detection finds that the empty address space in a certain address space pool exceeds a preset safety threshold, this indicates that the storage space allocation may be too loose and there is room for optimization. At this time, a sorting operation on the linked list is automatically triggered. Its main tasks are: Reassigning mapping relationships: Through the sorting operation, the mapping of physical addresses in the linked list is rearranged, and some empty address space may be reallocated to areas requiring more storage space, or redundancy strategies may be adjusted to ensure efficient resource utilization. Data migration: The sorting operation may involve migrating data from one location to another to adapt to the new mapping relationship.
[0078] Conversely, if the detection results show that the free address space is below the preset safety threshold, this means that the storage space is being efficiently utilized and there is little additional free space available for sudden data growth or redundancy requirements. In this case, the linked list will not be trimmed, as doing so would cause unnecessary data migration, increase system load, and degrade performance.
[0079] In summary, periodic detection and linked list reorganization constitute the core strategy for dynamically optimizing storage resource utilization in distributed storage systems. By monitoring changes in free address space, the storage layout can be proactively adjusted, avoiding resource waste while ensuring sufficient buffer space when storage demand suddenly increases. This strategy not only improves space utilization efficiency but also enhances the flexibility and responsiveness of storage management.
[0080] In an exemplary embodiment, when the detection result of the periodic detection indicates that the blank address space in the address space pool is greater than or equal to the preset security space threshold, after triggering the sorting operation of the linked list, the above method also includes: when the target object initiates a logical volume creation request again, determining the updated linked list corresponding to the address space pool after executing the data sorting, and determining to allocate an independent logical address from the address space pool for the re-initiated logical volume creation request; striping the object data generated by the target object to the corresponding physical storage device according to the independent logical addresses, and adding identification parameters corresponding to the address space pool to the object data.
[0081] As you can understand, periodic detection is a routine task in distributed storage systems, intended to monitor address space pool usage. When it is detected that the amount of free address space reaches or exceeds a preset safety threshold, a storage linked list cleanup operation is triggered. The cleanup operation aims to reassess space allocation and determine whether data rearrangement is necessary to achieve better storage efficiency and data access performance. This operation is particularly useful for addressing situations such as uneven data distribution and uneven storage device load. The target object represents the entity that needs to create a logical volume in the distributed storage system, such as an application or user. When the target object submits a new logical volume creation request, it must determine whether sufficient free address space is available to meet the request. Once the target object issues a logical volume creation request, the storage linked list is first updated based on the latest cleanup operation results. The updated linked list reflects the latest address space pool allocation and the location of free address space. Subsequently, a unique logical address is assigned to the new logical volume from the updated address space pool. Independent logical addresses mean that each logical volume has its own address range, making them logically independent even though they may share the same physical storage device. Once a logical volume is successfully created and assigned an independent logical address, the data generated by the target object is striped across multiple physical storage devices based on this logical address. Striping is a technology that divides data into shards and evenly distributes them across multiple storage resources. This significantly improves data write and read performance, while also achieving data redundancy and enhancing data security through multiple copies or erasure coding. To track and manage this data, an identification parameter is added. This parameter typically contains information about the address space pool, allowing the system to understand the ownership and distribution of the data.
[0082] In summary, the above implementation demonstrates how to efficiently and securely allocate and manage storage space based on an optimized linked list when a new logical volume creation request arrives. Through these mechanisms, distributed storage systems can better cope with dynamic changes in data size, maintaining high performance and data integrity.
[0083] In an exemplary embodiment, after connecting multiple physical addresses in series to generate address space pools corresponding to different servers, the above method also includes: when different nodes in the distributed storage system are increased or decreased, obtaining the device address range corresponding to the increased or decreased target node; and updating the address distribution in the currently used linked list corresponding to the address space pool according to the device address range.
[0084] It should be noted that during the lifecycle of a storage system, adding or removing nodes (i.e., physical servers or storage devices) is a common operation. This can include adding nodes to cope with data growth or temporarily or permanently removing nodes due to failures or maintenance needs. When the addition or removal of nodes is detected, the first thing to do is to obtain the address range information of the physical storage devices on these changed nodes. For newly added nodes, it is necessary to know the available address space of all storage devices on them; for reduced (or removed) nodes, it is necessary to clarify the address range of the storage devices on them to facilitate subsequent data redistribution and linked list updates.
[0085] Optionally, once the device address range information is obtained, the system will update the management linked list of the address space pool based on this information. The specific operations include:
[0086] For node additions: The device address range of the new node needs to be registered in the linked list, and part of the data is striped and migrated to these newly added devices based on the CRUSH algorithm or other data distribution strategies, thereby expanding the total capacity of the address space pool while maintaining uniform data distribution and high availability.
[0087] For node reduction: the device address range of the reduced node will be removed from the linked list, triggering data redistribution, that is, migrating the data originally stored on these devices to the devices of the remaining nodes to ensure that the data is not lost and can still be accessed.
[0088] In summary, the above implementation method allows for timely adjustment of data distribution, enabling better utilization of all storage resources and improving data writing and reading efficiency. Furthermore, it ensures that even in the event of a node failure, data redundancy and distribution strategies remain effective, maintaining high data availability and security. Furthermore, by automating linked list updates after node changes, the need for manual intervention is reduced, simplifying storage system operation and maintenance.
[0089] The execution entity of the above steps may be a server, a terminal, etc., but is not limited thereto.
[0090] In order to facilitate understanding of the implementation methods of the present application, relevant scenarios are now explained, but this does not limit the present application.
[0091] In the related technologies, in order to improve the scalability and transparency of the storage system, the existing technologies all stripe user data and then redistribute it to multiple physical storage devices in the entire distributed storage system. In the data striping processing process, the mainstream technologies all use metadata to manage the mapping relationship between the user data space and the address space of the physical storage device. As a result, the access process of user data requires metadata access to find the physical address through the user data address, resulting in increased access latency.
[0092] In order to avoid the occurrence of the above-mentioned problems, as an optional implementation method, an optional embodiment of the present application proposes a space management method for a distributed storage system, by constructing a global unified address space pool through the dispersed physical storage devices of the distributed storage system, and mapping the logical address of the user address space of the user logical volume to the global unified address space of the storage system. Its core mechanisms include: (1) unified address space, based on the physical device list of the address space, the physical address spaces of multiple physical storage devices scattered on different servers are connected in series to form a unified larger address space; (2) device redundancy protection, ensuring high availability through the arrangement of physical device lists (such as replicas) with redundant protection across nodes; (3) when a user logical volume is created, a logical address is allocated in the unified address space and recorded; (4) user data is striped according to the logical address of the user space and distributed to the physical devices of the unified address space. The logical address of the user address space is directly mapped to the unified address space through the unified address space logical address allocated by the logical volume; (5) elastic expansion and topology management: the storage pool topology is dynamically maintained through the node-device extension list, the device address range is automatically registered and added to the load balancing when a new node is added, and data redistribution is triggered when a node is removed to ensure address space continuity; (6) user volume allocation space, through the user volume's separate address space physical device list, is allocated on the unified address space to build an independent address space for the user volume.
[0093] As an optional implementation, Figure 3 This is an architectural diagram of a cross-node physical storage device linked list according to an embodiment of the present application. Through the cross-node physical storage device linked list, the physical address spaces scattered on different servers are connected in series into a continuous logical address pool; multi-level mapping is achieved through the address segment management tree, wherein a fixed address segment segmentation strategy (such as 1TB / segment) is adopted, and the target address segment number is calculated by using the logical address to divide the segment size, and the physical device branch node is located in combination with the 64 / 128-bit mask matching mechanism. The minimum representable unit calculation formula is address segment size / mask bit number, realizing three-level precise positioning of user logical address to physical device (segment number → mask → physical index).
[0094] In other words, a multi-layered redundant topology management system is created, designing a three-tiered protection mechanism for data storage: ① A physical device list forms the base storage pool; ② A cross-node redundant list (e.g., mirroring node 0, device 0, with node 3, device 18) ensures device-level high availability; and ③ A list of independent address spaces for user volumes achieves application-level isolation. Dynamic maintenance of the node-device extension list enables real-time updates to the storage pool topology and ensures data consistency. New nodes automatically register their device address ranges, and node removal triggers stripe-based data redistribution.
[0095] Optional, such as Figure 3 As shown in the figure, the storage system consists of multiple physical storage nodes. Figure 3 There are 6 storage nodes, each storage node has 6 storage devices, and the storage devices refer to disks or SSD disks. It should be noted that the above storage system can be expanded to more nodes, and each node can contain more devices; then, a unified address space is built on the basis of the storage system, and a physical device list of the address space is created.
[0096] Optionally, the physical device linked list includes: a physical linked list of the address space and redundant linked list information; specifically, for example, Figure 3 The physical linked list of the corresponding address space includes: storage node to storage node 5. Each storage node has corresponding multiple storage devices, such as: storage node 0: storage device 0\storage device 1\storage device 2\storage device 3\storage device 4\storage device 5; storage node 1: storage device 6\storage device 7\storage device 8\storage device 9\storage device 10\storage device 11; storage node 2: storage device 12\storage device 13\storage device 14\storage device 15\storage device 16\storage device 17.
[0097] If storage node 3 has a redundant relationship with storage node 0, the corresponding redundant linked list information is: storage node 0: storage device 0 / storage node 3: storage device 18; storage node 0: storage device 1 / storage node 3: storage device 19; storage node 0: storage device 2 / storage node 3: storage device 20; storage node 0: storage device 3 / storage node 3: storage device 21; storage node 0: storage device 4 / storage node 3: storage device 22; storage node 0: storage device 5 / storage node 3: storage device 23.
[0098] Optionally, Figure 4 Schematic diagram of multi-level mapping of the address segment management tree according to an embodiment of the present application. Figure 4The physical device address management table of the address space constitutes the address space of the user volume. The user access process queries the physical device address information in the physical device address management table of the address space through the logical address of the user volume, and then directly maps the user address to the address of the physical device; the address space index layer finds the address segment control management information through the user address. The query method is to use the address to directly divide the address segment size, calculate the index of the destination address control management, and then directly read the information through the index.
[0099] Optional, target address segment number = user logical address / fixed address segment size, such as Figure 4 A fixed segment size of 1TB is shown.
[0100] Optionally, the address segment management information manages the mapping relationship between the logical space and the distributed system nodes / devices / address segments to the logical addresses through a tree of multi-branch nodes, with each branch managing the continuous address space of a physical device; the address segment management information includes the number of sub-leaves, the address mask, and the minimum representable unit size of the logical address space, where the minimum representable unit size = address segment size / number of bits (MASK).
[0101] The optional mask indicates the continuity of the physical device space under each sub-leaf node. It uses 64 or 128 bits, with each bit being 1 indicating that the physical device space under that node is mapped and implemented. This is achieved through a mask-driven fast address location algorithm, using the address to determine the target segment number by dividing the segment size (e.g., 1TB), and combining the 64 / 128-bit mask to achieve fast sub-leaf node matching. By calculating the physical index branch using "logical address offset & address segment mask," the address translation time complexity is reduced from O(n) to O(1), and actual measurements show that it can support efficient management of EB-level address spaces. Each address segment management information block records the logical start and end addresses, device node location, and continuous space markers, enabling fine-grained space allocation.
[0102] Optionally, the address segment management information block records the logical starting address and length of the information block, such as Figure 4 Record 4 address information blocks, 0-768GB starts at address 0 and has a length of 768GB, 768GB-128GB actually has an address of 768GB and a length of 128GB.
[0103] As an optional implementation method, the address segment number is found through the user address, and then the offset within the address segment of the user logical address and the MASK are matched and calculated to find the address segment management information block in the physical device index layer; the branch of the MASK is matched, which is the branch of the address segment management information block mapped to the logical address, and then the physical device address information is found. Specifically, the physical device address information manages the nodes / devices / physical address segments of the distributed system.
[0104] Optionally, Figure 5 This is a schematic diagram of allocating logical address space in a unified address space according to volume size according to an embodiment of the present application, which specifically includes the following steps:
[0105] Step 1: The logical address of the user volume is completely mapped to the logical unified address space of the volume;
[0106] Step 2: The metadata of the user volume includes common information such as volume name and volume size, as well as multiple logical address spaces. Each logical address space is managed by an independent physical device address to build a unified address space.
[0107] Step 3: The logical address of the user volume is directly mapped to the logical unified address space through the user LBA (logical block address);
[0108] Step 4: The user volume can be bound to multiple logical unified address spaces. The addresses of each logical address space are managed independently. The same user LBA address can have different data corresponding to multiple logical spaces.
[0109] Step 5: Physical device address management of the logical address space. You can configure physical devices or virtual empty devices. Virtual empty devices only have logical addresses filled in them, but cannot be accessed or written to. Before accessing or writing, you must allocate a physical device and map it to the logical address of the corresponding address segment.
[0110] Optionally, Figure 6 This is a schematic diagram of the space management architecture of a distributed storage system according to an embodiment of the present application, which mainly includes: creating a unified address space 1, selecting some physical address segments of some storage devices of storage node 1, storage node 2, and storage node 3 to form a unified address space; configuring the redundancy strategy of the storage devices in the storage space, for example, storage node 1, storage node 2, and storage node 3 in the above figure form a 3-copy redundancy relationship; creating a user volume and specifying a unified address space 1 as the device space for the user volume; user read and write IO, which is sent to the distributed block service through the client host, and the distributed block service receives the user request and converts the user's access logical address into the node / storage device address of the distributed storage system through unified address space management; the distributed block service directly accesses the user's read and write IO to the node / storage device address. Then, multiple storage devices of multiple storage nodes are efficiently integrated into a distributed unified address space, and the address of the physical device is directly mapped to the logical address of the user block device, avoiding the problem of directly accessing the physical storage device address through the user address due to striping and data being scattered in the distributed system.
[0111] In summary, the embodiments of the present application provide a method for constructing a global unified address space to solve the problem of physical dispersion of distributed storage devices. By establishing a physical device linked list, cross-node storage devices are connected in series into a continuous address space pool, and redundant protection linked lists are used to achieve cross-node device redundant orchestration. Innovatively, an address segment management tree (multi-branch node structure) is used to achieve precise mapping of logical addresses to physical devices, in which the mask mechanism and minimum representable unit calculation significantly reduce the address conversion overhead, achieving three-level efficient positioning of user logical addresses to physical devices (using mask matching to find the physical index from the address segment number).
[0112] Furthermore, a striping-based dynamic space management mechanism is involved. The unified address space allocated by the logical volume implements dual mapping: from user logical addresses to global logical addresses, and then to physical device addresses. Fixed address segments (e.g., 1TB) are used for partitioning and striping distribution, combined with a blank address space trigger mechanism to enable dynamic data migration. When nodes are added or removed, the device address range is automatically adjusted through the topology management linked list, and data redistribution is achieved through load balancing, ensuring address space continuity while supporting elastic expansion.
[0113] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0114] This embodiment also provides a storage space management system for implementing the above-mentioned embodiments and preferred embodiments. Details already described will not be repeated. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.
[0115] Figure 7 is a structural block diagram of a storage space management device according to an embodiment of the present application, such as Figure 7 As shown, the device includes:
[0116] An acquisition module 72 is configured to acquire multiple physical addresses of multiple physical storage devices on servers corresponding to different nodes in the distributed storage system;
[0117] A first determining module 74 is configured to concatenate the multiple physical addresses to generate address space pools corresponding to the different servers, and determine a linked list corresponding to the address space pools;
[0118] a second determining module 76 for determining, when it is determined that the target object initiates a logical volume creation request, a target number of logical addresses from the address space pool according to the linked list, and recording a mapping relationship between the logical volume, the logical address, and the target physical address associated with the logical address;
[0119] The management module 78 is configured to manage the storage space associated with the logical volume based on the mapping relationship, wherein the storage space includes at least two physical storage devices.
[0120] The above-mentioned device obtains multiple physical addresses of multiple physical storage devices on servers corresponding to different nodes in a distributed storage system; concatenates the multiple physical addresses to generate an address space pool corresponding to the different servers, and determines a linked list corresponding to the address space pool; when it is determined that a target object initiates a logical volume creation request, determines a target number of logical addresses from the address space pool according to the linked list, and records a mapping relationship between the logical volume, the logical address, and the target physical address associated with the logical address; and manages the storage space associated with the logical volume based on the mapping relationship, wherein the storage space includes at least two physical storage devices. This solves the problem of metadata access delay caused by data striping in existing distributed storage systems during data storage. The linked list structure is used to quickly find and allocate physical storage resources, thereby achieving rapid creation of logical volumes and avoiding the complex resource search and allocation process in traditional methods. At the same time, after the logical volume is established, the association between the user logical address and the physical storage device is used to locate the data, thereby avoiding striping and data fragmentation in the distributed system, thereby improving the user's data storage and access efficiency.
[0121] In an exemplary embodiment, the above-mentioned first determination module is also used to configure the redundant relationship between different physical addresses in the address space pool; based on the redundant relationship and the preset address segment management tree, a linked list corresponding to the address space pool is created, wherein the linked list includes at least: the physical device address management table of the address space pool, and a redundant sub-linked list for copy protection.
[0122] In an exemplary embodiment, the first determination module is further configured to establish a multi-level mapping of object logical addresses to physical storage devices based on the preset address segment management tree; and create a linked list corresponding to the address space pool based on the multi-level mapping and the redundancy relationship.
[0123] In an exemplary embodiment, the first determination module is further configured to find address segment control management information from a distributed storage system using an object address corresponding to a target object; and determine an address space index layer in the multi-level mapping based on the address segment control management information.
[0124] In an exemplary embodiment, the above-mentioned first determination module is also used to obtain management information corresponding to different branches in the preset address segment management tree, and calculate the mask sequence corresponding to each branch, wherein each branch manages a continuous address space of a physical storage device; and determine the physical device index layer in the multi-level mapping based on the management information and the mask sequence.
[0125] In an exemplary embodiment, the above-mentioned first determination module is also used to determine the address information corresponding to different branches in the preset address segment management tree, wherein the address information at least includes: the node information corresponding to the current branch in the distributed storage system, the device information of the physical storage device corresponding to the current branch, and the size information of the address corresponding to the current branch; and determine the physical device address information layer in the multi-level mapping based on the address information.
[0126] In an exemplary embodiment, the above-mentioned device also includes: a third determination module, which is used to determine the segment size corresponding to the logical volume before managing the storage space associated with the logical volume based on the mapping relationship; use the address segment corresponding to the mapping relationship to divide the segment size to determine the target segment number corresponding to the logical volume; and obtain the address segment management information block corresponding to the target segment number.
[0127] In an exemplary embodiment, the above-mentioned device also includes: a detection module, which is used to perform periodic detection on the address space pool after concatenating the multiple physical addresses to generate the address space pool corresponding to the different servers and determining the linked list corresponding to the address space pool; when the detection result of the periodic detection indicates that the blank address space in the address space pool is greater than or equal to the preset security space threshold, triggering a sorting operation on the linked list, wherein the sorting operation is used to reallocate the mapping relationship in the linked list corresponding to the address space pool; when the detection result of the periodic detection indicates that the blank address space in the address space pool is less than the preset security space threshold, prohibiting triggering the sorting operation on the linked list.
[0128] In an exemplary embodiment, the above-mentioned detection module also includes an identification unit, which is used to trigger the sorting operation of the linked list when the detection result of the periodic detection indicates that the blank address space in the address space pool is greater than or equal to the preset security space threshold. When the target object initiates a logical volume creation request again, the unit is used to determine the updated linked list corresponding to the address space pool after the data sorting is performed, and to determine to allocate an independent logical address from the address space pool for the re-initiated logical volume creation request; stripe the object data generated by the target object to the corresponding physical storage device according to the independent logical address, and add the identification parameters corresponding to the address space pool to the object data.
[0129] In an exemplary embodiment, the above-mentioned device also includes: an update module, which is used to concatenate the multiple physical addresses to generate the address space pool corresponding to the different servers, and then, when different nodes in the distributed storage system are increased or decreased, obtain the device address range corresponding to the increased or decreased target node; and update the address distribution in the currently used linked list corresponding to the address space pool according to the device address range.
[0130] It should be noted that the above modules can be implemented through software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0131] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any of the above method embodiments when run.
[0132] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0133] An embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0134] Optionally, Figure 8 : is a block diagram of the computer system structure of the electronic device according to the embodiment of the present application. Figure 8As shown, the computer system 800 includes a central processing unit 801 (CPU), which can perform various appropriate actions and processes according to the program stored in the read-only memory 802 (ROM) or the program loaded from the storage part 808 into the random access memory 803 (RAM). Various programs and data required for system operation are also stored in the random access memory 803. The central processing unit 801, the read-only memory 802 and the random access memory 803 are connected to each other via a bus 804. An input / output interface 805 (i.e., an I / O interface) is also connected to the bus 804.
[0135] The following components are connected to the input / output interface 805: an input section 806 including a keyboard, a mouse, and the like; an output section 807 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 808 including a hard disk; and a communication section 809 including a network interface card such as a local area network card or a modem. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the input / output interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 810 as needed, so that a computer program read therefrom can be installed into the storage section 808 as needed.
[0136] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0137] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0138] An embodiment of the present application further provides another computer program product, comprising a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above method embodiments are implemented.
[0139] An embodiment of the present application further provides a computer program, which includes computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of any of the above method embodiments.
[0140] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail here.
[0141] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0142] Obviously, those skilled in the art should understand that the modules or steps of the present application described above can be implemented using a general-purpose computing device, they can be concentrated on a single computing device, or distributed across a network composed of multiple computing devices, they can be implemented using program code executable by the computing device, and thus, they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be performed in a different order than herein, or they can be fabricated into separate integrated circuit modules, or multiple modules or steps can be fabricated into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0143] The above is a detailed introduction to the storage space management system, method, medium, electronic device and program product provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. A storage space management method, characterized in that: include: Obtain multiple physical addresses of multiple physical storage devices on different servers corresponding to different nodes in the distributed storage system; Concatenating the multiple physical addresses to generate address space pools corresponding to the different servers, and determining a linked list corresponding to the address space pools; When it is determined that the target object initiates a logical volume creation request, determining a target number of logical addresses from the address space pool according to the linked list, and recording a mapping relationship between the logical volume, the logical address, and the target physical address associated with the logical address; A storage space associated with the logical volume is managed based on the mapping relationship, wherein the storage space includes at least two physical storage devices.
2. The storage space management method according to claim 1, characterized in that: Determining the linked list corresponding to the address space pool includes: Configuring redundancy relationships between different physical addresses in the address space pool; A linked list corresponding to the address space pool is created based on the redundancy relationship and a preset address segment management tree, wherein the linked list includes at least: a physical device address management table of the address space pool and a redundant sub-linked list for copy protection.
3. The storage space management method according to claim 2, characterized in that: Creating a linked list corresponding to the address space pool based on the redundancy relationship and a preset address segment management tree includes: Establishing a multi-level mapping from the object logical address to the physical storage device according to the preset address segment management tree; A linked list corresponding to the address space pool is created according to the multi-level mapping and the redundancy relationship.
4. The storage space management method according to claim 3, characterized in that: Establishing a multi-level mapping from the object logical address to the physical storage device according to the preset address segment management tree includes: Find the address segment control management information from the distributed storage system through the object address corresponding to the target object; An address space index layer in the multi-level mapping is determined according to the address segment control management information.
5. The storage space management method according to claim 3, characterized in that: Establishing a multi-level mapping from the object logical address to the physical storage device according to the preset address segment management tree includes: Obtaining management information corresponding to different branches in the preset address segment management tree, and calculating a mask sequence corresponding to each branch, wherein each branch manages a continuous address space of a physical storage device; A physical device index layer in the multi-level mapping is determined according to the management information and the mask sequence.
6. The storage space management method according to claim 3, characterized in that: Establishing a multi-level mapping from the object logical address to the physical storage device according to the preset address segment management tree includes: Determine address information corresponding to different branches in the preset address segment management tree, wherein the address information includes at least: node information corresponding to the current branch in the distributed storage system, device information of the physical storage device corresponding to the current branch, and size information of the address corresponding to the current branch; A physical device address information layer in the multi-level mapping is determined based on the address information.
7. A storage space management device, characterized in that: include: An acquisition module, configured to acquire multiple physical addresses of multiple physical storage devices on different servers corresponding to different nodes in a distributed storage system; A first determining module is configured to concatenate the multiple physical addresses to generate address space pools corresponding to the different servers, and determine a linked list corresponding to the address space pools; a second determining module, configured to, when determining that a target object initiates a logical volume creation request, determine a target number of logical addresses from the address space pool according to the linked list, and record a mapping relationship between the logical volume, the logical address, and a target physical address associated with the logical address; A management module is used to manage the storage space associated with the logical volume based on the mapping relationship, wherein the storage space includes at least two physical storage devices.
8. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the storage space management method according to any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the storage space management method according to any one of claims 1 to 6 are implemented.
10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the storage space management method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Fine-grained resource access control method based on ACL (access control list)
CN121256832A
Storage space monitoring methods, devices and electronic equipment
CN122412246A
FPGA-based pre-embedded single storage management method in a financial system
CN122547711A
