WO2024119760A1 - Procédé et appareil de création de volume, procédé et appareil de lecture-écriture de volume, et dispositif électronique - Google Patents

Procédé et appareil de création de volume, procédé et appareil de lecture-écriture de volume, et dispositif électronique Download PDF

Info

Publication number
WO2024119760A1
WO2024119760A1 PCT/CN2023/101162 CN2023101162W WO2024119760A1 WO 2024119760 A1 WO2024119760 A1 WO 2024119760A1 CN 2023101162 W CN2023101162 W CN 2023101162W WO 2024119760 A1 WO2024119760 A1 WO 2024119760A1
Authority
WO
WIPO (PCT)
Prior art keywords
volume
block
free
raid
application information
Prior art date
Application number
PCT/CN2023/101162
Other languages
English (en)
Chinese (zh)
Inventor
马艳
许永良
孙明刚
Original Assignee
苏州元脑智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 苏州元脑智能科技有限公司 filed Critical 苏州元脑智能科技有限公司
Publication of WO2024119760A1 publication Critical patent/WO2024119760A1/fr

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • G06F3/0689Disk arrays, e.g. RAID, JBOD
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0662Virtualisation aspects
    • G06F3/0665Virtualisation aspects at area level, e.g. provisioning of virtual or logical volumes

Definitions

  • the present application relates to the field of storage technology, and in particular to a volume creation method and device, a volume reading and writing method and device, an electronic device, and a non-volatile readable storage medium.
  • RAID Redundant Array of Independent Disks, a redundant array composed of independent disks
  • the RAID card controller organizes the hard disks connected to the server into a RAID array according to the RAID level. The user creates one or more volumes of specified capacity on the RAID array for the host to use as a block device.
  • the capacity of the created volume can come from the entire RAID array or a part of the RAID array, but the LBA corresponding to the volume capacity is required to be distributed continuously on the RAID array.
  • this capacity allocation method has certain shortcomings. After multiple volumes are created on the RAID array, deleting the volume will cause the available LBA (Logical Block Address, the logical address of the data sector in the hard disk) of the RAID array to be fragmented, so that its total available capacity is divided. When the user creates a volume again, the total available capacity is met, but the user cannot create a volume that meets the capacity requirements due to the division of the available capacity, which affects the user's business and causes a decline in user experience.
  • LBA Logical Block Address
  • the purpose of the present application is to provide a volume creation method, which improves the flexibility of creating volume allocation, solves the limitation problem brought by the existing RAID card volume capacity allocation method, and thus improves the user experience; another purpose of the present application is to provide a volume creation device, a volume reading and writing method and device, an electronic device and a non-volatile readable storage medium.
  • a volume creation method comprising: parsing a received volume creation request to obtain the volume capacity of the target volume to be created and the first RAID array to which the target volume belongs; calculating the first number of blocks and the first number of block nodes required for the target volume according to the volume capacity; wherein each block is composed of a first preset number of continuous data sector logical addresses, and each block node manages a second preset number of blocks; when it is determined that the free block nodes in the RAID free list corresponding to the first RAID array meet the requirements for creating the target volume, traversing the RAID free list to apply for the first number of block nodes for the target volume, and generating first application information according to the first number of blocks and the currently applied block nodes; when it is determined that the free block nodes in the global free list meet the requirements for creating the target volume, traversing the global free list to apply for the first number of block nodes for the target volume, and generating second application information according to the first number of
  • the global free list creation process is also included, and the global free list creation process includes: when the system is initialized, the upper limit of the number of block nodes is calculated according to the system capacity specification and the preset block size; the global free list is created according to the upper limit of the number of block nodes.
  • the upper limit of the number of block nodes is calculated according to the system capacity specification and the preset block size, including: according to the system capacity specification, the preset block size and the preset management of each block node
  • the upper limit of the number of block nodes is calculated based on the number of blocks.
  • the present application after generating the first application information according to the first number of blocks and the currently applied block nodes, it also includes: updating the free header position index and the number of free block nodes of the RAID free list according to the first application information.
  • an update operation is performed on the number of free block nodes in the global free list according to the free header position index and the number of free block nodes of the updated RAID free list, including: when it is determined that all the block nodes allocated to the volume exist in the RAID free list according to the free header position index and the number of free block nodes of the updated RAID free list, all the block nodes allocated to the volume are hung back to the global free list.
  • the free block nodes in the global free list after determining that the free block nodes in the global free list meet the requirements for creating the target volume, before traversing the global free list to apply for the first number of block nodes for the target volume, it also includes: recording the header position index of the volume linked list corresponding to the target volume.
  • the second application information after generating the second application information according to the first number of blocks and the currently applied block nodes, it also includes: updating the header position index and the number of free block nodes of the global free list according to the second application information.
  • the present application after updating the header position index and the number of free block nodes of the global free list according to the second application information, it also includes: updating the allocation status of each block belonging to the target volume recorded in the global free list from the first RAID array.
  • the first application information is generated according to the first number of blocks and the currently applied block node, including: generating the first application information according to the array identification information of each block managed by each block node recorded in the global free list, the first number of blocks and the currently applied block node.
  • the first application information is generated based on the array identification information of each block managed by each block node recorded in the global free list, the first number of blocks and the currently applied block node, including: generating the first application information based on the array identification information of each block managed by each block node recorded in the global free list, the position number of each block in the corresponding RAID array, the first number of blocks and the currently applied block node.
  • it also includes: parsing the received volume expansion request to obtain the capacity of the volume to be expanded and the second RAID array to which the volume to be expanded belongs; calculating the second number of blocks and the second number of block nodes required for this expansion according to the capacity of the volume to be expanded; when it is determined that the free block nodes in the RAID free list corresponding to the second RAID array meet the expansion conditions of the volume to be expanded, traversing the RAID free list to apply for the second number of block nodes for the volume to be expanded, and generating third application information according to the second number of blocks and the currently applied block nodes; when it is determined that the free block nodes in the global free list meet the expansion conditions of the volume to be expanded, traversing the global free list to apply for the second number of block nodes for the volume to be expanded, and generating fourth application information according to the second number of blocks and the currently applied block nodes; encapsulating the third application information and the fourth application information to complete the expansion operation of the volume to be expanded.
  • it also includes: when it is determined that the free block nodes in the RAID free list corresponding to the first RAID array do not meet the requirements for creating the target volume, outputting a prompt message that the RAID array capacity is insufficient.
  • it also includes: when it is determined that the free block nodes in the global free list do not meet the requirements for creating the target volume, outputting a prompt message that the global free list space is insufficient.
  • a volume reading and writing method comprises: parsing a received volume reading and writing request to obtain a volume data sector logical address of a volume to be read and written; obtaining a quantity correspondence relationship between a single block and a continuous data sector logical address; calculating a volume identification number of the volume to be read and written and an offset in a corresponding block according to the quantity correspondence relationship and the volume data sector logical address; searching a corresponding position number in a RAID array from a volume linked list corresponding to the volume to be read and written according to the volume identification number; calculating an array data sector logical address of the volume to be read and written according to the position number in the RAID array, the quantity correspondence relationship and the offset; and performing a reading and writing operation on the volume to be read and written according to the array data sector logical address.
  • a volume creation device comprises: a volume creation request parsing module, used for parsing a received volume creation request, and obtaining the volume capacity of a target volume to be created and a first RAID array to which the target volume belongs; a first block number and node number calculation module, used for calculating the first block number and first block node number required for the target volume according to the volume capacity; wherein each block is composed of a first preset number of continuous data sector logical addresses, and each block node manages a second preset number of blocks; a first application information generation module, used for determining that the free block nodes in the RAID free linked list corresponding to the first RAID array meet the requirements for creating the target volume; When marking a volume, the RAID free list is traversed to apply for the first number of block nodes for the target volume, and first application information is generated according to the first number of blocks and the currently applied block nodes; a second application information generation module is used to traverse the global free list to apply for the first number of block nodes for the target volume when
  • a volume read-write device comprises: a volume read-write request parsing module, used for parsing a received volume read-write request to obtain a volume data sector logical address of a volume to be read-written; a quantity correspondence acquisition module, used for acquiring a quantity correspondence between a single block and a continuous data sector logical address; a volume identification number and offset calculation module, used for calculating the volume identification number of the volume to be read-written and the offset in the corresponding block according to the quantity correspondence and the volume data sector logical address; a position number search module, used for searching the corresponding position number in a RAID array from a volume linked list corresponding to the volume to be read-written according to the volume identification number; a logical address calculation module, used for calculating the array data sector logical address of the volume to be read-written according to the position number in the RAID array, the quantity correspondence and the offset; and a volume read-write module, used for performing read-write operations on the volume to be read-written according to the array data sector logical address.
  • An electronic device comprises: a memory for storing a computer program; and a processor for implementing the steps of the volume creation method or volume reading and writing method as described above when executing the computer program.
  • a non-volatile readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the volume creation method or the volume reading and writing method as described above are implemented.
  • the volume creation method parses a received volume creation request to obtain the volume capacity of the target volume to be created and the first RAID array to which the target volume belongs; calculates the first number of blocks and the first number of block nodes required for the target volume according to the volume capacity; wherein each block is composed of a first preset number of continuous data sector logical addresses, and each block node manages a second preset number of blocks; when it is determined that the free block nodes in the RAID free list corresponding to the first RAID array meet the requirements for creating the target volume, traverses the RAID free list to apply for the first number of block nodes for the target volume, and generates first application information according to the first number of blocks and the currently applied block nodes; when it is determined that the free block nodes in the global free list meet the requirements for creating the target volume, traverses the global free list to apply for the first number of block nodes for the target volume, and generates second application information according to the first number of blocks and the currently applied block nodes; and encapsulates the
  • the present application also provides a volume creation device, a volume reading and writing method and device, an electronic device and a non-volatile readable storage medium corresponding to the above-mentioned volume creation method, which have the above-mentioned technical effects and are not repeated here.
  • FIG1 is a schematic diagram of volume creation capacity allocation in the prior art
  • FIG2 is a flowchart of an implementation of a volume creation method in an embodiment of the present application.
  • FIG3 is another implementation flow chart of the volume creation method in an embodiment of the present application.
  • FIG4 is a schematic diagram of a global free list in an embodiment of the present application.
  • FIG5 is a schematic diagram of volume creation capacity allocation in an embodiment of the present application.
  • FIG6 is a flowchart of an implementation of the volume reading and writing method in an embodiment of the present application.
  • FIG7 is a structural block diagram of a volume creation device according to an embodiment of the present application.
  • FIG8 is a structural block diagram of a volume reading and writing device in an embodiment of the present application.
  • FIG9 is a structural block diagram of an electronic device in an embodiment of the present application.
  • FIG10 is a schematic diagram of a specific structure of an electronic device provided in this embodiment.
  • the capacity of the created volume can come from the entire RAID array or a part of the RAID array, but the LBA corresponding to the volume capacity is required to be distributed continuously on the RAID array.
  • FIG. 1 is a schematic diagram of capacity allocation for volume creation in the prior art.
  • a RAID5 array is composed of 5 physical disks, which are mapped to a RAID5 logical address map (Lba Map). Two continuous LBA spaces are divided on the RAID5 Lba Map to form two volumes for use by the host.
  • this capacity allocation method has certain disadvantages. After multiple volumes are created on a RAID array, deleting a volume will cause the available LBA of the RAID array to be fragmented, so that its total available capacity is divided. When the user creates a volume again, the total available capacity is met, but due to the division of the available capacity, the user cannot create a volume that meets the capacity requirements, affecting user business and causing a decline in user experience.
  • the volume creation method provided in the present application improves the flexibility of creating volume allocation, solves the limitation problem caused by the existing RAID card volume capacity allocation method, and thus improves the user experience.
  • FIG. 2 is a flowchart of an implementation of a volume creation method in an embodiment of the present application.
  • the volume creation method may include the following steps:
  • S201 Parse the received volume creation request to obtain the volume capacity of the target volume to be created and the first RAID array to which the target volume belongs.
  • volume creation management center When a volume needs to be created, a volume creation request is sent to the volume creation management center, and the volume creation request includes the volume capacity of the target volume to be created and the first RAID array to which the target volume belongs.
  • the volume creation management center receives the volume creation request and parses the received volume creation request to obtain the volume capacity of the target volume to be created and the first RAID array to which the target volume belongs.
  • the number of arrays of the first RAID array to which the target volume belongs obtained by parsing the volume creation request may be one or more, and the specific number is specified by the initiator of the volume creation request, such as a specific RAID array in the system or all RAID arrays that currently have free blocks in the system.
  • S202 Calculate the number of first blocks and the number of first block nodes required for the target volume according to the volume capacity.
  • Each block is composed of a first preset number of continuous data sector logical addresses, and each block node manages a second preset number of blocks.
  • the data sector logical address is pre-set to be segmented according to a fixed size to obtain multiple chunks, so that Each chunk is composed of a first preset number of continuous data sector logical addresses.
  • Chunk nodes are set to manage each chunk, and each chunk node (ChunkGrp) manages a second preset number of chunks. After parsing and obtaining the volume capacity of the target volume to be created, the first chunk number and the first chunk node number required for the target volume are calculated according to the volume capacity.
  • a RAID free list corresponding to the first RAID array is pre-established.
  • the system may have multiple RAID free lists. Each RAID array corresponds to a RAID free list.
  • the header position of each RAID free list points to the position of the first block node allocated to its RAID array.
  • the system records two key information: array->freeChunkGrps (indicating the number of ChunkGrps in the RAID free list that are not currently allocated to the volume) and array->freeChunkGrpIndex (indicating the current header position index of the RAID free list).
  • the volume creation method may further include the following steps:
  • the free header position index and the number of free block nodes of the RAID free linked list are updated according to the first application information.
  • the free header position index and the number of free block nodes of the first RAID array will change, and the free header position index and the number of free block nodes of the RAID free linked list are updated according to the first application information, thereby ensuring the timely update of the RAID free linked list corresponding to the first RAID array.
  • the volume creation method may further include the following steps:
  • the number of free block nodes in the global free list is updated according to the free table header position index and the number of free block nodes in the updated RAID free list.
  • FIG. 4 is a schematic diagram of a global free list in an embodiment of the present application.
  • the embodiment of the present application provides a global free list for managing blocks.
  • the structure of the global free list is a one-way linked list of fixed length.
  • the number of block nodes in the list is allocated when the system is initialized.
  • the upper limit of the number of block nodes can be calculated according to the system capacity specification and the block size.
  • Each block node manages 32 blocks, wherein each block node includes:
  • chunkTable[32] location information of 32 chunks.
  • the location information of each chunk is an integer value, where bits 17-31 represent the array ID (arrayId), indicating which array the chunk comes from, and bits 0-16 represent the array chunk ID (arrayChunkId), indicating the position of the chunk in the array, starting from 0.
  • each bit represents the usage of a block.
  • 1 means that the block is not allocated to the volume, and 0 means that the block is allocated to the volume.
  • 1 means that the block is allocated from the RAID array, and 0 means that the block is not allocated from the RAID array.
  • nextRecord is a pointer type variable that points to the next block node of the current block node.
  • the number of free block nodes of the global free table is updated according to the free table header position index and the number of free block nodes of the updated RAID free table, thereby ensuring the timely update of the global free table.
  • updating the number of free block nodes in the global free list according to the free table header position index and the number of free block nodes in the updated RAID free list may include the following steps:
  • the block node When it is determined that all the block nodes allocated to the volume exist in the RAID free list according to the free table header position index and the number of free block nodes in the updated RAID free list, the block node will be released from the RAID free list, and all the block nodes allocated to the volume will be hung back to the global free list. In this way, the block node no longer belongs to the node of the RAID free list and can be used for subsequent allocation.
  • the volume creation method may further include the following steps:
  • An update operation is performed on the allocation status of each block corresponding to the first RAID array recorded in the global free list.
  • the allocation status of each block corresponding to the first RAID array recorded in the global free list is updated, so as to timely count the usage of each block in the first RAID array.
  • generating the first application information according to the first number of blocks and the currently applied block nodes may include the following steps:
  • the first application information is generated according to the array identification information of each block managed by each block node recorded in the global free list, the number of first blocks and the currently applied block node.
  • the array identification information of each block managed by each block node recorded in the global free list is used to generate the first application information according to the array identification information of each block managed by each block node recorded in the global free list, the number of first blocks and the currently applied block node. Therefore, according to the first application information, it can be counted which RAID array will be occupied by the target volume.
  • generating the first application information according to the array identification information of each block managed by each block node recorded in the global free list, the first number of blocks and the currently applied block node may include the following steps:
  • the first application information is generated according to the array identification information of each block managed by each block node recorded in the global free list, the position number of each block in the corresponding RAID array, the number of first blocks and the currently applied block node.
  • the global free list also records the position number of each block in the corresponding RAID array, and the first application information is generated according to the array identification information of each block managed by each block node recorded in the global free list, the position number of each block in the corresponding RAID array, the number of first blocks, and the currently applied block node. Therefore, according to the first application information, it can be counted which blocks in which RAID array will be occupied by the target volume.
  • the volume creation method may further include the following steps:
  • the global free list is traversed to apply for the first number of block nodes for the target volume, and the second application information is generated according to the first number of blocks and the currently applied block nodes. Therefore, according to the second application information, it can be counted which blocks in the target volume will be allocated to the blocks in the first RAID array.
  • the volume creation method may further include the following steps:
  • the system can have multiple volume lists, one for each volume.
  • the header of each volume list points to the first block node assigned to the volume.
  • the system will also record volume->ChunkGrpIndex (indicates the index of the volume list when the volume list is The key information is the front header position index).
  • the header position index of the volume list corresponding to the target volume is recorded, so as to count the occupancy of the free block nodes in the global free list by the target volume.
  • the volume creation method may further include the following steps:
  • the header position index and the number of free block nodes of the global free list are updated according to the second application information, so as to timely update the free block nodes in the global free list.
  • the volume creation method may further include the following steps:
  • An update operation is performed on each block to which the target volume recorded in the global free list belongs from the allocation state in the first RAID array.
  • the allocation status of each block of the target volume recorded in the global free list from the first RAID array is updated, so as to timely count which blocks corresponding to the target volume have been allocated from the first RAID array and which blocks have not been allocated from the first RAID array.
  • the volume creation method may further include the following steps:
  • a prompt message indicating that the global free list has insufficient space is output, thereby prompting the user that the volume creation has failed.
  • S205 Encapsulate the first application information and the second application information to complete the creation of the target volume.
  • the first application information and the second application information are generated, the first application information and the second application information are encapsulated to record the correspondence between each block in the first RAID array and each block corresponding to the target volume, thereby completing the creation of the target volume.
  • a RAID5 array is composed of 4 physical disks, which are mapped to a RAID5 Lba Map.
  • the RAID5 Lba Map is divided into a limited number of chunks according to a fixed size of 1GB.
  • the required number of chunks is converted according to the volume capacity, and the required number of chunks is selected from the RAID array to form a volume.
  • the embodiment of the present application also provides corresponding improved solutions.
  • the same steps or corresponding steps as those in the above embodiment can be referenced to each other, and the corresponding beneficial effects can also be referenced to each other, which will not be repeated one by one in the following improved embodiments.
  • the volume creation method may include a process of creating a global free list, and the process of creating a global free list may include the following steps:
  • Step 1 When the system is initialized, the upper limit of the number of block nodes is calculated based on the system capacity specification and the preset block size;
  • Step 2 Create a global free list based on the upper limit of the number of block nodes.
  • the upper limit of the number of block nodes is calculated according to the system capacity specification and the preset block size, and a global free list is created according to the upper limit of the number of block nodes.
  • calculating the upper limit of the number of block nodes according to the system capacity specification and the preset block size may include the following steps:
  • the upper limit of the number of block nodes is calculated based on the system capacity specification, the preset block size, and the preset number of blocks managed by each block node.
  • the number of blocks managed by each block node is preset, for example, it can be set to 32, and the upper limit of the number of block nodes is calculated according to the system capacity specification, the preset block size and the preset number of blocks managed by each block node, so as to realize the accurate creation of the global free list according to the system requirements.
  • FIG. 3 is another implementation flow chart of the volume creation method in an embodiment of the present application.
  • the volume creation method may include the following steps:
  • S301 Parse the received volume creation request to obtain the volume capacity of the target volume to be created and the first RAID array to which the target volume belongs.
  • S302 Calculate the number of first blocks and the number of first block nodes required for the target volume according to the volume capacity.
  • Each block is composed of a first preset number of continuous data sector logical addresses, and each block node manages a second preset number of blocks.
  • S305 Encapsulate the first application information and the second application information to complete the creation of the target volume.
  • S306 Parse the received volume expansion request to obtain the capacity of the volume to be expanded and the second RAID array to which the volume to be expanded belongs.
  • volume expansion request is sent to the volume creation management center, and the volume expansion request includes the capacity of the volume to be expanded and the second RAID array to which the volume to be expanded belongs.
  • the volume creation management center receives the volume expansion request and parses the received volume expansion request to obtain the capacity of the volume to be expanded and the second RAID array to which the volume to be expanded belongs.
  • S307 Calculate the number of second blocks and the number of second block nodes required for the current expansion according to the capacity of the volume to be expanded.
  • the number of second blocks and the number of second block nodes required for the current expansion are calculated according to the capacity of the volume to be expanded.
  • the RAID free list When it is determined that the free block nodes in the RAID free list corresponding to the second RAID array meet the expansion conditions of the volume to be expanded, the RAID free list is traversed to apply for the second number of block nodes for the volume to be expanded, and the third application information is generated according to the second number of blocks and the currently applied block nodes. Therefore, according to the third application information, it can be counted which blocks in the second RAID array will be occupied by the volume to be expanded.
  • S310 Encapsulate the third application information and the fourth application information to complete the capacity expansion operation of the volume to be expanded.
  • the third application information and the fourth application information are encapsulated to record the correspondence between each block in the second RAID array required for this volume expansion and each block corresponding to the volume to be expanded, thereby completing the expansion operation of the volume to be expanded.
  • the present application also provides a volume reading and writing method.
  • the volume reading and writing method described below and the volume creation method described above can refer to each other.
  • FIG. 6 is a flowchart of an implementation of a volume reading and writing method in an embodiment of the present application.
  • the volume reading and writing method may include the following steps:
  • S601 Parse the received volume read/write request to obtain the volume data sector logical address of the volume to be read/written.
  • volume read or write request When a created volume needs to be read or written, a volume read or write request is sent to the volume read or write control center.
  • the volume read or write request includes the volume data sector logical address 1ba of the volume to be read or written.
  • the volume read or write control center receives the volume read or write request and parses the received volume read or write request to obtain the volume data sector logical address of the volume to be read or written.
  • S602 Obtain the quantity correspondence between a single block and the logical addresses of consecutive data sectors.
  • the quantity correspondence relationship ChunkSize between a single block and a continuous data sector logical address is preset, and after the volume data sector logical address of the volume to be read and written is obtained through parsing, the quantity correspondence relationship between the single block and the continuous data sector logical address is obtained.
  • S603 Calculate the volume identification number of the volume to be read or written and the offset in the corresponding block according to the quantity correspondence and the volume data sector logical address.
  • volume_chunkId volume identification number of the volume to be read and written and the offset (offset) in the corresponding block are calculated according to the quantity correspondence and the volume data sector logical address.
  • volume_chunkId lba/ChunkSize
  • Offset lba%ChunkSize.
  • S604 Search the volume chain table corresponding to the volume to be read or written according to the volume identification number for the corresponding position number in the RAID array.
  • the correspondence between the volume identification number and the position number in the RAID array is stored in advance.
  • the system in order to ensure that the block node linked list resources are controllable and shared, in addition to setting up a global free linked list, the system also defines two types of sub-linked lists, namely the RAID free linked list and the volume linked list.
  • the blocks stored in the block nodes corresponding to the RAID free linked list are used as capacity producers, and the required block nodes recorded in the volume linked list are used as capacity consumers.
  • the three types of linked lists are used to share the system linked list node resources, and the occupancy of the blocks in the corresponding RAID array of the created volume is accurately recorded.
  • S605 Calculate the array data sector of the volume to be read and written according to the position number, quantity correspondence and offset in the RAID array. Logical address of the zone.
  • the array data sector logical address of the volume to be read and written is calculated according to the position number, quantity correspondence and offset in the RAID array.
  • S606 Perform read and write operations on the read-write volume according to the array data sector logical address.
  • the read and write operation is performed on the volume to be read and written according to the array data sector logical address.
  • the present application also provides a volume creation device.
  • the volume creation device described below and the volume creation method described above can refer to each other.
  • FIG. 7 is a structural block diagram of a volume creation device in an embodiment of the present application.
  • the volume creation device may include:
  • the volume creation request parsing module 71 is used to parse the received volume creation request to obtain the volume capacity of the target volume to be created and the first RAID array to which the target volume belongs;
  • the block number and node number calculation module 72 is used to calculate the first block number and the first block node number required for the target volume according to the volume capacity; wherein each block is composed of a first preset number of continuous data sector logical addresses, and each block node manages a second preset number of blocks;
  • a first application information generating module 73 is used for, when it is determined that the free block nodes in the RAID free list corresponding to the first RAID array meet the requirements for creating a target volume, traversing the RAID free list to apply for a first number of block nodes for the target volume, and generating first application information according to the first number of blocks and the currently applied block nodes;
  • a second application information generating module 74 is used for, when it is determined that the free block nodes in the global free list meet the requirements for creating the target volume, traversing the global free list to apply for the first number of block nodes for the target volume, and generating second application information according to the first number of blocks and the currently applied block nodes;
  • the volume creation module 75 is used to encapsulate the first application information and the second application information to complete the creation of the target volume.
  • the volume creation device may further include a global free list creation module, and the global free list creation module includes:
  • the node number upper limit calculation submodule is used to calculate the upper limit of the number of block nodes according to the system capacity specification and the preset block size when the system is initialized;
  • the global free list creation submodule is used to create a global free list according to the upper limit of the number of block nodes.
  • the node number upper limit calculation submodule is specifically a module that calculates the upper limit of the number of block nodes according to the system capacity specification, the preset block size, and the preset number of blocks managed by each block node.
  • the volume creation device may further include:
  • the RAID free list updating module is used to update the free table header position index and the number of free block nodes of the RAID free list according to the first application information.
  • the volume creation device may further include:
  • the global free list update module is used to update the number of free block nodes in the global free list according to the free header position index and the number of free block nodes of the updated RAID free list after updating the free header position index and the number of free block nodes of the RAID free list according to the first application information.
  • the global free list update module is specifically a module that hangs all the block nodes allocated to the volume back to the global free list when it is determined that all the block nodes allocated to the volume exist in the RAID free list based on the free table header position index and the number of free block nodes of the updated RAID free list.
  • the volume creation device may further include:
  • the array block allocation status update module is used to update the allocation status of each block corresponding to the first RAID array recorded in the global free list after updating the free table header position index and the number of free block nodes of the RAID free list according to the first application information.
  • the volume creation device may further include:
  • the volume linked list header position index recording module is used to record the volume linked list header position index corresponding to the target volume after determining that the free block nodes in the global free linked list meet the requirements for creating the target volume and before traversing the global free linked list to apply for the first number of block nodes for the target volume.
  • the global free list update module is also used to update the header position index and the number of free block nodes of the global free list according to the second application information after generating the second application information according to the first number of blocks and the currently applied block nodes.
  • the volume creation device may further include:
  • the volume block allocation status update module is used to update the allocation status of each block belonging to the target volume recorded in the global free list from the first RAID array after updating the header position index and the number of free block nodes in the global free list according to the second application information.
  • the first application information generation module 73 is specifically a module that generates the first application information based on the array identification information of each block managed by each block node recorded in the global free list, the first block number and the currently applied block node.
  • the first application information generation module 73 is specifically a module that generates the first application information based on the array identification information of each block managed by each block node recorded in the global free list, the position number of each block in the corresponding RAID array, the number of first blocks and the currently applied block node.
  • the volume creation device may further include:
  • a volume expansion request parsing module used to parse the received volume expansion request to obtain the capacity of the volume to be expanded and the second RAID array to which the volume to be expanded belongs;
  • a second block number and node number calculation module used to calculate the number of second blocks and the number of second block nodes required for the current expansion according to the capacity of the volume to be expanded;
  • a third application information generating module is used for, when it is determined that the free block nodes in the RAID free linked list corresponding to the second RAID array meet the expansion condition of the volume to be expanded, traversing the RAID free linked list to apply for the second number of block nodes for the volume to be expanded, and generating third application information according to the second number of blocks and the currently applied block nodes;
  • a fourth application information generating module is used for, when it is determined that the free block nodes in the global free list meet the expansion conditions of the volume to be expanded, traversing the global free list to apply for the second number of block nodes for the volume to be expanded, and generating fourth application information according to the second number of blocks and the currently applied block nodes;
  • the volume expansion module is used to encapsulate the third application information and the fourth application information to complete the expansion operation of the volume to be expanded.
  • the volume creation device may further include:
  • the prompt information output module is used to output a prompt information of insufficient RAID array capacity when it is determined that the free block nodes in the RAID free linked list corresponding to the first RAID array do not meet the requirements of creating a target volume.
  • the prompt information output module is also used to output a prompt information of insufficient space in the global free list when it is determined that the free block nodes in the global free list do not meet the requirements for creating a target volume.
  • the present application also provides a volume reading and writing device.
  • the volume reading and writing device described below and the volume creation method described above can be referenced to each other.
  • FIG. 8 is a structural block diagram of a volume reading and writing device in an embodiment of the present application.
  • the volume reading and writing device may include:
  • the volume read/write request parsing module 81 is used to parse the received volume read/write request to obtain the volume data sector logical address of the volume to be read/written;
  • a quantity correspondence relationship acquisition module 82 is used to acquire a quantity correspondence relationship between a single block and a continuous data sector logical address
  • the volume identification number and offset calculation module 83 is used to calculate the volume identification number of the volume to be read and written and the offset in the corresponding block according to the quantity correspondence and the volume data sector logical address;
  • a position number search module 84 is used to search the corresponding position number in the RAID array from the volume chain table corresponding to the volume to be read or written according to the volume identification number;
  • the logical address calculation module 85 is used to calculate the array data sector logical address of the volume to be read and written according to the position number, quantity correspondence and offset in the RAID array;
  • the volume read/write module 86 is used to perform read/write operations on the read/write volume according to the array data sector logical address.
  • FIG. 9 is a schematic diagram of an electronic device provided by the present application, and the device may include:
  • the processor 322 is configured to implement the steps of the volume creation method or volume reading and writing method of the above method embodiment when executing a computer program.
  • FIG. 10 is a schematic diagram of the specific structure of an electronic device provided in this embodiment.
  • the electronic device may have relatively large differences due to different configurations or performances, and may include a processor (central processing units, CPU) 322 (for example, one or more processors) and a memory 332, and the memory 332 stores one or more computer programs 342 or data 344.
  • the memory 332 can be a temporary storage or a permanent storage.
  • the program stored in the memory 332 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the data processing device.
  • the processor 322 can be configured to communicate with the memory 332 to execute a series of instruction operations in the memory 332 on the electronic device 301.
  • the electronic device 301 may further include at least one of the following: one or more power supplies 326 , one or more wired or wireless network interfaces 350 , one or more input and output interfaces 358 , and one or more operating systems 341 .
  • volume creation method or volume reading and writing method described above may be implemented by the structure of an electronic device.
  • the present application further provides a non-volatile readable storage medium, on which a computer program is stored.
  • a computer program is stored on a non-volatile readable storage medium, on which a computer program is stored.
  • the received volume creation request is parsed to obtain the volume capacity of the target volume to be created and the first RAID array to which the target volume belongs; the first number of blocks and the first number of block nodes required for the target volume are calculated according to the volume capacity; wherein each block is composed of a first preset number of continuous data sector logical addresses, and each block node manages a second preset number of blocks; when it is determined that the free block nodes in the RAID free list corresponding to the first RAID array meet the requirements for creating the target volume, the RAID free list is traversed to apply for the first number of block nodes for the target volume, and first application information is generated according to the first number of blocks and the currently applied block nodes; when it is determined that the free block nodes in the global free list meet the requirements for creating the target volume, the global free list is traversed to apply for the first number of block nodes for the target volume, and second application information is generated according to the first number of blocks and the currently applied block nodes; the first application information and the second application information are en
  • the non-volatile readable storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (Read-Only Memory, Various media that can store program codes, such as ROM, random access memory (RAM), magnetic disk or optical disk, etc.
  • each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments.
  • the same or similar parts between the embodiments can be referred to each other.
  • the description is relatively simple, and the relevant parts can be referred to the method part.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Est divulgué dans la présente demande un procédé de création de volume. Le procédé consiste à : acquérir la capacité volumique d'un volume cible et d'un premier ensemble redondant de disques indépendants auquel appartient le volume cible ; en fonction de la capacité de volume, calculer un premier nombre de segments requis et un premier nombre de GRP de segment requis ; lorsqu'il est déterminé, selon une liste exempte d'ensembles redondants de disques indépendants, que la création du volume cible est satisfaite, à partir de la liste libre d'ensembles redondants de disques indépendants, appliquer pour des GRP de segment, dont le nombre est le premier nombre de GRP de segment, et générer de premières informations d'application ; lorsqu'il est déterminé, selon une liste libre globale, que la création du volume cible est satisfaite, à partir de la liste libre globale, appliquer pour des GRP de segment, dont le nombre est le premier nombre de GRP de segment, et générer de secondes informations d'application ; et conditionner les premières informations d'application et les secondes informations d'application, de façon à achever la création du volume cible. La présente demande améliore la flexibilité d'attribution pour la création de volume, et améliore l'expérience de l'utilisateur. Sont en outre divulgués dans la présente demande un appareil de création de volume, un procédé et un appareil de lecture-écriture de volume, un dispositif électronique et un support d'enregistrement lisible non volatil, qui présentent des effets techniques correspondants.
PCT/CN2023/101162 2022-12-06 2023-06-19 Procédé et appareil de création de volume, procédé et appareil de lecture-écriture de volume, et dispositif électronique WO2024119760A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211554109.0A CN115562595B (zh) 2022-12-06 2022-12-06 一种卷创建方法及装置、卷读写方法及装置、电子设备
CN202211554109.0 2022-12-06

Publications (1)

Publication Number Publication Date
WO2024119760A1 true WO2024119760A1 (fr) 2024-06-13

Family

ID=84770012

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/101162 WO2024119760A1 (fr) 2022-12-06 2023-06-19 Procédé et appareil de création de volume, procédé et appareil de lecture-écriture de volume, et dispositif électronique

Country Status (2)

Country Link
CN (1) CN115562595B (fr)
WO (1) WO2024119760A1 (fr)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115562595B (zh) * 2022-12-06 2023-02-28 苏州浪潮智能科技有限公司 一种卷创建方法及装置、卷读写方法及装置、电子设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140325146A1 (en) * 2013-04-29 2014-10-30 Lsi Corporation Creating and managing logical volumes from unused space in raid disk groups
CN111090394A (zh) * 2019-12-05 2020-05-01 烽火通信科技股份有限公司 一种基于卷级别raid的磁阵管理方法及装置
CN112995257A (zh) * 2019-12-16 2021-06-18 中国电信股份有限公司 基于云存储架构的缓存扩容方法、装置以及存储介质
CN115562595A (zh) * 2022-12-06 2023-01-03 苏州浪潮智能科技有限公司 一种卷创建方法及装置、卷读写方法及装置、电子设备

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5055125B2 (ja) * 2004-11-05 2012-10-24 ドロボ, インコーポレイテッド 種々のサイズの格納デバイスを許容する動的にアップグレード可能な故障許容格納システムおよび方法
CN111506269B (zh) * 2020-04-22 2021-09-07 腾讯科技(深圳)有限公司 一种磁盘存储空间分配方法、装置、设备及存储介质
CN112100293A (zh) * 2020-09-23 2020-12-18 腾讯科技(深圳)有限公司 数据处理方法、数据访问方法、装置及计算机设备
CN113253926A (zh) * 2021-05-06 2021-08-13 天津大学深圳研究院 提升新型存储器的查询和存储性能的存储内索引构建方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140325146A1 (en) * 2013-04-29 2014-10-30 Lsi Corporation Creating and managing logical volumes from unused space in raid disk groups
CN111090394A (zh) * 2019-12-05 2020-05-01 烽火通信科技股份有限公司 一种基于卷级别raid的磁阵管理方法及装置
CN112995257A (zh) * 2019-12-16 2021-06-18 中国电信股份有限公司 基于云存储架构的缓存扩容方法、装置以及存储介质
CN115562595A (zh) * 2022-12-06 2023-01-03 苏州浪潮智能科技有限公司 一种卷创建方法及装置、卷读写方法及装置、电子设备

Also Published As

Publication number Publication date
CN115562595B (zh) 2023-02-28
CN115562595A (zh) 2023-01-03

Similar Documents

Publication Publication Date Title
KR102240557B1 (ko) 데이터 저장 방법, 장치 및 시스템
CN110531940B (zh) 视频文件处理方法及装置
JP5603997B2 (ja) ストレージ装置及びデータ制御方法
CN101258493B (zh) 用于在顺序存取数据存储子系统中执行搜索操作的系统和方法
JP5309043B2 (ja) ストレージシステム及びストレージシステムでの重複データ削除のための方法
KR100599429B1 (ko) 파티션 작성 방법 및 삭제 방법
US7716445B2 (en) Method and system for storing a sparse file using fill counts
US7822931B2 (en) File storage device, host apparatus, method for formatting nonvolatile semiconductor memory, and method of writing data in nonvolatile semiconductor memory
CN102282544A (zh) 存储系统
JP5537732B2 (ja) ストレージシステム
CN103514249A (zh) 一种数据自精简方法和系统及存储装置
WO2020211679A1 (fr) Attribution de ressources basée sur une surveillance e/s globale dans un système de stockage dsitribué
CN113568582B (zh) 数据管理方法、装置和存储设备
WO2024119760A1 (fr) Procédé et appareil de création de volume, procédé et appareil de lecture-écriture de volume, et dispositif électronique
CN110147203B (zh) 一种文件管理方法、装置、电子设备及存储介质
US11385823B2 (en) Method, electronic device and computer program product for rebuilding disk array
US20070106868A1 (en) Method and system for latency-directed block allocation
US8239427B2 (en) Disk layout method for object-based storage devices
CN118051179A (zh) 用于使用多个分区的分区命名空间存储的技术
CN114153394A (zh) 一种数据存储管理方法、装置及设备
US7480684B2 (en) Method and system for object allocation using fill counts
CN101788888A (zh) 一种实现目标端驱动的方法及该目标端驱动
US7437528B1 (en) Gang blocks
JP2015201233A (ja) ストレージ装置及びその制御方法
CN117149094B (zh) 确定数据区状态的方法、装置、磁盘阵列及存储系统