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

Storage system and data writing method thereof Download PDF

Info

Publication number
CN114415968B
CN114415968B CN202210091468.0A CN202210091468A CN114415968B CN 114415968 B CN114415968 B CN 114415968B CN 202210091468 A CN202210091468 A CN 202210091468A CN 114415968 B CN114415968 B CN 114415968B
Authority
CN
China
Prior art keywords
storage
data
storage space
raid
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.)
Active
Application number
CN202210091468.0A
Other languages
Chinese (zh)
Other versions
CN114415968A (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 a stripe and a storage block; 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 Inexpensive disks), which is a Redundant Array of Inexpensive disks, is a data redundancy backup technology commonly used in current storage systems. According to different combination modes of the disks, the RAID can be divided into multiple levels such as RAID0, RAID1, RAID10, RAID3, RAID5, RAID6, and the like.
With the development of network technology and information processing technology, more and more physical disks are contained in a storage system, 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, so that the RAID is widely used in storage devices.
The storage system adopting the RAID6 has the problems of writing penalty and inconsistent data updating, and particularly when the storage system is degraded due to small data writing and disk faults, the writing penalty of the 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 the RAID level of data storage according to the 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 complete data writing.
Specifically, the RAID level of the storage system configuration includes at least one of RAID0, RAID1, RAID5, and RAID6.
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 RAID0 level; if the state of the storage system is a single redundant storage space, determining two copies of RAID1 or RAID5 according to the write-in performance determined by the data length; if the state of the storage system is a double-redundancy storage space, determining three-copy RAID1 or RAID6 according to the write-in 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 a 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 a double-redundancy storage space, determining three-copy RAID1 or RAID6 according to the write-in 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 migration 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.
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 RAID6 lower case schematic.
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.
RAID0: 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 excellent data protection despite its low space utilization. One disk is damaged, data loss cannot be caused, and the influence on the data reading and writing performance is small.
RAID5 and RAID6: 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 check disk and can tolerate the damage of one disk in a storage pool. And RAID6 has two check disks, and can tolerate damage to two disks at the same time. In general, when the storage pool is configured, the data disk is configured to be a power of 2, such as 4+1, which indicates a RAID5 storage pool of 4 data disks and 1 parity disk; and 4+2, which represents 4 blocks of data disks, 2 blocks of RAID6 storage pools of check disks. RAID5 and RAID6 have read performance with the same 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 significantly affected. And if the RAID5 and RAID6 strips have a fault disk, the influence on the data reading and writing performance is large. 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 4+2 stripe capitalization mode of RAID6; FIG. 1b is a schematic diagram of 4+2 lower case of RAID6. 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 write-over or write-down manner, where the write-over manner requires that data of D2, D3, and D4 are read out in advance, and then the parity values P and Q are calculated according to RAID6, so that NewP1= NewD1^ D2^ D3^ D4 can be obtained; newQ1= k1 × NewD1^ k 2^ D2^ k 3^ D3^ k4 ^ D4. After the calculation is completed, newD1 and NewP1 and NewQ1 are written into the stripe, and data writing is completed. The small-write 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 an 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 of a principle of writing data into a 4+2 failed disk of RAID6, where there are two cases, and 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 adopted; 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 the damage of the two disks can be simultaneously tolerated, 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 upper writing mode or a lower writing mode, new check data can be calculated only by pre-reading old data on a data disk or a check disk, and the check disk needs to be written every time new data is written, and the extra pre-reading and pre-writing check disks are write penalties of RAID5 and RAID6. 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 the writing process and writing succeeds in other disks, the data of the entire 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 present invention, the RAID level configured by the storage system includes at least one of RAID0, RAID1, RAID5, and RAID6.
In a specific implementation, a storage pool may be created by selecting some or all of the storage resources in the system, and a data redundancy mode may be configured for the storage pool, for example, the data redundancy mode may be configured in a 4+2 mode, which indicates 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 as 4+2 redundancy mode, the following RAID levels may be deployed: RAID0; two copies of RAID1; three copies of RAID1; RAID5; RAID6. Wherein RAID0 is used for data writing when the whole storage system is in a non-redundant disk scene; the two copies RAID1 and RAID5 are used for data writing in a scenario where the entire storage system has only one redundant disk, and more specifically, the two copies RAID1 are used for small block data writing, and 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 in the 4+2 redundancy mode as an example, it is necessary to select one storage block to form a storage Group (Chunk Group) from 6 different physical disks, 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 particular implementations, storage groups in a RAID storage group are further partitioned into smaller storage Blocks (Blocks) of finer granularity, where the smaller storage Blocks from different storage Blocks of the same storage group form 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 that can be directly mapped to a host to implement data read and write, and when a read and write request of a user is processed and data migration is performed, the LUN applies space, releases space, and performs data migration to a storage system all in units of a stripe of a space management module.
Referring to fig. 4, enumerating a 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 a logical address to a physical address of the LUN after the data write is completed. And 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 small storage blocks with finer granularity, and allocates the small storage blocks to the LUN. 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 redundant storage space is not configured or insufficient, RAID0 level is selected; if the state of the storage system is a single redundant storage space, determining two copies of RAID1 or RAID5 according to the write-in performance determined by the data length; if the state of the storage system is a double-redundancy storage space, determining three-copy RAID1 or RAID6 according to the write-in performance determined by the data length; the redundant storage space refers to a mirror copy storage space or a check storage space.
In a particular implementation, it is assumed that the pool of storage is created to be configured as a 4+2 redundancy mode for RAID6, and all RAID levels are deployed for illustration. If the system is in a non-redundant state currently, directly allocating a storage space from the RAID0 space management module; if the system only has a single redundancy state currently, whether the storage space is allocated from a two-copy RAID1 or a 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, the storage space is allocated from the two-copy RAID1, otherwise, the storage space is allocated from RAID 5. Taking the length of written data as 1 Block as an example, under the condition of ensuring the same 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 3 disks need to be read in advance and written in 3 blocks at least for RAID5, so the write amplification is 6, and the performance of allocating storage space from RAID1 is the highest. In the same way for other conditions of allocating storage space, write amplification is calculated according to the storage pool disk configuration (2 +2, 4+2 or 8+2, etc.) 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 LBA and PBA are aligned to the Block size. The Block is addressed in such a way that the upper 8 bits indicate the Chunk RAID Group id to which it belongs, and the lower 56 bits 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.
According to the implementation principle of RAID, the effective storage space of different RAID levels is greatly different, where the effective storage space of two copies of RAID1 is only 50% of the total disk space, and the effective storage space of three copies of RAID1 is only 33% of the total disk space. For the storage system of RAID6 configured as 4+2, the 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 the stripe relation; and newly allocating storage space for the organized data according to the corresponding RAID level, writing the data, updating the corresponding relation between the logical address for writing the 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 RAID6 with two copies of RAID1 migrated to 4+2 as an example, and in actual use, the redundancy may be increased or the effective storage space may be increased from the migration of RAID0, three copies of RAID1, or RAID5 storage spaces.
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 in these valid storage spaces are read out, and the user data is reorganized according to the stripe relationship of 4+2 of RAID6. And distributing 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 finished, firstly, the data mapping relation of the logical volume LUN needs to be updated, and then, the free space of the RAID6 space management module is updated and the storage space occupied by the two copies of 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 write-in request and selecting the RAID level of data storage according to the data corresponding to the write-in 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 a 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 a dual redundant storage space, selecting RAID6; the redundant storage space refers to a mirror copy storage space or a check storage space.
In the embodiment of the invention, the RAID deployment module is used for selecting RAID1 when the data length is less than 4 small storage blocks; when the data length is more than or equal to 4 small storage blocks, selecting RAID5; 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 (8)

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; if the state of the storage system is that redundant storage space is not configured or insufficient, selecting RAID0 level; if the state of the storage system is a single redundant storage space, determining two copies of RAID1 or RAID5 according to the write-in performance determined by the data length; if the state of the storage system is a dual-redundancy 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;
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 a stripe and a storage block;
and executing the sub-request to complete data writing.
2. The data writing method of the storage system according to claim 1, wherein the RAID level of the storage system configuration includes at least one of RAID0, RAID1, RAID5, and RAID6.
3. The data writing method of the storage system according to claim 2, wherein the executing the sub-request further comprises:
and recording the corresponding relation between the logical address written by the data and the physical address of the storage space.
4. The data writing method of the storage system according to claim 3, wherein the physical disk of the storage system is divided into a plurality of storage blocks with equal storage size.
5. The data writing method of the storage system according to claim 4, 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.
6. 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 write-in request and selecting the RAID level of data storage according to the data corresponding to the write-in request and the state of the storage system; if the state of the storage system is that redundant storage space is not configured or insufficient, selecting RAID0 level; if the state of the storage system is a single redundant storage space, determining two copies of RAID1 or RAID5 according to the write-in performance determined by the data length; if the state of the storage system is a double-redundancy storage space, determining three-copy RAID1 or RAID6 according to the write-in performance determined by the data length; the redundant storage space refers to a mirror image copy storage space or a check storage space;
the data writing module is used for allocating storage space according to the RAID level of data storage, determining the stripe relation of a storage group, and splitting a writing request into a plurality of sub-requests according to the mapping relation between a stripe and a storage block; 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.
7. The storage system according to claim 6, 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.
8. The storage system according to claim 7, 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 CN114415968A (en) 2022-04-29
CN114415968B true 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)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115639968B (en) * 2022-11-16 2023-02-28 苏州浪潮智能科技有限公司 Method, device, equipment and medium for allocating RAID (redundant array of independent disks) capacity space

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101196799A (en) * 2008-01-09 2008-06-11 杭州华三通信技术有限公司 Magnetic disk redundant array and its controller and synchronization process
CN101196797A (en) * 2007-12-07 2008-06-11 华中科技大学 Memory system data arrangement and commutation method
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
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 used for automatically making RAID (Redundant Array of Independent Disks) 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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102622189B (en) * 2011-12-31 2015-11-25 华为数字技术(成都)有限公司 The device of Storage Virtualization, date storage method and system

Patent Citations (14)

* 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
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 used for automatically making RAID (Redundant Array of Independent Disks) during trial production of server
CN111857554A (en) * 2019-04-30 2020-10-30 伊姆西Ip控股有限责任公司 Adaptive change of RAID redundancy level

Also Published As

Publication number Publication date
CN114415968A (en) 2022-04-29

Similar Documents

Publication Publication Date Title
JP5444464B2 (en) Storage system
US6647460B2 (en) Storage device with I/O counter for partial data reallocation
US6898668B2 (en) System and method for reorganizing data in a raid storage system
US7523356B2 (en) Storage controller and a system for recording diagnostic information
US5315602A (en) Optimized stripe detection for redundant arrays of disk drives
US9684591B2 (en) Storage system and storage apparatus
US8930745B2 (en) Storage subsystem and data management method of storage subsystem
US20080201392A1 (en) Storage system having plural flash memory drives and method for controlling data storage
US8291162B2 (en) Storage system
WO2009130848A1 (en) Storage system and method for controlling storage system
CN102508724B (en) Disk bad block processing method based on soft RAID (redundant array of independent disks)
CN104035830A (en) Method and device for recovering data
US7062605B2 (en) Methods and structure for rapid background initialization of a RAID logical unit
CN103699457A (en) Method and device for restoring disk arrays based on stripping
CN111090394A (en) Volume-level RAID-based magnetic array management method and device
CN102135862B (en) Disk storage system and data access method thereof
CN101566930B (en) Virtual disk drive system and method
CN114415968B (en) Storage system and data writing method thereof
US7130973B1 (en) Method and apparatus to restore data redundancy and utilize spare storage spaces
CN102147714A (en) Management method and management device of network storage system
CN111897676A (en) File backup method and device based on database index
CN113050892B (en) Method and device for protecting deduplication data
CN116069266B (en) Disk roaming control method, apparatus, device and computer readable storage medium
US11544005B2 (en) Storage system and processing method
US10719398B1 (en) Resilience of data storage systems by managing partial failures of solid state drives

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