CN114415968A - Storage system and data writing method thereof - Google Patents

Storage system and data writing method thereof Download PDF

Info

Publication number
CN114415968A
CN114415968A CN202210091468.0A CN202210091468A CN114415968A CN 114415968 A CN114415968 A CN 114415968A CN 202210091468 A CN202210091468 A CN 202210091468A CN 114415968 A CN114415968 A CN 114415968A
Authority
CN
China
Prior art keywords
storage
data
raid
storage space
storage system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210091468.0A
Other languages
Chinese (zh)
Other versions
CN114415968B (en
Inventor
陈飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Xiaozhuang University
Original Assignee
Nanjing Xiaozhuang University
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 Nanjing Xiaozhuang University filed Critical Nanjing Xiaozhuang University
Priority to CN202210091468.0A priority Critical patent/CN114415968B/en
Publication of CN114415968A publication Critical patent/CN114415968A/en
Application granted granted Critical
Publication of CN114415968B publication Critical patent/CN114415968B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/2053Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant
    • G06F11/2056Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant by mirroring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/2053Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant
    • G06F11/2056Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant by mirroring
    • G06F11/2058Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant by mirroring using more than 2 mirrored copies
    • 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/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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Quality & Reliability (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a storage system and a data writing method thereof, wherein the method comprises the steps of receiving a data writing request, and selecting the RAID level of data storage according to the data corresponding to the writing request and the state of the storage system; the physical disk of the storage system is divided into a plurality of storage blocks, the plurality of storage blocks from different physical disks are configured into storage groups according to the storage structures corresponding to the RAID levels, and the plurality of storage groups are configured into RAID storage groups of corresponding RAID levels; allocating a storage space according to the RAID level of data storage, determining the stripe relation of a storage group, and splitting a write request into a plurality of sub-requests according to the mapping relation between the stripes and the storage blocks; and executing the sub-request to finish data writing. By adopting the technical scheme, data redundancy is kept, and high-performance data writing can be provided.

Description

Storage system and data writing method thereof
Technical Field
The invention relates to the technical field of data storage, in particular to a storage system and a data writing method thereof.
Background
Raid (redundant Array of redundant disk), i.e., redundant Array of Inexpensive disks, is a data redundancy backup technology commonly used in current storage systems. The RAID can be divided into multiple levels such as RAID0, RAID1, RAID10, RAID3, RAID5, RAID6 and the like according to different combinations of disks.
With the development of network technology and information processing technology, the storage system contains more and more physical disks, and the RAID6 level can tolerate damage of two disks at the same time, and protect reliability of user data to a greater extent while giving consideration to performance and disk space ratio, and thus is widely used in storage devices.
The storage system adopting RAID6 has the problems of write penalty and inconsistent data updating, and particularly when the storage system is degraded due to small data writing and disk failure, the write penalty of RAID6 has a particularly obvious influence on the data writing performance.
Disclosure of Invention
The purpose of the invention is as follows: the invention provides a storage system and a data writing method thereof, which can adaptively select the most suitable RAID level according to the storage space state of the storage system and the length of written data by arranging a plurality of RAID levels on a plurality of physical disks, and aims to maintain data redundancy and still provide high-performance data writing.
The technical scheme is as follows: the invention provides a data writing method of a storage system, which comprises the following steps: receiving a data writing request, and selecting a RAID level of data storage according to data corresponding to the writing request and the state of a storage system; the physical disk of the storage system is divided into a plurality of storage blocks, the plurality of storage blocks from different physical disks are configured into storage groups according to the storage structures corresponding to the RAID levels, and the plurality of storage groups are configured into RAID storage groups of corresponding RAID levels; allocating a storage space according to the RAID level of data storage, determining the stripe relation of a storage group, and splitting a write request into a plurality of sub-requests according to the mapping relation between the stripes and the storage blocks; and executing the sub-request to finish data writing.
Specifically, the RAID level of the storage system configuration includes at least one of RAID0, RAID1, RAID5, and RAID 6.
Specifically, the selecting a RAID level for data storage includes: if the state of the storage system is that no redundant storage space is configured or the redundant storage space is insufficient, selecting the RAID0 level; if the state of the storage system is single redundant storage space, determining two copies of RAID1 or RAID5 according to the write performance determined by the data length; if the state of the storage system is double redundant storage space, determining three-copy RAID1 or RAID6 according to the write performance determined by the data length; the redundant storage space refers to a mirror image copy storage space or a check storage space.
Specifically, the executing the sub-request further includes: and recording the corresponding relation between the logic address written by the data and the physical address of the storage space.
Specifically, the physical disk of the storage system is divided into a plurality of storage blocks with equal storage size.
Specifically, the method further comprises data migration, and the steps comprise: reading data from the storage space, and reorganizing the data according to a stripe relation; distributing new storage space for the organized data according to corresponding RAID level, writing the data, updating the corresponding relation between the logic address written in the data and the physical address of the storage space, and releasing the occupied storage space before migration.
The present invention also provides a storage system comprising: RAID deploys module, data write-in module and disk array, wherein: the RAID deployment module is used for receiving a data writing request and selecting the RAID level of data storage according to the data corresponding to the writing request and the state of the storage system; the data writing module is used for allocating storage space according to the RAID level of data storage, determining the stripe relation of the storage group, and splitting the writing request into a plurality of sub-requests according to the mapping relation between the stripes and the storage blocks; executing the sub-request to finish data writing; in the disk array, a physical disk is divided into a plurality of storage blocks, the plurality of storage blocks from different physical disks are configured into storage groups according to a storage structure corresponding to the RAID level, and the plurality of storage groups are configured into RAID storage groups of corresponding RAID levels.
Specifically, the RAID deployment module is configured to select a RAID0 level if the state of the storage system is that a redundant storage space is not configured or is insufficient; if the state of the storage system is single redundant storage space, determining two copies of RAID1 or RAID5 according to the write performance determined by the data length; if the state of the storage system is double redundant storage space, determining three-copy RAID1 or RAID6 according to the write performance determined by the data length; the redundant storage space refers to a mirror image copy storage space or a check storage space.
Specifically, the system comprises a space management module, which is used for allocating a storage space and recording the corresponding relation between the logical address of data writing and the physical address of the storage space.
Specifically, the system comprises a data migration module, a data storage module and a data processing module, wherein the data migration module is used for reading data from a storage space and reorganizing the data according to a stripe relationship; distributing storage space for the organized data according to corresponding RAID levels, and writing the data; the space management module is used for recording the corresponding relation between the logical address written in the data and the physical address of the storage space, and updating and releasing the free storage space.
Has the advantages that: compared with the prior art, the invention has the following remarkable advantages: data redundancy is maintained while still providing high performance data writing.
Drawings
FIG. 1a is a schematic diagram of a RAID6 capitalization mode.
FIG. 1b is a schematic diagram of a RAID6 low write mode.
Fig. 2a is a schematic of the capitalization mode of degraded stripes.
Fig. 2b is a schematic diagram of a lower case approach to destaging stripes.
Fig. 3 is a schematic structural diagram of a storage system provided in the present invention.
Fig. 4 is a schematic diagram of a data mapping relationship provided by the present invention.
FIG. 5 is a schematic diagram of a data migration method provided by the present invention.
FIG. 6 is a hardware schematic of a storage system provided by the present invention.
Detailed Description
The technical scheme of the invention is further explained by combining the attached drawings.
Before explaining the scheme provided by the invention in detail, related terms and principles related to the invention are briefly explained.
Strip: the RAID is composed of a plurality of disks, and the stripe technique stores data in a distributed manner in the plurality of disks in a block manner, so that the data can be concurrently processed. Thus, data can be written and read on a plurality of disks simultaneously, and the I/O performance is well expanded.
RAID 0: the method is a simple data striping technology without data redundancy, the data is stored in all the disks in a scattered manner, and concurrent reading and writing of a plurality of disks are realized in an independent access manner, so that the performance of multiple bandwidth is realized, and the reading and writing speed is the fastest one in all RAID levels. However, RAIDO has no redundant information such as mirroring and checking, so that the function of data protection cannot be provided, and once a disk is damaged, all data is lost.
Mirroring RAID: the mirror RAID striping technique writes data to multiple disks in complete consistency based on the number of copies of the data. Mirrored RAID implements data redundancy by sacrificing some storage space. If the number of mirror image copies is 2, the overall space utilization rate is only 50%. Mirrored RAID provides good data protection despite its low space utilization. One disk is damaged, data loss cannot be caused, and the influence on the read-write performance of the data is small.
RAID5 and RAID 6: the two RAID levels are obtained by encoding and calculating data on the same stripe according to a certain format, and then writing the data into a corresponding data disk, and writing the check information into the check disk. RAID5 has only one parity disk and can tolerate storage pools damaging one disk. RAID6 has two parity disks and can tolerate damage to both disks. In general, when configuring storage pools, data disks are configured to be a power of 2, such as 4+1, which represents a RAID5 storage pool of 4 data disks and 1 parity disk; and 4+2, a RAID6 storage pool representing 4 blocks of data disks, 2 blocks of parity disks. RAID5 and RAID6 have read performance with as high bandwidth as RAID0 and RAID1 when there is no disk corruption. However, since the check data needs to be calculated when data is written, the write performance is greatly affected. And if the failed disk exists on the RAID5 and RAID6 stripes, the read-write performance of the data is greatly influenced. The calculation of the check data generally has two modes of upper case and lower case, and in order to explain the influence of different writing modes on the performance, the following is a brief introduction to the read-write principle of upper case, lower case and the disk with a fault in combination with the attached drawings.
FIG. 1a is a schematic diagram of a 4+2 stripe capitalization mode of RAID 6; FIG. 1b is a schematic diagram of a 4+2 small write approach to RAID 6. Specifically, as shown in fig. 1a and fig. 1b, when writing new data into the stripe D1, in order to calculate new parity values P and Q of the stripe, the new parity values P and Q may be implemented by using a capitalization mode or a lowercase mode, where the capitalization mode requires that data of D2, D3, and D4 are read in advance, and then the parity values P and Q are calculated according to RAID6, so that new P1 ═ new D1^ D2^ D3^ D4 is obtained; new Q1 ═ k 1^ New D1^ k 2^ D2^ k 3^ D3^ k4 ^ D4. After the computation is completed, NewD1 and NewP1 and NewQ1 are written to the stripe, completing the data write. The small-writing mode needs to read out data of D1 and P and Q in advance, and then New P and Q can be calculated according to the equivalent equation of RAID6 capitalization, namely New P1 ^ New D1^ D1^ P1, New Q1 ═ k 1^ New D1^ k 1^ D1^ Q1.
Fig. 2 is a schematic diagram illustrating a principle of writing data into a 4+2 stripe failed disk of RAID6, where there are two cases, fig. 2a shows that newly written data happens to fall on the failed disk, and in this scenario, only the caps writing mode can be used; fig. 2b shows that the newly written data falls on other normal disks, and in this scenario, the new data can only be implemented in a small write mode.
According to the principle of RAID6, the two check disks are provided, so that damage of the two disks can be tolerated at the same time, and the reliability of user data can be protected to a greater extent while the performance and the space rate of the disks are considered. However, whether the data is written in an uppercase mode or a lowercase mode, new check data cannot be calculated by pre-reading old data on a data disk or a check disk, and the new data needs to be written into the check disk every time the new data is written, and the extra pre-reading and pre-writing check disks are write penalties of RAID5 and RAID 6. The greater the number of write penalties, the greater the impact on performance. In addition, according to the data writing method of RAID5 or RAID6, written data will be distributed on different disks, and once a write error occurs in a certain disk during writing and writing succeeds in other disks, the data of the whole stripe will be destroyed, and correct data cannot be calculated by P or Q, which is a problem of non-uniform updating.
Referring to fig. 3, the present invention provides a data writing method of a memory system, including: receiving a data writing request, and selecting a RAID level of data storage according to data corresponding to the writing request and the state of a storage system; the physical disk of the storage system is divided into a plurality of storage blocks, the plurality of storage blocks from different physical disks are configured into storage groups according to the storage structures corresponding to the RAID levels, and the plurality of storage groups are configured into RAID storage groups of corresponding RAID levels; allocating a storage space according to the RAID level of data storage, determining the stripe relation of a storage group, and splitting a write request into a plurality of sub-requests according to the mapping relation between the stripes and the storage blocks; and executing the sub-request to finish data writing.
In the embodiment of the invention, the RAID level of the configuration of the storage system comprises at least one of RAID0, RAID1, RAID5 and RAID 6.
In a specific implementation, part or all of the storage resources in the system may be selected to create a storage pool, and a data redundancy mode may be configured for the storage pool, for example, a data redundancy mode may be configured in a 4+2 mode, which means that the storage system has dual redundancy on the same stripe, and allows two disks to be damaged simultaneously.
In the embodiment of the invention, the physical disk of the storage system is divided into a plurality of storage blocks with equal storage size.
In a specific implementation, each physical disk in the storage pool is divided according to a fixed size, and all the physical disks are divided into equal-size storage blocks (chunks). The fixed size can be set according to actual needs, and is not particularly limited. All the storage blocks of the physical disk segmentation are virtualized into a storage pool for subsequent space management allocation.
In a particular implementation, space management modules of different RAID levels are deployed according to a redundancy pattern (redundant storage space). For example, configured in a 4+2 redundancy mode, the following RAID levels may be deployed: RAID 0; two-copy RAID 1; three copies of RAID 1; RAID 5; RAID 6. Wherein RAID0 is used for data writes when the entire storage system is in a non-redundant disk scenario; the two-copy RAID1 and RAID5 are used for data writing in the case where the entire storage system has only one redundant disk, and more specifically, the two-copy RAID1 is used for small-block data writing, and the RAID6 is used for large-block data writing. In the practical implementation process, several RAID levels or all RAID levels may be selectively deployed, and according to the actually deployed RAID levels, one of the RAID levels with the highest performance is selected to complete the data writing.
In particular implementations, storage blocks from different disks are grouped into RAID storage Groups (Chunk RAID Groups) according to a redundancy scheme. Taking RAID6 with a 4+2 redundancy mode as an example, it is necessary to select one storage block from 6 different physical disks to form a storage Group (Chunk Group), so that data can fall on the 6 different physical disks, and it is ensured that when two disks fail, normal reading and recovery of data can still be guaranteed. The plurality of storage groups constitute a RAID storage group of the RAID level.
In a specific implementation, a storage group in a RAID storage group is further divided into smaller storage Blocks (Blocks) of finer granularity, and the small storage Blocks from different storage Blocks of the same storage group constitute a stripe.
In a particular implementation, one or more stripes are the basic unit of storage data for a logical storage unit (LUN). The LUN is a storage unit which can be directly mapped to a host to realize data reading and writing, and when a reading and writing request of a user is processed and data migration is carried out, the LUN applies space, releases space and carries out data migration to a storage system by taking a stripe of a space management module as a unit.
Referring to fig. 4, in the storage system with three copies of RAID1 and RAID6, a logical storage unit LUN receives a host data write request, selects an appropriate space management module to allocate a storage space according to the length of data write and the current state of the storage system, and records the mapping from the logical address to the physical address of the LUN after the data write is completed. The space management module acquires storage blocks from different disks in the storage pool, forms a storage group according to RAID level, further divides the storage group into smaller storage blocks with finer granularity, and distributes the smaller storage blocks to LUNs. The space management module manages the free space and maintains the mapping relation between the storage groups and the storage blocks of the physical disks. The physical disk storage pool is responsible for dividing the physical disks into storage blocks, and allocating and maintaining the use condition of the storage block space of each disk.
In a specific implementation, a data write request is received from a host, where the write request includes a starting logical address LBA of a write LUN and a data length to be written. Since the minimum unit of space management allocation and release is the small memory block defined by the memory system, before allocating space, it is checked whether the host write request is B1ock aligned, if the logical address and the data length are not aligned, it is necessary to perform pre-read completion at the head and tail of the write request to ensure the integrity of the write data.
In the embodiment of the invention, if the state of the storage system is that no redundant storage space is configured or the redundant storage space is insufficient, the RAID0 level is selected; if the state of the storage system is single redundant storage space, determining two copies of RAID1 or RAID5 according to the write performance determined by the data length; if the state of the storage system is double redundant storage space, determining three-copy RAID1 or RAID6 according to the write performance determined by the data length; the redundant storage space refers to a mirror image copy storage space or a check storage space.
In a particular implementation, it is illustrated assuming that a 4+2 redundancy scheme is created in which the storage pool is configured as RAID6, and all RAID levels are deployed. If the system is in a non-redundant state, directly allocating storage space from a RAID0 space management module; if the system only has a single redundancy state currently, whether the storage space is allocated from the two-copy RAID1 or the RAID5(4+1) space management module is further determined according to the data length of the write request, and the specific judgment conditions are as follows: if the length of the write data is less than 4 Blocks, then storage space is allocated from the two-copy RAID1, otherwise, from RAID 5. Taking the length of written data as 1 Block as an example, under the condition of ensuring equal data redundancy, according to the principle of two-copy RAID1 and RAID5, the number of times of writing is 2 for two-copy RAID1, and RAID5 needs to read 3 blocks of disks in advance and write 3 blocks of disks at least, so that the write amplification is 6, and the performance of allocating storage space from RAID1 is the highest. In other cases of allocating storage space, similarly, write amplification is calculated according to the storage pool disk configuration (2+2, 4+2, 8+2, or the like) and the written data length, a RAID level with higher write performance is selected according to the write amplification, and corresponding storage space is allocated.
In the embodiment of the invention, the corresponding relation between the logical address written by the data and the physical address of the storage space is recorded.
In specific implementation, according to the determined RAID level of the space management module and the allocated storage space, the stripe relationship is determined, and data writing of multiple copies is completed or data writing of the entire stripe is completed after the P and Q check codes are calculated. The space management module maintains the mapping relation between the RAID storage group and the physical disks, and the write-in request of the host is divided into different sub-requests according to the mapping relation between the stripes and the physical disks and is issued to each physical disk. The write address in the host write request is a logical address LBA, the storage space allocated by the space management module is a physical address PBA, and the size of the LBA and the size of the PBA are both aligned to the size of Block. Block is addressed in such a way that the upper 8 bits are used to indicate the Chunk RAID Group identity to which it belongs, and the lower 56 bits are used to indicate the offset within the RAID storage Group.
In a specific implementation, after all the split sub-requests are written, the space management module records the storage space allocated by the write request and manages the free space in the module, and the LUN layer of the logical volume records the mapping relationship between the LBA and the PBA, thereby completing the write request.
In specific implementation, metadata of a storage system, such as a mapping relationship between a RAID storage group and a physical disk, a use condition of a physical disk space, a Block allocation use condition of a space management module, and a mapping relationship between a logical volume LUN layer LBA and a PBA, may have an independent storage medium, and a non-data structure may adopt a database or other customized data types.
As can be seen from the RAID implementation principle, the effective storage space of different RAID levels is very different, wherein the effective storage space of the two-copy RAID1 is only 50% of the total disk space, and the effective storage space of the three-copy RAID1 is only 33% of the total disk space. For a storage system configured as RAID6 of 4+2, its effective storage space is 66% of the total disk space. Therefore, the storage space of the disk can be fully utilized while ensuring the writing performance.
In the embodiment of the invention, the method also comprises data migration, and the steps comprise: reading data from the storage space, and reorganizing the data according to a stripe relation; and newly distributing storage space for the organized data according to the corresponding RAID level, writing the data, updating the corresponding relation between the logical address of the written data and the physical address of the storage space, and releasing the storage space occupied before migration.
In particular implementations, the data migration module may implement migrating user data from a RAID of a low space utilization level to a RAID of a high space utilization level. Referring to fig. 5, the schematic diagram takes the migration of the two-copy RAID1 to the 4+2 RAID6 as an example, in actual use, the redundancy may be increased or the effective storage space may be increased from the migration of RAID0, the migration of the three-copy RAID1, or the migration of RAID 5.
In specific implementation, when data migration starts, a Block list to be migrated is acquired from a RAID storage group to be migrated. The B1ock to be migrated refers to a storage space containing valid user data. The user data on these active storage spaces is read out and reorganized according to the 4+2 striping of RAID 6. And allocating a full-stripe storage space from a space management module corresponding to the RAID6, and calculating P and Q check codes of the stripe by using reorganized user data to finish data writing of a whole stripe. After the writing is completed, the data mapping relationship of the logical volume LUN needs to be updated first, and then the free space of the RAID6 space management module is updated and the storage space occupied by the two-copy RAID1 is released.
The present invention also provides a storage system comprising: RAID deploys module, data write-in module and disk array, wherein:
the RAID deployment module is used for receiving a data writing request and selecting the RAID level of data storage according to the data corresponding to the writing request and the state of the storage system;
the data writing module is used for allocating storage space according to the RAID level of data storage, determining the stripe relation of the storage group, and splitting the writing request into a plurality of sub-requests according to the mapping relation between the stripes and the storage blocks; executing the sub-request to finish data writing;
in the disk array, a physical disk is divided into a plurality of storage blocks, the plurality of storage blocks from different physical disks are configured into storage groups according to a storage structure corresponding to the RAID level, and the plurality of storage groups are configured into RAID storage groups of corresponding RAID levels.
The embodiment of the invention comprises a space management module which is used for allocating the storage space and recording the corresponding relation between the logical address written in the data and the physical address of the storage space.
The embodiment of the invention comprises a data migration module, a data storage module and a data processing module, wherein the data migration module is used for reading data from a storage space and reorganizing the data according to a stripe relation; distributing storage space for the organized data according to corresponding RAID levels, and writing the data; the space management module is used for recording the corresponding relation between the logical address written in the data and the physical address of the storage space, and updating and releasing the free storage space.
In the embodiment of the present invention, the RAID deployment module is configured to select a RAID0 level if the state of the storage system is that a redundant storage space is not configured or is insufficient; if the state of the storage system is single redundant storage space, determining RAID1 or RAID5 according to the write performance determined by the data length; if the state of the storage system is double redundant storage space, RAID6 is selected; the redundant storage space refers to a mirror image copy storage space or a check storage space.
In the embodiment of the present invention, the RAID deployment module is configured to select RAID1 when the data length is less than 4 small storage blocks; selecting RAID5 when the data length is more than or equal to 4 small storage blocks; the small storage blocks are data blocks with the minimum granularity supported by the storage system and are obtained by further dividing the storage groups.
Referring to fig. 6, the hardware of the storage system includes a storage system controller and a disk array, wherein the storage system controller is a dual controller architecture, and is backup and load sharing with each other. The disk array is a disk cabinet comprising a plurality of physical disks and is connected with the storage system controller through a system bus. The storage system controller 10 and the storage system controller 20 have the same structure and function, and the two controllers are backup and load sharing with each other, so that the safety and reliability of the storage system can be effectively ensured, and the write operation performance of the storage system can be ensured.
The disk array 30 includes a plurality of physical disks, and provides a physical storage space for the storage system. Can be various different storage media and can even be mixed and matched with different storage media. The storage system creates a storage pool based on the disk array and deploys a corresponding storage system controller.

Claims (10)

1. A data writing method of a storage system, comprising:
receiving a data writing request, and selecting a RAID level of data storage according to data corresponding to the writing request and the state of a storage system; the physical disk of the storage system is divided into a plurality of storage blocks, the plurality of storage blocks from different physical disks are configured into storage groups according to the storage structures corresponding to the RAID levels, and the plurality of storage groups are configured into RAID storage groups of corresponding RAID levels;
allocating a storage space according to the RAID level of data storage, determining the stripe relation of a storage group, and splitting a write request into a plurality of sub-requests according to the mapping relation between the stripes and the storage blocks;
and executing the sub-request to finish data writing.
2. The data writing method of the storage system according to claim 1, wherein the RAID level of the storage system configuration comprises at least one of RAID0, RAID1, RAID5, and RAID 6.
3. The data writing method of the storage system according to claim 2, wherein the selecting the RAID level for data storage comprises:
if the state of the storage system is that no redundant storage space is configured or the redundant storage space is insufficient, selecting the RAID0 level; if the state of the storage system is single redundant storage space, determining two copies of RAID1 or RAID5 according to the write performance determined by the data length; if the state of the storage system is double redundant storage space, determining three-copy RAID1 or RAID6 according to the write performance determined by the data length; the redundant storage space refers to a mirror image copy storage space or a check storage space.
4. The data writing method of the storage system according to claim 3, wherein the executing the sub-request further comprises:
and recording the corresponding relation between the logic address written by the data and the physical address of the storage space.
5. The data writing method of the storage system according to claim 4, wherein the physical disk of the storage system is divided into a plurality of storage blocks with equal storage size.
6. The data writing method of the storage system according to claim 5, further comprising data migration, the steps comprising:
reading data from the storage space, and reorganizing the data according to a stripe relation;
distributing new storage space for the organized data according to corresponding RAID level, writing the data, updating the corresponding relation between the logic address written in the data and the physical address of the storage space, and releasing the occupied storage space before migration.
7. A storage system, comprising: RAID deploys module, data write-in module and disk array, wherein:
the RAID deployment module is used for receiving a data writing request and selecting the RAID level of data storage according to the data corresponding to the writing request and the state of the storage system;
the data writing module is used for allocating storage space according to the RAID level of data storage, determining the stripe relation of the storage group, and splitting the writing request into a plurality of sub-requests according to the mapping relation between the stripes and the storage blocks; executing the sub-request to finish data writing;
in the disk array, a physical disk is divided into a plurality of storage blocks, the plurality of storage blocks from different physical disks are configured into storage groups according to a storage structure corresponding to the RAID level, and the plurality of storage groups are configured into RAID storage groups of corresponding RAID levels.
8. The storage system of claim 7, wherein the RAID deployment module is configured to select a RAID0 level if the state of the storage system is that no redundant storage space is configured or insufficient; if the state of the storage system is single redundant storage space, determining two copies of RAID1 or RAID5 according to the write performance determined by the data length; if the state of the storage system is double redundant storage space, determining three-copy RAID1 or RAID6 according to the write performance determined by the data length; the redundant storage space refers to a mirror image copy storage space or a check storage space.
9. The storage system according to claim 8, comprising a space management module for allocating the storage space and recording the correspondence between the logical address of the data write and the physical address of the storage space.
10. The storage system according to claim 9, comprising a data migration module for reading data from the storage space and reorganizing the data according to a stripe relationship; distributing storage space for the organized data according to corresponding RAID levels, and writing the data; the space management module is used for recording the corresponding relation between the logical address written in the data and the physical address of the storage space, and updating and releasing the free storage space.
CN202210091468.0A 2022-01-26 2022-01-26 Storage system and data writing method thereof Active CN114415968B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210091468.0A CN114415968B (en) 2022-01-26 2022-01-26 Storage system and data writing method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210091468.0A CN114415968B (en) 2022-01-26 2022-01-26 Storage system and data writing method thereof

Publications (2)

Publication Number Publication Date
CN114415968A true CN114415968A (en) 2022-04-29
CN114415968B CN114415968B (en) 2023-04-07

Family

ID=81277765

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210091468.0A Active CN114415968B (en) 2022-01-26 2022-01-26 Storage system and data writing method thereof

Country Status (1)

Country Link
CN (1) CN114415968B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024103901A1 (en) * 2022-11-16 2024-05-23 苏州元脑智能科技有限公司 Method and apparatus for allocating capacity space of raid, device and medium

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101196797A (en) * 2007-12-07 2008-06-11 华中科技大学 Memory system data arrangement and commutation method
CN101196799A (en) * 2008-01-09 2008-06-11 杭州华三通信技术有限公司 Magnetic disk redundant array and its controller and synchronization process
CN101369217A (en) * 2008-08-30 2009-02-18 成都市华为赛门铁克科技有限公司 RAID level transforming method and apparatus
CN101414273A (en) * 2008-11-28 2009-04-22 中国移动通信集团四川有限公司 Method for evaluating storage system RAID redundant data risk
CN101441553A (en) * 2008-12-18 2009-05-27 成都市华为赛门铁克科技有限公司 Method and apparatus for creating redundant space on magnetic disk
CN101510145A (en) * 2009-03-27 2009-08-19 杭州华三通信技术有限公司 Storage system management method and apparatus
CN101587425A (en) * 2009-06-16 2009-11-25 杭州华三通信技术有限公司 A kind of method and device that increases magnetic disc redundant array redundancy
CN101620517A (en) * 2009-08-04 2010-01-06 成都市华为赛门铁克科技有限公司 Data-writing method and data-writing device
CN102622189A (en) * 2011-12-31 2012-08-01 成都市华为赛门铁克科技有限公司 Storage virtualization device, data storage method and system
CN103049222A (en) * 2012-12-28 2013-04-17 中国船舶重工集团公司第七0九研究所 RAID5 (redundant array of independent disk 5) write IO optimization processing method
CN104267913A (en) * 2014-10-20 2015-01-07 北京北亚时代科技有限公司 Storage method and system allowing dynamic asynchronous RAID level adjustment
CN104615381A (en) * 2015-01-18 2015-05-13 浙江宇视科技有限公司 Redundancy array of independent disks of video monitoring system
CN105549902A (en) * 2015-12-08 2016-05-04 浪潮电子信息产业股份有限公司 Design scheme for automatically making RAID (redundant array of independent disk) during trial production of server
CN106371950A (en) * 2015-07-20 2017-02-01 中兴通讯股份有限公司 Method and device for achieving RAID level conversion
CN111857554A (en) * 2019-04-30 2020-10-30 伊姆西Ip控股有限责任公司 Adaptive change of RAID redundancy level

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101196797A (en) * 2007-12-07 2008-06-11 华中科技大学 Memory system data arrangement and commutation method
CN101196799A (en) * 2008-01-09 2008-06-11 杭州华三通信技术有限公司 Magnetic disk redundant array and its controller and synchronization process
CN101369217A (en) * 2008-08-30 2009-02-18 成都市华为赛门铁克科技有限公司 RAID level transforming method and apparatus
CN101414273A (en) * 2008-11-28 2009-04-22 中国移动通信集团四川有限公司 Method for evaluating storage system RAID redundant data risk
CN101441553A (en) * 2008-12-18 2009-05-27 成都市华为赛门铁克科技有限公司 Method and apparatus for creating redundant space on magnetic disk
CN101510145A (en) * 2009-03-27 2009-08-19 杭州华三通信技术有限公司 Storage system management method and apparatus
CN101587425A (en) * 2009-06-16 2009-11-25 杭州华三通信技术有限公司 A kind of method and device that increases magnetic disc redundant array redundancy
CN101620517A (en) * 2009-08-04 2010-01-06 成都市华为赛门铁克科技有限公司 Data-writing method and data-writing device
CN102622189A (en) * 2011-12-31 2012-08-01 成都市华为赛门铁克科技有限公司 Storage virtualization device, data storage method and system
CN103049222A (en) * 2012-12-28 2013-04-17 中国船舶重工集团公司第七0九研究所 RAID5 (redundant array of independent disk 5) write IO optimization processing method
CN104267913A (en) * 2014-10-20 2015-01-07 北京北亚时代科技有限公司 Storage method and system allowing dynamic asynchronous RAID level adjustment
CN104615381A (en) * 2015-01-18 2015-05-13 浙江宇视科技有限公司 Redundancy array of independent disks of video monitoring system
CN106371950A (en) * 2015-07-20 2017-02-01 中兴通讯股份有限公司 Method and device for achieving RAID level conversion
CN105549902A (en) * 2015-12-08 2016-05-04 浪潮电子信息产业股份有限公司 Design scheme for automatically making RAID (redundant array of independent disk) during trial production of server
CN111857554A (en) * 2019-04-30 2020-10-30 伊姆西Ip控股有限责任公司 Adaptive change of RAID redundancy level

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024103901A1 (en) * 2022-11-16 2024-05-23 苏州元脑智能科技有限公司 Method and apparatus for allocating capacity space of raid, device and medium

Also Published As

Publication number Publication date
CN114415968B (en) 2023-04-07

Similar Documents

Publication Publication Date Title
JP5444464B2 (en) Storage system
US5315602A (en) Optimized stripe detection for redundant arrays of disk drives
US9684591B2 (en) Storage system and storage apparatus
US8762768B2 (en) Storage system for restoring data stored in failed storage device
US7831764B2 (en) Storage system having plural flash memory drives and method for controlling data storage
US6898668B2 (en) System and method for reorganizing data in a raid storage system
US6647460B2 (en) Storage device with I/O counter for partial data reallocation
US5566316A (en) Method and apparatus for hierarchical management of data storage elements in an array storage device
US8930745B2 (en) Storage subsystem and data management method of storage subsystem
US8291162B2 (en) Storage system
US20050050381A1 (en) Methods, apparatus and controllers for a raid storage system
CN104035830A (en) Method and device for recovering data
WO2010097832A1 (en) Storage system comprising raid group
US7062605B2 (en) Methods and structure for rapid background initialization of a RAID logical unit
US20080091916A1 (en) Methods for data capacity expansion and data storage systems
CN111090394A (en) Volume-level RAID-based magnetic array management method and device
CN101566930B (en) Virtual disk drive system and method
US7130973B1 (en) Method and apparatus to restore data redundancy and utilize spare storage spaces
CN114415968B (en) Storage system and data writing method thereof
US8832370B2 (en) Redundant array of independent storage
US11544005B2 (en) Storage system and processing method
JP3050169B2 (en) Disk array system
CN116401063A (en) RAID resource allocation method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant