Method and system for storing and obtaining data

A data storage system and data storage technology, applied in the computer field, can solve problems such as data loss, increase mirroring process, etc., and achieve the effect of simplifying design and not easy to lose

Active Publication Date: 2009-06-03
CHENGDU HUAWEI TECH
2 Cites 29 Cited by

AI-Extracted Technical Summary

Problems solved by technology

[0004] The inventor found that in the process of creating the present invention, in order to solve the data loss problem of the cache co...
the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Method used

Above-mentioned a kind of data acquisition method that the embodiment of the present invention three provides has been introduced, the embodiment of the present invention judges whether solid-state hard disk array stores required data, when solid-state hard disk array stores required data, directly from solid-state hard disk array Read the data, otherwise read the data from the local hard disk, so as to achieve the purpose of using the solid state disk array as a cache, so that the stored data is not easy to lose. In addition, using the SSD array as a cache can save the mirroring process and simplify the storage system design.
Above-mentioned a kind of data storage method that the embodiment of the present invention one provides has been introduced, the embodiment of the present invention writes data into solid-state hard disk array first, when the amount of data of solid-state hard disk array is greater than or equal to preset threshold value, then write The data is transferred to the local hard disk, so that the solid-state disk array can be used as a cache, so that the stored data is not easy to lose. In addition, using the SSD array as a cache can save the mirroring process and simplify the storage system de...
the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Abstract

The invention discloses methods and a system for storing and obtaining data, wherein the method for storing data includes the steps of: writting the data inputted by a host into a solid hard disk array; comparing whether the current data size of the solid hard disk array is larger than or is equal to a preset threshold value; and if so, transferring the data of the solid hard disk array into a local hard disc. The method for obtaining data includes the steps of: judging whether the solid hard disk array currently stores the required data or not; and if not, obtaining the required data from the local hard disc, or if so, obtaining the required data from the solid hard disk array. The embodiment of the invention guarantees that the data can not be easily lost, and reduces the complicated degree of a storage system.

Application Domain

Technology Topic

Image

  • Method and system for storing and obtaining data
  • Method and system for storing and obtaining data
  • Method and system for storing and obtaining data

Examples

  • Experimental program(4)

Example Embodiment

[0023] Example one:
[0024] See figure 1 , figure 1 This is a schematic flowchart of a data storage method provided in Embodiment 1 of the present invention. Such as figure 1 As shown, the method can include:
[0025] Step 101: Write the data input by the host into the solid-state hard disk array.
[0026] Among them, the solid-state hard disk array is composed of several rows and several columns of solid-state storage chips. Compared with the volatility of data in random access memory, solid-state hard disks are non-volatile. Even if the solid-state drive array loses power, the data stored will not be lost.
[0027] Step 102: Compare whether the current data volume of the solid-state hard disk array is greater than or equal to a preset threshold, and if so, transfer the data of the solid-state hard disk array to the local hard disk.
[0028] Wherein, the method for implementing step 102 may specifically include:
[0029] Count the current data volume of the solid-state drive array;
[0030] It is determined whether the current data volume of the solid-state hard disk array is greater than or equal to a preset threshold, and if so, the data of the solid-state hard disk array is transferred to the local hard disk.
[0031] Conversely, if it is determined that the current data volume of the solid-state hard disk array is less than the preset threshold, the data of the solid-state hard disk array is not transferred to the local hard disk.
[0032] The foregoing describes a data storage method provided in Embodiment 1 of the present invention. The embodiment of the present invention first writes data into the solid-state hard disk array, and when the data volume of the solid-state hard disk array is greater than or equal to a preset threshold, the data is transferred to Local hard disk, so as to achieve the purpose of using the solid-state hard disk array as a cache, so that the stored data is not easy to lose. In addition, using the solid-state hard disk array as a cache can save the mirroring process and simplify the storage system design.

Example Embodiment

[0033] Embodiment two:
[0034] See figure 2 , figure 2 This is a schematic flowchart of a data storage method provided in Embodiment 2 of the present invention. Such as figure 2 As shown, the method can include:
[0035] Step 201: Receive a data write request sent by the host, and schedule the data write request.
[0036] Among them, scheduling the data write request may specifically include:
[0037] Obtain the physical address of the SSD array according to the logical address of the SSD array carried in the data write request;
[0038] Sort the physical addresses of the SSD array in order of size.
[0039] The data write request is scheduled to facilitate writing the data input by the host into the solid state disk array in the order of physical addresses. Of course, the data write request can also be not scheduled, and the data input by the host can be directly written into the solid state disk array according to the physical address corresponding to the logical address of the solid state disk array carried in the request. The embodiments of the present invention are not limited herein.
[0040] Step 202: Write the data input by the host into the solid-state hard disk array.
[0041] The solid-state hard disk array is composed of several rows and several columns of solid-state storage chips. Compared with the volatile data of random access memory, solid-state hard disks are non-volatile. Even if the solid-state hard disk array is powered off, the stored data will not Lost.
[0042] Compared with the read and write performance of local hard disks, the read and write performance of the solid-state hard disk array is improved by at least ten times. For example, the read and write performance of a solid-state hard disk array based on the PCIE interface is even hundreds of times that of a local hard disk. Please refer to Table 1 and Table 2 below. Table 1 shows the performance indicators of a PCIE interface-based solid state drive; Table 2 shows the performance indicators of a local hard drive.
[0043] 4K random read IOPS 4K random write IOPS Sequential read MB/s Sequentially write MB/s 107,000 96,000 700 600
[0044] Table 1
[0045] 4K random read IOPS 4K random write IOPS Sequential read MB/s Sequentially write MB/s 241 179 66 52
[0046] Table 2
[0047] From the comparison of Table 1 and Table 2, it can be seen that the number of read and write (IOPS, I/O per second) operations per second performed by the PCIE interface-based solid-state hard disk array is hundreds of the number of read and write operations per second performed by the local hard disk. Times. It can be seen that the read and write performance of the SSD array based on the PCIE interface is much higher than that of the local hard disk. In the embodiment of the present invention, a part or all of the space can be divided from the SSD array as the system cache. As the SSD is non-volatile, the data written into the cache will not be lost even if the power is off. In addition, if there is a controller failure during writing to the SSD cache, since the host has not responded yet, when another controller takes over, the host will re-issue read and write requests, so no data loss will occur.
[0048] Step 203: Count the current data volume of the solid state disk array.
[0049] Among them, the actual current data volume of the solid state disk can be obtained by calculating the difference between the start physical address and the end physical address used to store data in the solid state disk array.
[0050] Step 204: Determine whether the current data volume of the solid-state hard disk array is greater than or equal to the preset threshold, if yes, go to step 205; otherwise, go to step 206.
[0051] Wherein, the preset threshold may be a set percentage of the capacity of the solid-state hard disk array, or may be a set physical address range. For example, the threshold can be preset to 80% of the capacity of the solid-state hard disk array. When the current data volume of the solid-state hard disk array occupies more than or equal to 80% of the total solid-state hard disk array capacity, the data of the solid-state hard disk array is transferred to the local hard disk;
[0052] Or, when the physical address range of the stored data exceeds the set physical address range, the data of the solid-state hard disk array is transferred to the local hard disk.
[0053] In addition to the threshold preset method, the embodiment of the present invention may also preset a time interval, and when the time interval is reached, the data of the solid-state hard disk array is transferred to the local hard disk.
[0054] Step 205: Transfer the data of the solid-state hard disk array to the local hard disk.
[0055] Because the SSD array acts as a cache, its capacity is smaller than that of a local hard drive. When the current data volume of the solid-state hard disk array is greater than or equal to the preset threshold, the data of the solid-state hard disk array needs to be transferred to the local hard disk in order to make room to continue to receive the data sent by the host.
[0056] Step 206: Do not transfer the data of the solid-state hard disk array to the local hard disk.
[0057] When the current data volume of the solid-state drive array is less than the preset threshold, it means that the solid-state drive array can still continue to store data sent by the host. In order to improve the performance of reading and writing, the data of the solid-state drive array may not be transferred to the local hard drive.
[0058] It should be noted that, for ease of description, this embodiment gives a specific preset threshold value. Those of ordinary skill in the art can understand that the preset threshold value can also take other values ​​in the range. This embodiment is here. Not limited.
[0059] The foregoing describes a data storage method provided in the second embodiment of the present invention. The embodiment of the present invention first writes data into the solid-state hard disk array, and when the data volume of the solid-state hard disk array is greater than or equal to the preset threshold, the data is transferred to Local hard disk, so as to achieve the purpose of using the solid-state hard disk array as a cache, so that the stored data is not easy to lose. In addition, using the solid-state hard disk array as a cache can save the mirroring process and simplify the storage system design.

Example Embodiment

[0060] Embodiment three:
[0061] See image 3 , image 3 This is a schematic flowchart of a data acquisition method provided in Embodiment 3 of the present invention. Such as image 3 As shown, the method can include:
[0062] Step 301: Determine whether the solid-state hard disk array currently stores the required data, if yes, execute step 302; if not, execute step 303.
[0063] Step 302: Obtain required data from the solid-state hard disk array.
[0064] Since the solid-state hard disk array is used as a part of the cache, its capacity is usually smaller than that of the local hard disk. When the current data volume of the solid-state hard disk array is greater than or equal to the preset threshold, the data of the solid-state hard disk array needs to be transferred to the local hard disk in order to make room to continue to receive the data sent by the host.
[0065] When the current data volume of the solid-state drive array is less than the preset threshold, it means that the solid-state drive array can still continue to store data sent by the host. In order to improve the performance of reading and writing, the data of the solid-state drive array may not be transferred to the local hard drive.
[0066] If it is judged that the solid-state hard disk array currently stores the required data, the required data can be directly called from the solid-state hard disk array, thereby increasing the speed of obtaining data.
[0067] Step 303: Obtain the required data from the local hard disk.
[0068] If it is judged that the SSD array does not currently store the required data, it means that the required data has been transferred to a local hard disk with a larger capacity than the SSD array. In order to obtain the required data, it needs to be obtained from the local hard disk.
[0069] According to the data acquisition method provided in the embodiment of the present invention, before step 301 is executed, the method may further include the following steps:
[0070] Receive the data read request sent by the host, and schedule the data write request.
[0071] Among them, scheduling the data read request may specifically include:
[0072] Obtain the physical address of the SSD array according to the logical address of the SSD array carried in the data read request;
[0073] Sort the physical addresses of the SSD array in order of size.
[0074] The data read request is scheduled to facilitate the host to read the SSD array in the order of physical addresses. Of course, the data read request may also not be scheduled, and the data can be directly read from the solid state hard disk array according to the physical address corresponding to the logical address of the solid state hard disk array carried in the read request of the host. The embodiments of the present invention are not limited herein.
[0075] The foregoing describes a data acquisition method provided in the third embodiment of the present invention. The embodiment of the present invention judges whether the solid-state hard disk array stores the required data. When the solid-state hard disk array stores the required data, the data is directly read from the solid-state hard disk array. , Otherwise read the data from the local hard disk, so as to achieve the purpose of the solid-state hard disk array as a cache, so that the stored data is not easy to lose. In addition, using the solid-state hard disk array as a cache can save the mirroring process and simplify the storage system design.
the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

no PUM

Description & Claims & Application Information

We can also present the details of the Description, Claims and Application information to help users get a comprehensive understanding of the technical details of the patent, such as background art, summary of invention, brief description of drawings, description of embodiments, and other original content. On the other hand, users can also determine the specific scope of protection of the technology through the list of claims; as well as understand the changes in the life cycle of the technology with the presentation of the patent timeline. Login to view more.
the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Similar technology patents

Resistance reduction mud and preparation method thereof

Owner:国网吉林省电力有限公司超高压公司 +2

Classification and recommendation of technical efficacy words

  • Simple design
  • Not easy to lose

Methods and apparatus for femoral and tibial resection

InactiveUS20050055028A1Simple designPrecise and accurate in operationJoint implantsNon-surgical orthopedic devicesFemurCutting guide
Owner:PUGET BIOVENTURES
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products