WO2020103679A1 - 一种数据存储方法及装置 - Google Patents

一种数据存储方法及装置

Info

Publication number
WO2020103679A1
WO2020103679A1 PCT/CN2019/115215 CN2019115215W WO2020103679A1 WO 2020103679 A1 WO2020103679 A1 WO 2020103679A1 CN 2019115215 W CN2019115215 W CN 2019115215W WO 2020103679 A1 WO2020103679 A1 WO 2020103679A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
stored
storage
location
storage system
Prior art date
Application number
PCT/CN2019/115215
Other languages
English (en)
French (fr)
Inventor
闫海涛
林琳
张明谦
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP19887741.7A priority Critical patent/EP3869313A4/en
Publication of WO2020103679A1 publication Critical patent/WO2020103679A1/zh
Priority to US17/325,287 priority patent/US11550486B2/en

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/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • G06F3/0685Hybrid storage combining heterogeneous device types, e.g. hierarchical storage, hybrid arrays
    • 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/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • 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/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • G06F3/0605Improving or facilitating administration, e.g. storage management by facilitating the interaction with a user or administrator
    • 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
    • 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/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0647Migration mechanisms
    • 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/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0647Migration mechanisms
    • G06F3/0649Lifecycle management
    • 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

Definitions

  • This application relates to the field of storage technology, in particular to a data storage method and device.
  • storage systems using hierarchical storage technology usually scan the data stored in the entire storage system at intervals (for example, every other week) to determine whether the data stored in the storage system meets A preset hierarchical storage strategy (a hierarchical storage strategy, for example, storing data with a low access frequency in an HDD and storing data with a high access frequency in an SSD). If part of the data in the storage system does not satisfy the hierarchical storage strategy, for example, data block 1 is data with low access frequency, but stored in the SSD, you need to migrate the part of the data to the desired storage medium, ie, Move data block 1 to the HDD.
  • a preset hierarchical storage strategy a hierarchical storage strategy, for example, storing data with a low access frequency in an HDD and storing data with a high access frequency in an SSD.
  • the storage system After scanning the data stored in the entire storage system, if it is determined that a large amount of data needs to be migrated, the storage system needs to consume a lot of resources (for example, input / output (input / output, I / O) resources, etc.) The data that needs to be migrated is migrated to a desired storage medium, thereby reducing the storage performance of the storage system.
  • resources for example, input / output (input / output, I / O) resources, etc.
  • the present application provides a data storage method and device for improving storage performance of a storage system.
  • a data storage method which is applied to a storage system.
  • the first information includes the type of data to be stored, and the data to be stored
  • the second storage space, and finally, at least one data packet of the plurality of data packets to be stored is stored to the desired storage location.
  • the location where the data is expected to be stored has been determined based on the data type, name, and at least one of the user identification corresponding to the data and the strategy preset in the storage system And store the data package of the data to this location, so that the data does not need to be migrated later, which can reduce the amount of data that needs to be migrated, and naturally can reduce the storage system consumed during the data migration process.
  • the resources can improve the storage performance of the storage system.
  • the condition includes at least one of the following conditions:
  • the type of data to be stored is the same as the preset type
  • the name of the data to be stored is the same as the preset name
  • the user ID corresponding to the data to be stored is the same as the preset user ID.
  • the location where the data is expected to be stored can be determined in many different ways, which can increase the flexibility of the storage system.
  • the first information of the data to be stored is obtained to determine the expected storage location of the data to be stored That is to say, after determining the location where the data to be stored is expected to be stored, the data packet of the data to be stored is stored, so that when multiple data packets of the data to be stored are stored, each of the multiple data packets The data packet is stored to the determined desired storage location.
  • a part of the data packets of the data to be stored may be stored to a first location first, which is different from the desired location, for example, it may be preset by the storage system Location, and then obtain the first information of the data to be stored, and then determine the location of the data to be stored, and finally store the data packets of the plurality of data packets to be stored except for a part of the data packets stored in the first location To the desired storage location.
  • multiple data packets to store data are stored in different storage spaces.
  • a part of the data packet of the data is first stored in the default location, and then in the storage process, the location where the data is expected to be stored is determined, which can reduce the storage system storing data Response time.
  • the storage system because the data to be stored has already stored a part of the data package of the data to be stored to the desired storage location during storage, the storage system only needs to perform data migration for a part of the data package of the data to be stored, which can also reduce the need for data migration The amount of data can improve the storage performance of the storage system.
  • the storage system may also record the storage state of the data to be stored, the storage state includes a first storage state to store a plurality of data packets of the data to be stored to a desired storage location, and a storage state of the data to be stored Multiple data packets are stored in the first storage location and the second storage state of the desired storage location, and then, it can be determined whether data migration is required according to the acquired storage state of the data to be stored, for example, if the storage state of the data to be stored Indicating that the data to be stored is in the second storage state, the storage system may migrate a part of the data package of the data to be stored stored in the first location to a desired storage location, so that the storage system can determine the data storage status according to the storage status of the data to be stored Determining whether data migration is required can reduce the complexity of the scanning process.
  • the storage state of the data to be stored can also be adjusted from the second storage state to the first storage state. In this way, when the storage system scans again, the data to be stored can no longer be migrated.
  • a data storage device in a second aspect, includes a processor for implementing the method described in the first aspect above.
  • the data storage device may further include a memory for storing program instructions and data.
  • the memory is coupled to the processor, and the processor can call and execute program instructions stored in the memory for implementing any of the methods described in the first aspect above.
  • the data storage device may further include a communication interface, and the communication interface is used for the communication device to communicate with other devices.
  • it includes a communication interface and a processor, where:
  • the processor is configured to obtain first information of the data to be stored, the first information including at least one of the type of the data to be stored, the name of the data to be stored, and the user identification corresponding to the data to be stored;
  • the first information of the data to be stored and a preset strategy determine the desired storage location of the data to be stored, and the preset strategy is to determine the desired storage location as the first storage when the first information satisfies the condition Otherwise, determine that the desired storage location is the second storage space, the first storage space is the storage space in the storage system whose read-write performance is higher than or equal to the threshold, and the second storage space is the read-write performance in the storage system Storage space below the threshold;
  • the processor is further configured to store at least one data packet of the plurality of data packets of the data to be stored received through the communication interface to the desired storage location.
  • the condition includes at least one of the following conditions:
  • the type of the data to be stored is the same as the preset type
  • the name of the data to be stored is the same as the preset name
  • the user ID corresponding to the data to be stored is the same as the preset user ID.
  • the processor when the processor obtains the first information of the data to be stored, it is specifically used that any one of the plurality of data packets of the data to be stored received through the communication interface is not stored to Before the storage system, obtain the first information of the data to be stored;
  • the processor stores at least one data packet of the plurality of data packets to be stored received through the communication interface to the desired storage location, it is specifically used to store each of the plurality of data packets To the desired storage location.
  • the processor is further configured to store a part of the plurality of data packets of the data to be stored received through the communication interface to the first before acquiring the first information of the data to be stored A location where the first location is different from the desired storage location;
  • the processor stores at least one data packet of the plurality of data packets to be stored received by the communication interface to the desired storage location, it is specifically used to save the plurality of data packets except the part of the data packets The data packet is stored to the desired storage location.
  • the processor is further used to record the storage state of the data to be stored, the storage state includes a first storage state and a second storage state, the first storage state refers to the data to be stored The plurality of data packets are stored to the desired storage location.
  • the second storage state refers to the state of storing the plurality of data packets to be stored in the first location and the desired storage location respectively; Acquiring the storage state of the data to be stored; if the storage state of the data to be stored indicates that the data to be stored is in the second storage state, the part of the data packet of the data to be stored can be migrated from the first location to the desired The storage location, and adjust the storage state of the data to be stored from the second storage state to the first storage state.
  • a data storage device may be a storage system or a device in the storage system.
  • the data storage device may include a processing module and a communication module. These modules can perform any of the first aspect.
  • the processing module is configured to obtain first information of data to be stored, where the first information includes a type of the data to be stored, a name of the data to be stored, and a user ID corresponding to the data to be stored At least one piece of information; determining the desired storage location of the data to be stored according to the first information of the data to be stored and a preset strategy, where the preset strategy is determined when the first information satisfies the condition
  • the desired storage location is the first storage space, otherwise, it is determined that the desired storage location is the second storage space, and the first storage space is the storage space in the storage system whose read-write performance is higher than or equal to the threshold.
  • the second storage space is a storage space in the storage system whose read-write performance is lower than the threshold; the processing module is further used to store the data in the multiple data packets of the data to be stored received through the communication module At least one data packet is stored to the desired storage location.
  • an embodiment of the present application further provides a computer-readable storage medium, including instructions, which when executed on a computer, causes the computer to execute the method described in the first aspect.
  • an embodiment of the present application further provides a computer program product, including instructions, which, when run on a computer, cause the computer to execute the method described in the first aspect.
  • an embodiment of the present application provides a chip system.
  • the chip system includes a processor, and may further include a memory, for implementing the method described in the first aspect.
  • the chip system may be composed of chips, or may include chips and other discrete devices.
  • FIG. 1 is a schematic diagram of an example of a storage system provided in an embodiment of this application;
  • FIG. 2 is a flowchart of an example of a data storage method provided by an embodiment of this application.
  • FIG. 3 is a flowchart of another example of a data storage method provided by an embodiment of this application.
  • FIG. 4 is a flowchart of another example of a data storage method provided by an embodiment of this application.
  • FIG. 5 is a flowchart of another example of a data storage method provided by an embodiment of this application.
  • FIG. 6 is a flowchart of another example of a data storage method provided by an embodiment of this application.
  • FIG. 7 is a schematic structural diagram of an example of a data storage device provided by an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of another example of a data storage device provided by an embodiment of this application.
  • pluriality means two or more, and “plurality” may also be understood as “at least two”.
  • At least one can be understood as one or more, for example, as one, two or more, including at least one, means including one, two or more, and does not limit which is included For example, including at least one of A, B, and C, then including A, B, C, A, and B, A and C, B and C, or A and B and C.
  • “And / or” describes the association relationship of the associated objects, indicating that there can be three relationships, for example, A and / or B, which can indicate: there are three cases of A alone, B alone, and A and B at the same time.
  • the character "/" unless otherwise specified, generally indicates that the related object is a "or" relationship.
  • references to ordinal numbers such as “first” and “second” in this application are used to distinguish between multiple objects, and are not used to limit the order, timing, priority, or importance of multiple objects.
  • Hierarchical storage which means that the data is stored on storage media with different performances according to the data's importance, access frequency, attribute information, size and other indicators, and the data is implemented through hierarchical storage technology Automatic migration between storage media.
  • a storage system using hierarchical storage technology usually includes a variety of storage media with different performances, such as a serial advanced technology attachment (SATA) hard disk, a small computer system interface (SCSI) hard disk , Serial connection SCSI interface (serial attached SCSI, SAS), Fibre Channel interface (FC) hard disk and SSD, etc.
  • SATA serial advanced technology attachment
  • SCSI small computer system interface
  • SAS Serial connection SCSI interface
  • FC Fibre Channel interface
  • SSD Serial attached SCSI
  • the performance of these hard disks is good or bad: SATA hard disk ⁇ SCSI hard disk ⁇ SAS hard disk ⁇ FC hard disk ⁇ SSD.
  • a person skilled in the art may select storage media with different performances to form different storage systems according to actual use requirements, for example, a three-level storage system including three storage media with different performances, or a five-level storage system including five storage media with different performances Storage system, etc.
  • pre-set hierarchical storage strategies are stored, for example, hierarchical storage strategies that store important data on storage media with good performance and non-important data on storage media with poor performance, Alternatively, a hierarchical storage strategy for storing data with high access frequency on a storage medium with good performance and storing data with low access frequency on a storage medium with poor performance, etc., can be set by those skilled in the art according to usage requirements.
  • a storage system using a separate storage technology will store the data packet in a preset storage medium, which may be a performance in the storage system
  • a good storage medium is, for example, a SAS hard disk or SSD. Then, at regular intervals, the data stored in the entire storage system is scanned to determine a part of the data package that does not meet the preset tiered storage strategy, and the part of the data package is migrated to the desired storage medium.
  • the technical solutions in the embodiments of the present application are provided.
  • the technical solutions in the embodiments of the present application are applied to a storage system using hierarchical storage technology, and the storage system may be a file storage system, a block storage system, or an object storage system, or a combination of the above storage systems, which is not made in the embodiments of the present application limit.
  • FIG. 1 shows an example of a storage system involved in an embodiment of the present application.
  • the storage system includes a management unit 101 and two storage media with different performances, which are a first storage medium 102 and Second storage medium 103.
  • the management unit 101 is used to manage operation requests, such as processing write operation requests to write data to a storage medium, or processing read operation requests to obtain data from the storage medium, etc.
  • the management unit 101 may be a central processing unit Central processing unit (CPU), application-specific integrated circuit (ASIC) or field-programmable gate array (FPGA), etc.
  • CPU Central processing unit
  • ASIC application-specific integrated circuit
  • FPGA field-programmable gate array
  • the first storage medium 102 and the second storage medium 103 are used to store data, wherein the read and write performance of the first storage medium 102 is better than that of the second storage medium 103, for example, the first storage medium 102 may be an SSD or For the FC hard disk, the second storage medium 103 may be a SATA hard disk, a SAS hard disk, or a SCSI hard disk. Of course, it may also be another storage medium, which is not limited herein.
  • the storage space composed of at least one first storage medium 102 is called a first storage space 1021
  • the storage space composed of at least one second storage medium 103 is called a second storage space 1031.
  • the multiple first storage media 102 may form a storage array by coupling to provide services in collaboration, and the same is true for the second storage space 1031. , Will not repeat them here.
  • the storage system using hierarchical storage technology is not limited to the architecture shown in FIG. 1, for example, the storage system may include three or more storage media with different performances, for example, including four different performance storage media
  • the storage medium, or, the storage system may further include other devices, for example, a management device, etc.
  • the storage system described in the embodiments of the present application is to more clearly explain the technical solutions of the embodiments of the present application, and does not constitute an implementation of the present application.
  • a person of ordinary skill in the art may know that as the storage technology and storage system architecture evolve, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.
  • An embodiment of the present application provides a data storage method. Please refer to FIG. 2 for a flowchart of the method.
  • the method is applied to the storage system shown in FIG. 1 as an example, that is, the data storage method may be implemented in the storage system shown in FIG. 1 below.
  • the method may be performed by a communication device, where the communication device may be a server of the storage system or a communication device capable of supporting the storage system to realize the functions required by the method, and of course may be other communication devices, such as a chip system, in Therefore, the implementation of the communication device is not limited.
  • this method is performed by the management unit of the storage system as an example.
  • the storage system usually cooperates with other electronic devices to complete the data reading and writing process.
  • the other electronic devices may be servers, clients, etc., so that users can write on the other electronic devices.
  • Data operations write data to the storage system, or read data from the storage system through read data operations.
  • the following uses the other electronic device as a server as an example for description.
  • a data write operation may be performed, for example, write data A.
  • the server After the server detects the write data operation, it sends a write data request to the storage system.
  • the write data request can carry multiple data packets of data A.
  • the management unit of the storage system receives the write data request, it can Acquire multiple data packets of data A to be stored from the write data request.
  • the management unit of the storage system acquires the first information of the data to be stored.
  • the first information includes at least one information of the type of data to be stored, the name of the data to be stored, and the user identification corresponding to the data to be stored.
  • the manner in which the management unit of the storage system obtains the first information includes but is not limited to the following two types:
  • the first acquisition method :
  • the write data request sent by the server to the storage system may carry the first information, for example, description information of data A, and the description information may include the data type of data A (for example, RAR type, JPEG type, avi type, etc.), data Information such as the size of A (for example, 1M, 30kB, etc.), the name of data A (for example, photo1, JPG2, etc.), the user's identification (for example, the user's IP address, user's number, etc.) are not limited herein.
  • the management unit of the storage system can obtain the description information of the data A from the write data request.
  • the description information of the data A can be understood as the first information of the data to be stored (data A).
  • the management unit of the storage system can determine the data A based on the correspondence between the packet header characters and the data type, and the multiple data packet headers of data A type.
  • Table 1 for an example of the correspondence between the header characters and the data type, in which the header characters are expressed in hexadecimal numbers.
  • the header character is "52617221”
  • it indicates that the data type is RAR type
  • the header character is "504B0304”
  • the data type is ZIP type.
  • the type of data A is the first information.
  • the content of the first information is preset by the storage system or a technician.
  • the first information may be the type of data to be stored, the name of the data to be stored, and the user ID corresponding to the data to be stored.
  • the first The information may also only include the type of data to be stored, which is not limited here.
  • management unit of the storage system may also obtain the first information of the data to be stored in other ways, which is not limited herein.
  • the management unit of the storage system determines the desired storage location of the data to be stored according to the first information of the data to be stored and the preset strategy.
  • the preset strategy is: when the first information satisfies the condition, it is determined that the expected storage location of the data to be stored is the first storage space whose read-write performance is higher than or equal to the threshold, if the first If the information does not satisfy the condition, it is determined that the expected storage location of the data to be stored is the second storage space whose read and write performance is lower than the threshold.
  • the specific value of the threshold is not limited, or the first storage space with read and write performance higher than or equal to the threshold and the second storage space with read and write performance lower than the threshold can be understood as the first storage The read and write performance of the space is higher than the second storage space. Specifically to the storage system shown in FIG.
  • the first storage space may be understood as a storage space composed of at least one first storage medium
  • the second storage space may be understood as a storage space composed of at least one second storage medium.
  • the first storage space is SSD and the second storage space is HDD as an example.
  • the preset strategy will be described below.
  • the preset strategy may include but is not limited to the following three situations:
  • the preset strategy is: if the type of the data to be stored is the same as the preset type, determine that the expected storage location of the data to be stored is an SSD, otherwise determine that the expected storage location of the data to be stored is an HDD.
  • the preset type may be a RAR type.
  • the management unit of the storage system acquires the first information of data A
  • the type of data A is acquired from the first information.
  • the data A is of the JPEG type, and the storage system determines that the type of data A is not the RAR type, thereby determining the data A
  • the desired storage location is the HDD.
  • the preset strategy is: if the name of the data to be stored is the same as the preset name, it is determined that the expected storage location of the data to be stored is an SSD, otherwise it is determined that the expected storage location of the data to be stored is an HDD.
  • the preset name is a name beginning with photo.
  • the management unit of the storage system obtains the first information of the data A
  • the name of the data A is obtained from the first information, for example, the data A is JPEG2, and the storage system determines that the name of the data A does not start with photo, thereby determining the data A
  • the desired storage location is the HDD.
  • the preset strategy is: the user ID corresponding to the data to be stored is the same as the preset user ID, then it is determined that the expected storage location of the data to be stored is an SSD, otherwise, the expected storage location of the data to be stored is determined For HDD.
  • the preset user ID is ID1000.
  • the management unit of the storage system obtains the first information of the data A, the number of the user corresponding to the data A is obtained from the first information.
  • the number of the user corresponding to the data A is ID100, and the management unit of the storage system determines The user number corresponding to the data A is different from the preset user ID, so that the location where the data A expects to be stored is determined to be the HDD.
  • the preset strategy may be a combination of at least two of the above three cases.
  • the preset strategy may be a combination of the first case and the second case above, or the preset strategy may be a combination of the above three cases, etc.
  • the storage system ’s The process for the management unit to determine the desired storage location of the data to be stored is similar to any of the above three cases, and will not be repeated here.
  • the storage system can determine the expected storage location of the data to be stored according to the relevant information of the data to be stored, this can avoid that the data with high read and write performance requirements for the storage space is stored in the storage space with low read and write performance by default and cannot be It satisfies the problem of data requirements, and can avoid the problem of wasting data with low read and write performance requirements on storage space into storage space with high read and write performance and wasting storage resources with high read and write performance.
  • the management unit of the storage system stores each data packet of the plurality of data packets to be stored to a desired storage location.
  • each received data packet of the data to be stored is stored to the desired storage location, for example, it is determined that the desired storage location of data A is the HDD , Multiple data packets included in data A are stored in the HDD. Since the data to be stored is stored in the desired storage location, when the management unit of the storage system scans all the stored data to determine whether data migration is required, the data is already in the target location, so there is no need for the data Performing migration can reduce the amount of data that needs to be migrated and the storage system resources consumed during the data migration process.
  • the management unit of the storage system records the storage state of the data to be stored as the first storage state.
  • the storage state includes a first storage state (which may also be referred to as a state that does not require migration) to store a plurality of data packages of data to be stored to its desired storage location, and a plurality of data to be stored A part of the data packet is stored in a desired storage location and another part of the data packet is stored in a second storage state (also referred to as a state requiring migration) in a first location different from the desired storage location.
  • a first storage state which may also be referred to as a state that does not require migration
  • a part of the data packet is stored in a desired storage location and another part of the data packet is stored in a second storage state (also referred to as a state requiring migration) in a first location different from the desired storage location.
  • the desired storage location is the first storage space with high read and write performance
  • the first location is the second storage space with low read and write performance
  • the desired storage location is the second storage space with low read and write performance
  • the first location is the first storage space with higher read and
  • the management unit of the storage system may record the storage state of the data A as the first storage state.
  • the storage system may include a dedicated space dedicated to recording the storage state of the data.
  • the dedicated space may be reserved in the first storage space or the second storage space.
  • the storage status of each data corresponds to one of the bits. When the value of the bit is 0, it indicates that the storage status of the data corresponding to the bit is no migration When the value of the bit is 1, it indicates that the storage state of the data corresponding to the bit is a state that needs to be migrated.
  • the management unit of the storage system sets the value of the first bit in the dedicated space Is 0.
  • the storage state can also be recorded in other ways, which is not limited here.
  • S24 and S25 are not limited, that is, S24 may be executed before S25, S25 may be executed before S24, or S24 and S25 may be executed simultaneously.
  • S24 is executed first and then S25 is taken as an example.
  • the management unit of the storage system acquires the storage state of the data to be stored.
  • Storage systems that use hierarchical storage technology regularly scan the data stored in the storage system to determine whether data migration is required.
  • the management unit of the storage system since the management unit of the storage system records the storage state of each data, for example, the storage state of each data is stored in a dedicated space for recording the storage state, so that the management unit of the storage system It can be determined whether data migration is required according to the storage state of the data recorded in the dedicated space, which can reduce the scanning time and reduce the resources consumed by the scanning.
  • data A is the first data stored in the storage system
  • the management unit of the storage system obtains the value of the first bit in the dedicated space for recording the storage state, and the value of the first bit The value is 0.
  • the management unit of the storage system determines that there is no need to migrate the data to be stored.
  • the management unit of the storage system determines that the value of the first bit corresponding to data A is 0 in the dedicated space for recording the storage state, so that the management unit determines that data A is not required according to the correspondence between the value of the bit and the storage state Perform the migration.
  • the storage system since the data to be stored has been stored to the desired storage location during storage, the storage system no longer needs to migrate the data, which can reduce the amount of data that needs to be migrated, and thus can reduce the resources consumed by the data migration process To improve the storage performance of the storage system.
  • the storage system can omit the process of scanning the data and determining the data that needs to be migrated, which can improve the storage performance of the storage system.
  • the storage system determines the location where the data is expected to be stored before storing the data, and then stores the data to the location where it is expected to be stored. Since the storage system determines that the location where the data is expected to be stored needs to consume a certain amount Time, therefore, in order not to affect the response speed of the storage system when storing data, please refer to FIG. 3, which is a flowchart of another example of a data storage method provided by the present application.
  • the method is applied to the storage system shown in FIG. 1 as an example, that is, the data storage method may be implemented in the storage system shown in FIG. 1 below.
  • the method may be performed by a communication device, where the communication device may be a server of the storage system or a communication device capable of supporting the storage system to realize the functions required by the method, and of course may be other communication devices, such as a chip system, in Therefore, the implementation of the communication device is not limited.
  • this method is performed by the management unit of the storage system as an example.
  • the other electronic device may be a server, a client, etc.
  • another electronic device is used as a server as an example.
  • S31 is similar to S21 and will not be repeated here.
  • the management unit of the storage system stores a part of the multiple data packets of the data to be stored to the first location.
  • the first location is a default location of the storage system, that is to say, the management unit of the storage system stores at least a part of the received data packets of each data to the first location.
  • the first location may be the first storage space or the second storage space, and those skilled in the art may There is no limit to the use requirements.
  • the first storage space is SSD
  • the second storage space is HDD
  • the first location is HDD as an example.
  • the data to be stored is data A
  • data A includes 10 data packets.
  • the management unit of the storage system obtains the 10 data packets of data A according to the server's write data request, the 10 data packets are sequentially written into the storage space in the storage system.
  • the management unit of the storage system can use the data packets as Unit, write the 10 data packets one by one, that is to say, after writing the first data packet to HDD, then write the second data packet to HDD.
  • the management unit of the storage system can also split the data packet into multiple data blocks, and then write the 10 data packets one by one in units of data blocks, for example, the management unit of the storage system splits each data packet Into 3 data blocks, then write the 3 data blocks corresponding to the first data packet to the HDD, and then write the 3 data blocks corresponding to the second data packet to the HDD.
  • the management unit of the storage system acquires the first information of the data to be stored.
  • the management unit of the storage system After the management unit of the storage system writes a part of the data packet of the data to be stored into the HDD, the management unit of the storage system obtains the first information of the data to be stored.
  • the content of the first information and the method of acquiring the first information are the same as those in S22, and will not be repeated here.
  • the management unit of the storage system determines the desired storage location of the data to be stored according to the first information of the data to be stored and a preset strategy.
  • S34 is similar to S23 and will not be repeated here.
  • the desired storage location determined by the management unit of the storage system may be the same as the first location, or may be different from the first location. For example, if the management unit of the storage system determines that the desired storage location is the HDD, the desired storage location is the same as the first location. If the management unit of the storage system determines that the desired storage location of the data to be stored is the SSD, the desired storage location is The first position is different. In the embodiment of the present application, an example where the desired storage location is the same as the first location is used as an example for description.
  • the management unit of the storage system stores each data packet of the plurality of data packets to be stored in the first location.
  • the management unit of the storage system records the storage state of the data to be stored as the first storage state.
  • the management unit of the storage system acquires the storage status of the data to be stored.
  • the management unit of the storage system determines that there is no need to migrate the data to be stored.
  • S35 ⁇ S38 are similar to S24 ⁇ S27, and will not be repeated here.
  • S36 ⁇ S38 are optional steps, that is not necessary to be executed.
  • the storage system after acquiring the data to be stored, the storage system first stores a part of the data packet to the default location, and then determines the location where the data is expected to be stored during the storage process, which can reduce the storage system Response time when storing data.
  • FIG. 3 introduces an example of determining the expected storage location of data during the storage process and the expected storage location is the same as the first location.
  • the example where the stored position is different from the first position will be described.
  • FIG. 4 is a flowchart of another example of the data storage method provided by the present application.
  • the method is applied to the storage system shown in FIG. 1 as an example, that is, the data storage method may be implemented in the storage system shown in FIG. 1 below.
  • the method may be performed by a communication device, where the communication device may be a server of the storage system or a communication device capable of supporting the storage system to realize the functions required by the method, and of course may be other communication devices, such as a chip system, in Therefore, the implementation of the communication device is not limited.
  • this method is performed by the management unit of the storage system as an example.
  • the management unit of the storage system stores a part of the multiple data packets of the data to be stored to the first location.
  • the management unit of the storage system acquires the first information of the data to be stored.
  • the management unit of the storage system determines the desired storage location of the data to be stored according to the first information of the data to be stored and a preset strategy.
  • S41 to S44 are similar to S31 to S34, and will not be repeated here.
  • the management unit of the storage system stores the remaining data packets of the plurality of data packets to be stored except the part of the data packets to the desired storage location.
  • the management unit of the storage system stores the first 2 data packets of data A to the first location, that is, to the HDD.
  • the management unit of the storage system determines that the location where data A is expected to be stored is an SSD, which is different from the first location, the management unit of the storage system stores the remaining 8 data packets of data A to the SSD.
  • the management unit of the storage system records the storage state of the data to be stored as the second storage state.
  • the management unit of the storage system Since a part of the data packets of the data A are stored in the HDD and another part of the data packets are stored in the SSD, the management unit of the storage system records the storage state of the data A as the second storage state requiring data migration.
  • the management unit of the storage system acquires the storage status of the data to be stored.
  • S47 is similar to S26 and will not be repeated here.
  • the management unit of the storage system determines that the data to be stored needs to be migrated, and migrates the part of the data packet of the data to be stored from the first location to a desired storage location.
  • the management unit of the storage system acquires the storage state of the data to be stored (data A) as the second storage state, and then determines that the data to be stored needs to be migrated to store the data A in the first location A part of the data package is migrated to the location where data A is expected to be stored.
  • the management unit of the storage system adjusts the storage state of the data to be stored from the second storage state to the first storage state.
  • the management unit of the storage system updates the storage status of the data to the first storage status.
  • S46 to S49 are optional steps, that is, they are not required to be executed.
  • the data stored in the file storage system is divided into two types, one is called data, and the other is metadata.
  • Data can be understood as the actual data in the file.
  • the file is a picture
  • the actual data of the file is information including people, animals, and environment in the picture
  • metadata is used to describe the attribute information of a file.
  • Data for example, the access rights of the file, the owner of the file, and the storage location of the file. If the user needs to operate on the file in the file storage system, he first needs to obtain the metadata of the file, and then he can locate the location of the file according to the metadata and obtain the actual data in the file.
  • the management of metadata can be divided into two types: centralized management and distributed management.
  • Centralized management refers to a storage space set in the file system, dedicated to storing metadata of all files, such as ,
  • the metadata of all files are stored on the SSD, which can facilitate the management of the files in the file storage system.
  • Distributed management refers to storing metadata in any storage space of the file system. For example, metadata can be stored with each file. If the file is stored on the HDD, the metadata of the file is also stored on the HDD. If the file is stored on the SSD, the metadata of the file is also stored on the SSD. In this way, by distributing the responsibility for metadata management to different storage spaces, it can avoid the storage space for storing metadata in the centralized management method. After the fault, the entire file storage system becomes unusable.
  • the method is applied to the storage system shown in FIG. 1 as an example, that is, the data storage method may be implemented in the storage system shown in FIG. 1 below.
  • the method may be performed by a communication device, where the communication device may be a server of the storage system or a communication device capable of supporting the storage system to realize the functions required by the method, and of course may be other communication devices, such as a chip system, in Therefore, the implementation of the communication device is not limited.
  • the method is executed by the management unit of the storage system and the storage system is a file storage system as an example.
  • S51 is similar to S21 and will not be repeated here.
  • the management unit of the file storage system obtains the first information of the file to be stored.
  • the management unit of the file storage system determines the expected storage location of the file to be stored according to the first information of the file to be stored and the preset strategy.
  • S52 to S53 are similar to S22 to S23, and will not be repeated here.
  • the management unit of the file storage system newly creates metadata corresponding to the file to be stored.
  • new metadata corresponding to the stored file is newly created according to the desired storage location of the file.
  • the metadata adds the following two kinds of information on the basis of the prior art:
  • the first type of information is the location where the file is expected to be stored, referred to as Store tier.
  • the location where the file is expected to be stored can be the first storage space or the second storage space.
  • the second storage space is HDD.
  • the second type of information is the storage status, denoted as Status.
  • Status For the description of the storage state, please refer to the corresponding content in S25, which will not be repeated here.
  • the storage state is set to the first storage state by default.
  • each field has a length of 1 bit.
  • the metadata in the prior art includes 10 bits, then the metadata in the embodiment of the present application may include 12 bits, and the 11th bit is used to indicate the location where the file is expected to be stored, where when the value of this bit is 0, Indicates that the location where the file is expected to be stored is HDD. When the value of this bit is 1, it indicates that the location where the file is expected to be stored is SSD.
  • the 12th bit is used to indicate the storage state of the file. When the value of this bit is 0, it indicates that the storage state of the file is the first storage state (that is, the state that does not need to be migrated).
  • the management unit of the file storage system determines the desired storage location of the file to be stored, for example, determines that the desired storage location of the file is an HDD
  • the management unit of the file storage system will create the metadata of the file in the metadata
  • the 11th bit of is set to 0, and the storage state of the file is set to the first storage state, that is, the 12th bit of the metadata is set to 0.
  • the management unit of the file storage system stores multiple data packets of the file to the location indicated in the metadata.
  • the management unit of the file storage system After the management unit of the file storage system newly creates the metadata corresponding to the file, the data package of the file is stored to the desired storage location indicated in the metadata.
  • the file storage system when the file storage system creates the metadata of the file, it will actively determine and store the expected location of the file according to the set policy, so that the data package of the file is directly stored to the desired storage location, which can save
  • the process of periodically scanning files and performing data migration to the file storage system can improve the performance of the file storage system.
  • FIG. 6 is a flowchart of another example of the data storage method provided by the present application.
  • the method is applied to the storage system shown in FIG. 1 as an example, that is, the data storage method may be implemented in the storage system shown in FIG. 1 below.
  • the method may be performed by a communication device, where the communication device may be a server of the storage system or a communication device capable of supporting the storage system to realize the functions required by the method, and of course may be other communication devices, such as a chip system, in Therefore, the implementation of the communication device is not limited.
  • the method is executed by the management unit of the storage system and the storage system is a file storage system as an example.
  • S61 is similar to S21 and will not be repeated here.
  • the management unit of the file storage system newly creates metadata corresponding to the file to be stored.
  • the metadata adds two types of information on the basis of the prior art, which are the desired storage location and storage status of the file.
  • the expected storage location of the file is preset by the management unit of the file storage system, that is, for any file to be stored, the metadata of the new file is created
  • the preset location may be the first storage space or the second storage space.
  • the first storage The space is SSD
  • the second storage space is HDD
  • the preset location is HDD as an example.
  • the description of the storage state is the same as that in S52, and will not be repeated here.
  • two new fields are added to the metadata to indicate the desired storage location and storage status of the file.
  • the length of each field and the meaning of the value of the field are the same as those in S52, and are not repeated here.
  • the management unit of the file storage system sets the value of the bit in the metadata indicating the location where the file is expected to be stored to 0.
  • the management unit of the file storage system stores a part of the data package of the file to be stored to the location indicated in the metadata.
  • the data package of the file is sequentially stored to the desired storage location indicated in the metadata, that is, the HDD.
  • the management unit of the file storage system obtains the first information of the file to be stored.
  • the management unit of the file storage system determines the location where the file to be stored is expected to be stored according to the first information of the file to be stored and the preset strategy.
  • S64 to S65 are the same as S52 to S53, and will not be repeated here.
  • the management unit of the file storage system updates the metadata of the file.
  • the management unit of the file storage system determines that the location where the file is expected to be stored is different from the location indicated in the metadata, it uses the determined location where the file is expected to be stored to update the field in the metadata indicating the location where the file is expected to be stored Value and update the storage status of the file in the metadata.
  • the management unit of the file storage system determines that the location where the file is expected to be stored is SSD, and the location of the file indicated in the metadata is expected to be HDD, the location of the file indicated in the metadata needs to be stored by the HDD Replace with SSD, that is, reset the value of the bit in the metadata to indicate the desired storage location of the file to 1, and update the storage state of the file to the second storage state, that is, use the metadata to indicate The value of the storage state bit of the file is reset to 1.
  • the management unit of the file storage system stores the remaining data packets of the file to be stored except the part of the data packets to the location indicated in the metadata.
  • the location where the file is stored in the file storage system also changes. As an example, if the location indicated by the file indicated in the metadata becomes SSD, the remaining data packets of the file will be stored to the SSD.
  • the management unit of the file storage system scans the metadata to determine that the file whose storage state is the second storage state needs to be migrated.
  • the management unit of the file storage system migrates the file whose storage state is the second storage state to a location where the file indicated by the metadata of the file is expected to be stored.
  • the file storage system determines the location where the file is expected to be stored during the process of storing the file, which can ensure that there is no increase in the operation delay of creating the metadata of the file. Moreover, in the above technical solution, a part of the data package of the file has been stored to a desired storage location during the file storage process. Therefore, the data amount of data migration can be reduced, and the storage performance of the storage system can be improved.
  • the methods provided by the embodiments of the present application are introduced from the perspective of interaction between the storage system and the server.
  • the storage system may include a hardware structure and / or a software module, and the above functions are implemented in the form of a hardware structure, a software module, or a hardware structure plus a software module. Whether one of the above functions is executed in a hardware structure, a software module, or a hardware structure plus a software module depends on the specific application of the technical solution and design constraints.
  • FIG. 7 shows a schematic structural diagram of a data storage device 700.
  • the data storage device 700 can be applied to a storage system, or a device in the storage system, which can realize the function of the storage system in the method provided in the embodiments of the present application; the data storage device 700 can also support the storage system to implement the implementation of the present application.
  • the method provides an example of a device that stores the functions of the system.
  • the data storage device 700 may be a hardware structure, a software module, or a hardware structure plus a software module.
  • the data storage device 700 may be implemented by a chip system. In the embodiment of the present application, the chip system may be composed of a chip, or may include a chip and other discrete devices.
  • the data storage device 700 may include a communication module 701 and a processing module 702.
  • the communication module 701 may be used to perform step S21 in the embodiment shown in FIG. 2, and / or to perform step S31 in the embodiment shown in FIG. 3, and / or to perform the embodiment shown in FIG. Step S41 in, and / or for performing step S51 in the embodiment shown in FIG. 5, and / or for performing step S61 in the embodiment shown in FIG. 6, and / or for supporting the description described herein Process of the technology.
  • the communication module 701 is used for communication between the data storage device 700 and other modules, and it may be a circuit, a device, an interface, a bus, a software module, a transceiver, or any other device that can implement communication.
  • the processing module 702 may be used to execute steps S22 to S26 in the embodiment shown in FIG. 2, and / or to execute steps S32 to S38 in the embodiment shown in FIG. 3, and / or to execute the diagram 4 in the embodiment shown in step S42 to step S49, and / or used to perform step S52 to step S55 in the embodiment shown in FIG. 5, and / or used to execute the embodiment shown in FIG. 6 Steps S62 to S69, and / or other processes for supporting the technology described herein.
  • the division of the modules in the embodiments of the present application is schematic, and is only a division of logical functions. In actual implementation, there may be another way of dividing.
  • the functional modules in the embodiments of the present application may be integrated in one process. In the device, it can also exist alone physically, or two or more modules can be integrated into one module.
  • the above integrated modules may be implemented in the form of hardware or software function modules.
  • the data storage device 800 may be the storage system in the embodiments shown in FIGS. 2 to 6 or a device of the storage system. Apply for the functions of the storage system in the embodiments shown in FIGS. 2 to 6; the data storage device 800 may also support the storage system to implement the functions of the storage system in the method provided in the embodiments shown in FIGS. 2 to 6 of the present application installation.
  • the data storage device 800 may be a chip system. In the embodiment of the present application, the chip system may be composed of a chip, or may include a chip and other discrete devices.
  • the data storage device 800 includes at least one processor 820 for implementing or supporting the data storage device 800 to implement the functions of the management unit of the storage system in the embodiments shown in FIGS. 2 to 6 of the present application.
  • the processor 820 may obtain the first information of the data to be stored, and determine the expected storage location of the data to be stored according to the first information and the preset strategy. For details, refer to the detailed description in the method example, and do not do here Repeat.
  • the data storage device 800 may further include at least one memory 830 for storing program instructions and / or data.
  • the memory 830 and the processor 820 are coupled.
  • the coupling in the embodiments of the present application is an indirect coupling or communication connection between devices, units or modules, which may be in electrical, mechanical or other forms, and is used for information interaction between devices, units or modules.
  • the processor 820 may cooperate with the memory 830.
  • the processor 820 may execute program instructions stored in the memory 830. At least one of the at least one memory may be included in the processor. When the processor 820 executes the program instructions in the memory 830, the methods shown in FIGS. 2 to 6 may be implemented.
  • the data storage device 800 may further include a communication interface 810 for communicating with other devices through a transmission medium, thereby being used for the data storage device 800 to communicate with other devices.
  • the other device may be a server.
  • the processor 820 can utilize the communication interface 810 to send and receive data.
  • the specific connection medium between the communication interface 810, the processor 820, and the memory 830 is not limited.
  • the memory 830, the processor 820, and the communication interface 810 are connected by a bus 840.
  • the bus is shown by a thick line in FIG. 8. , Not to limit.
  • the bus can be divided into an address bus, a data bus, and a control bus. For ease of representation, only a thick line is used in FIG. 8, but it does not mean that there is only one bus or one type of bus.
  • the processor 820 may be a general-purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic devices, discrete gates or transistor logic devices, and discrete hardware components, which can be implemented Or execute the disclosed methods, steps, and logical block diagrams in the embodiments of the present application.
  • the general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in conjunction with the embodiments of the present application may be directly embodied and executed by a hardware processor, or may be executed and completed by a combination of hardware and software modules in the processor.
  • the memory 830 may be a non-volatile memory, such as a hard disk (HDD) or a solid-state drive (SSD), etc., or a volatile memory (volatile memory).
  • a non-volatile memory such as a hard disk (HDD) or a solid-state drive (SSD), etc.
  • a volatile memory volatile memory
  • random access memory random-access memory, RAM
  • the memory is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
  • the memory in the embodiment of the present application may also be a circuit or any other device capable of realizing a storage function, which is used to store program instructions and / or data.
  • An embodiment of the present application also provides a computer-readable storage medium, including instructions that, when run on a computer, cause the computer to execute the method performed by the first storage array in the embodiments shown in FIGS. 2-6.
  • An embodiment of the present application also provides a computer program product, including instructions that, when run on a computer, cause the computer to execute the method performed by the first storage array in the embodiments shown in FIGS. 2-6.
  • the chip system includes a processor, and may further include a memory, for implementing the function of the storage system in the foregoing method.
  • the chip system may be composed of chips, or may include chips and other discrete devices.
  • the methods provided in the embodiments of the present application may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
  • software When implemented using software, it can be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions.
  • the computer program instructions When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application are generated in whole or in part.
  • the computer may be a general-purpose computer, a dedicated computer, a computer network, a network device, user equipment, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be from a website site, computer, server or data center Transmit to another website, computer, server or data center by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL for short) or wireless (such as infrared, wireless, microwave, etc.).
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device including one or more available media integrated servers, data centers, etc.
  • the available medium may be a magnetic medium (for example, floppy disk, hard disk, Magnetic tape), optical media (eg, digital video disc (DVD)), or semiconductor media (eg, SSD), etc.

Landscapes

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

Abstract

一种数据存储方法及装置,在该方法中,首先获取待存储数据的第一信息,该第一信息包括待存储数据的类型、待存储数据的名称以及与待存储数据对应的用户标识中的至少一个信息,然后,根据待存储数据的第一信息是否满足条件来确定待存储数据期望存储的位置,例如,当获取的待存储数据的至少一个信息满足条件,则确定期望存储的位置为存储系统中读写性能高于或等于阈值的第一存储空间,最后,则将待存储数据的多个数据包中的至少一个数据包存储至该期望存储的位置。由于数据在存储的时候,已经将该数据的数据包存储到该位置,这样,后续则不需要再对该数据进行迁移,从而可以减少需要进行数据迁移的数据量,可以提高存储系统的存储性能。

Description

一种数据存储方法及装置 技术领域
本申请涉及存储技术领域,尤其涉及一种数据存储方法及装置。
背景技术
随着互联网用户的激增以及业务的多样性发展,越来越多的数据(例如,用户数据、业务配置数据等)需要使用存储系统进行存储,以便用来分析和指导业务。为了提高存储系统的存储性能,引入了分级存储技术,其主要思想是:根据数据的重要性、对数据的访问频率等指标,将不同的数据分别存储在不同性能的存储介质上,例如,将访问频率较低的数据存储到存储系统中的读写速度较慢的机械硬盘(hard disk drive,HDD)中,将访问频率较高的数据存储到将存储系统中的读写速度较快的固态硬盘(solid state drive,SSD)中,可以提高存储系统的读写速度。
在现有技术中,采用分级存储技术的存储系统,通常会每隔一段时间(例如,每隔一周),对整个存储系统中存储的数据进行扫描,从而确定该存储系统中存储的数据是否满足预设的分级存储策略(分级存储策略,例如,将访问频率较低的数据存储到HDD中并将访问频率较高的数据存储到SSD中)。如果该存储系统中的部分数据不满足该分级存储策略,例如,数据块1是访问频率较低的数据,但是存储在SSD中,则需要将该部分数据迁移到期望的存储介质上,即,将数据块1迁移到HDD中。
在对整个存储系统中存储的数据进行扫描后,若确定有大量的数据需要进行迁移,则存储系统需要消耗大量的资源(例如,输入/输出(input/output,I/O)资源等)将该需要进行迁移的数据迁移到期望的存储介质上,从而会降低存储系统的存储性能。
发明内容
本申请提供一种数据存储方法及装置,用以提高存储系统的存储性能。
第一方面,提供一种数据存储方法,应用于存储系统中,在该方法中,在存储数据时,首先获取待存储数据的第一信息,该第一信息包括待存储数据的类型、待存储数据的名称以及与待存储数据对应的用户标识中的至少一个信息,然后,根据待存储数据的第一信息是否满足条件来确定待存储数据期望存储的位置,例如,当获取的待存储数据的至少一个信息满足条件,则确定期望存储的位置为存储系统中读写性能高于或等于阈值的第一存储空间,否则,则确定期望存储的位置为存储系统中读写性能低于所述阈值的第二存储空间,最后,则将待存储数据的多个数据包中的至少一个数据包存储至该期望存储的位置。
在上述技术方案中,数据在存储的时候,已经根据数据的类型、名称以及与数据对应的用户标识中的至少一个信息,和存储系统中预设的策略,确定出该数据期望存储的位置了,并将该数据的数据包存储到该位置,这样,后续则不需要再对该数据进行迁移,从而可以减少需要进行数据迁移的数据量,自然也就可以减少数据迁移过程中消耗的存储系统的资源,可以提高存储系统的存储性能。
在一种可能的设计中,该条件包括如下条件中的至少一种:
待存储数据的类型与预设的类型相同;
待存储数据的名称与预设的名称相同;
与待存储数据对应的用户标识与预设的用户标识相同。
在上述技术方案中,可以通过多种不同的方式来确定数据期望存储的位置,可以增加存储系统的灵活性。
在一种可能的设计中,在待存储数据的多个数据包中的任一个数据包均未存储至存储系统之前,便获取待存储数据的第一信息进而确定该待存储数据期望存储的位置,也就是说,在确定待存储数据期望存储的位置之后,再存储待存储数据的数据包,这样,在存储待存储数据的多个数据包时,则将该多个数据包中的每个数据包存储至确定出的期望存储的位置。
在上述技术方案中,由于待存储数据的每个数据包均已经存储至期望存储的位置,这样,存储系统中存储的所有的数据都不需要再迁移,从而,存储系统可以省略对数据进行扫描并确定需要进行数据迁移的数据的过程,可以提升存储系统的存储性能。
在一种可能的设计中,可以先将待存储数据的多个数据包中的一部分数据包存储至第一位置,该第一位置与期望存储的位置不同,例如,可以是存储系统预设的位置,然后,再获取待存储数据的第一信息,进而确定待存储数据期望存储的位置,最后将待存储数据的多个数据包中除存储至第一位置的一部分数据包外的数据包存储至期望存储的位置。在这种情况下,待存储数据的多个数据包存储在不同的存储空间中。
在上述技术方案中,在获取待存储的数据后,先将该数据的一部分数据包存储至默认的位置,然后在存储过程中,确定该数据期望存储的位置,这样可以减少存储系统在存储数据时的响应时长。且,由于待存储数据在存储时已经将待存储数据的一部分数据包存储至期望存储的位置,这样,存储系统只需要对待存储数据的一部分数据包进行数据迁移,从而也可以减少需要进行数据迁移的数据量,可以提升存储系统的存储性能。
在一种可能的设计中,存储系统还可以记录待存储数据的存储状态,该存储状态包括将待存储数据的多个数据包存储至期望存储的位置的第一存储状态及将待存储数据的多个数据包分别存储在第一位置及期望存储的位置的第二存储状态,然后,可以根据获取的待存储数据的存储状态来确定是否需要进行数据迁移,例如,若待存储数据的存储状态指示该待存储数据处于该第二存储状态,则存储系统可以将待存储数据的存储在第一位置的一部分数据包迁移至期望存储的位置,这样,存储系统可以根据待存储数据的存储状态来确定是否需要进行数据迁移,可以减少扫描过程的复杂度。
进一步,当存储系统完成对待存储数据的数据迁移过程后,则还可以将待存储数据的存储状态由第二存储状态调整为第一存储状态。这样,当存储系统再次扫描时,该待存储的数据便可以不用再进行数据迁移。
第二方面,提供一种数据存储装置,所述数据存储装置包括处理器,用于实现上述第一方面描述的方法。所述数据存储装置还可以包括存储器,用于存储程序指令和数据。所述存储器与所述处理器耦合,所述处理器可以调用并执行所述存储器中存储的程序指令,用于实现上述第一方面描述的方法中的任意一种方法中。所述数据存储装置还可以包括通信接口,所述通信接口用于该通信装置与其它设备进行通信。
在一种可能的设计中,包括通信接口和处理器,其中:
该处理器,用于获取待存储数据的第一信息,该第一信息包括该待存储数据的类型、 该待存储数据的名称以及与该待存储数据对应的用户标识中的至少一个信息;根据该待存储数据的第一信息及预设的策略,确定该待存储数据期望存储的位置,该预设的策略为当该第一信息满足条件时,则确定该期望存储的位置为第一存储空间,否则,确定该期望存储的位置为第二存储空间,该第一存储空间为存储系统中读写性能高于或等于阈值的存储空间,该第二存储空间为该存储系统中读写性能低于该阈值的存储空间;
该处理器还用于将通过该通信接口接收的该待存储数据的多个数据包中的至少一个数据包存储至该期望存储的位置。
在一种可能的设计中,该条件包括如下条件中的至少一种:
该待存储数据的类型与预设的类型相同;
该待存储数据的名称与预设的名称相同;
与该待存储数据对应的用户标识与预设的用户标识相同。
在一种可能的设计中,该处理器获取待存储数据的第一信息时,具体用于在通过该通信接口接收的该待存储数据的多个数据包中的任一个数据包均未存储至该存储系统之前,获取该待存储数据的第一信息;
该处理器将通过该通信接口接收的该待存储数据的多个数据包中的至少一个数据包存储至该期望存储的位置时,具体用于将该多个数据包中的每个数据包存储至该期望存储的位置。
在一种可能的设计中,该处理器,还用于在获取待存储数据的第一信息之前,将通过该通信接口接收的该待存储数据的多个数据包中的一部分数据包存储至第一位置,该第一位置与该期望存储的位置不同;
该处理器将通过该通信接口接收的该待存储数据的多个数据包中的至少一个数据包存储至该期望存储的位置时,具体用于将该多个数据包中除该一部分数据包外的数据包存储至该期望存储的位置。
在一种可能的设计中,该处理器还用于:记录该待存储数据的存储状态,该存储状态包括第一存储状态及第二存储状态,该第一存储状态是指将该待存储数据的多个数据包存储至该期望存储的位置的状态,该第二存储状态是指将该待存储数据的多个数据包分别存储在该第一位置及该期望存储的位置的状态;后续可以获取该待存储数据的存储状态;若该待存储数据的存储状态指示该待存储数据处于该第二存储状态,则可以将该待存储数据的该一部分数据包由该第一位置迁移至该期望存储的位置,并将该待存储数据的存储状态由该第二存储状态调整为该第一存储状态。
第三方面,提供一种数据存储装置,该数据存储装置可以是存储系统,也可以是存储系统中的装置,该数据存储装置可以包括处理模块和通信模块,这些模块可以执行上述第一方面任一种设计示例中的存储系统所执行的相应功能,具体的:
所述处理模块,用于获取待存储数据的第一信息,所述第一信息包括所述待存储数据的类型、所述待存储数据的名称以及与所述待存储数据对应的用户标识中的至少一个信息;根据所述待存储数据的第一信息及预设的策略,确定所述待存储数据期望存储的位置,所述预设的策略为当所述第一信息满足条件时,则确定所述期望存储的位置为第一存储空间,否则,确定所述期望存储的位置为第二存储空间,所述第一存储空间为存储系统中读写性能高于或等于阈值的存储空间,所述第二存储空间为所述存储系统中读写性能低于所述阈 值的存储空间;所述处理模块还用于将通过所述通信模块接收的所述待存储数据的多个数据包中的至少一个数据包存储至所述期望存储的位置。
第四方面,本申请实施例中还提供一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机执行第一方面所述的方法。
第五方面,本申请实施例中还提供一种计算机程序产品,包括指令,当其在计算机上运行时,使得计算机执行第一方面所述的方法。
第六方面,本申请实施例提供了一种芯片系统,该芯片系统包括处理器,还可以包括存储器,用于实现第一方面所述的方法。该芯片系统可以由芯片构成,也可以包含芯片和其他分立器件。
上述第二方面至第六方面及其实现方式的有益效果可以参考对第一方面的方法及其实现方式的有益效果的描述。
附图说明
图1为本申请实施例中提供的存储系统的一种示例的示意图;
图2为本申请实施例提供的数据存储方法的一种示例的流程图;
图3为本申请实施例提供的数据存储方法的另一种示例的流程图;
图4为本申请实施例提供的数据存储方法的另一种示例的流程图;
图5为本申请实施例提供的数据存储方法的另一种示例的流程图;
图6为本申请实施例提供的数据存储方法的另一种示例的流程图;
图7为本申请实施例提供的数据存储装置的一种示例的结构示意图;
图8为本申请实施例提供的数据存储装置的另一种示例的结构示意图。
具体实施方式
为了使本申请实施例的目的、技术方案和优点更加清楚,下面将结合说明书附图以及具体的实施方式对本申请实施例中的技术方案进行详细的说明。
在本申请的描述中,“多个”是指两个或两个以上,也可以将“多个”理解为“至少两个”。“至少一个”,可理解为一个或多个,例如理解为一个、两个或更多个,包括至少一个,是指包括一个、两个或更多个,而且不限制包括的是哪几个,例如,包括A、B和C中的至少一个,那么包括的可以是A、B、C、A和B、A和C、B和C、或A和B和C。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,单独存在B,同时存在A和B这三种情况。另外,字符“/”,如无特殊说明,一般表示前后关联对象是一种“或”的关系。
除非有相反的说明,本申请中提及“第一”、“第二”等序数词用于对多个对象进行区分,不用于限定多个对象的顺序、时序、优先级或者重要程度。
以上介绍了本申请所涉及的一些概念,下面,对本申请的技术背景进行说明。
大数据时代,存储系统存储的数据量成爆炸式增长,由于存储系统中的存储空间有限,为了保证存储系统的存储性能,则需要对存储的大量的数据进行管理。一种对数据进行管理的方式即分级存储,也就是说根据数据的重要性、访问频率、属性信息、大小等指标,将数据分别存储在不同性能的存储介质上,并通过分级存储技术实现数据在存储介质之间的自动迁移。
在使用分级存储技术的存储系统中,通常包括多种不同性能的存储介质,例如,串行高级技术附件(serial advanced technology attachment,SATA)硬盘、小型计算机系统接口(small computer system interface,SCSI)硬盘、串行连接SCSI接口(serial attached SCSI,SAS)、光纤通道接口(fibre channel,FC)硬盘以及SSD等,这些硬盘的性能的好坏关系是:SATA硬盘<SCSI硬盘<SAS硬盘<FC硬盘<SSD。本领域技术人员可以根据实际使用需求,选择不同性能的存储介质构成不同的存储系统,例如,包括三种不同性能的存储介质的三级存储系统,或者包括五种不同性能的存储介质的五级存储系统等。且,在存储系统中,存储有预先设置好的分级存储策略,例如,将重要的数据存储在性能好的存储介质上且将不重要的数据存储在性能差的存储介质上的分级存储策略,或者,将访问频率高的数据存储在性能好的存储介质上且将访问频率低的数据存储在性能差的存储介质上的分级存储策略,等等,本领域技术人员可以根据使用需求进行设置。
在现有技术中,使用分别存储技术的存储系统在接收到待存储数据的数据包后,会将该数据包存储到预设的存储介质中,该预设的存储介质可以是存储系统中性能好的存储介质,例如,为SAS硬盘或者SSD等。然后,每隔一段时间,则对整个存储系统中存储的数据进行扫描,确定出不满足预设的分级存储策略的部分数据包,并将该部分数据包迁移到期望的存储介质上。
由于数据迁移需要消耗存储系统的资源,因此,当存储系统中有大量的数据包需要进行迁移时,会降低存储系统的存储性能。
鉴于此,提供本申请实施例中的技术方案。在本申请实施例中,在存储数据时,首先获取该数据的类型、名称以及与该数据对应的用户标识中的至少一个信息,然后根据获取的至少一个信息及存储系统预设的分级存储策略,确定该数据需要存储到性能好的存储空间还是性能差的存储空间,然后便将该数据的数据包存储到确定出的存储空间中,这样,数据在存储的时候已经存储在与分级存储策略对应的存储空间了,这样,后续则不需要再对该数据进行迁移,从而可以减少需要进行数据迁移的数据量,自然也就可以减少数据迁移过程中消耗的存储系统的资源,可以提高存储系统的存储性能。
本申请实施例中的技术方案应用于使用分级存储技术的存储系统中,该存储系统可以为文件存储系统、块存储系统或者对象存储系统,或者上述存储系统的组合,在本申请实施例中不作限制。
图1示出了本申请实施例中所涉及的存储系统的一种示例,如图1所示,该存储系统包括管理单元101以及两种性能不同的存储介质,分别为第一存储介质102和第二存储介质103。管理单元101用于对操作请求进行管理,例如处理写操作的请求,从而将数据写入存储介质中,或者处理读操作的请求,从而从存储介质中获取数据等,管理单元101可以为中央处理器(central processing unit,CPU)、特定应用集成电路(application-specific integrated circuit,ASIC)或者现场可编程门阵列(field-programmable gate array,FPGA)等。第一存储介质102和第二存储介质103用于存储数据,其中,第一存储介质102的读写性能优于第二存储介质103的读写性能,例如,第一存储介质102可以为SSD或者FC硬盘,第二存储介质103可以为SATA硬盘或者SAS硬盘或者SCSI硬盘,当然,也可以是其他的存储介质,在此不作限制。由至少一个第一存储介质102构成的存储空间称为第一存储空间1021,由至少一个第二存储介质103构成的存储空间称为第二存储空间1031,需要说明 的是,当第一存储空间1021由多个第一存储介质102对应的多个存储空间构成时,该多个第一存储介质102可以通过耦合的方式形成一个存储阵列,协同起来对外提供服务,第二存储空间1031也是同样的,在此不再赘述。
需要说明的是,使用分级存储技术的存储系统并不限于如图1所示的架构,例如,存储系统中可以包括三种及三种以上性能不同的存储介质,例如,包括四种性能不同的存储介质,或者,存储系统中还可以包括其他的装置,例如,管理装置等,本申请实施例描述的存储系统是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域普通技术人员可知,随着存储技术和存储系统架构的演变,本申请实施例提供的技术方案对于类似的技术问题,同样适用。
下面结合附图介绍本申请实施例提供的技术方案。
本申请实施例提供一种数据存储方法,请参见图2,为该方法的流程图。
在下文的介绍过程中,以该方法应用于图1所示的存储系统中为例,也就是说,下文中执行该数据存储方法的可以是图1所示的存储系统。另外,该方法可由一个通信装置执行,其中,该通信装置可以是存储系统的服务器或能够支持存储系统实现该方法所需的功能的通信装置,当然还可以是其他通信装置,例如芯片系统,在此,不对该通信装置的实现方式均进行限制。为便于介绍,在下文中,以该方法由存储系统的管理单元执行为例。
S21、其他电子设备向存储系统发送待存储数据的多个数据包,存储系统的管理单元获取该多个数据包。
在实际使用中,存储系统通常是与其他的电子设备协同工作来完成数据的读写过程,该其他的电子设备可以是服务器、客户端等,这样,用户可以通过在该其他电子设备上的写数据操作将数据写入存储系统,或者通过读数据操作从存储系统中读取数据。为方便描述,下文中以该其他电子设备为服务器为例进行说明。
作为一种示例,当用户需要将数据存储至存储系统时,则可以执行写数据操作,例如,写入数据A。当服务器检测该写数据操作后,则向存储系统发送写数据请求,该写数据请求中可以携带数据A的多个数据包,这样,当存储系统的管理单元接收该写数据请求后,则可以从该写数据请求中获取待存储的数据A的多个数据包。
S22、存储系统的管理单元获取待存储数据的第一信息。
在本申请实施例中,第一信息包括待存储数据的类型、待存储数据的名称以及与待存储数据对应的用户标识中的至少一个信息。
在本申请实施例中,存储系统的管理单元获取第一信息的方式包括但不限于如下两种:
第一种获取方式:
服务器向存储系统发送的写数据请求中可以携带该第一信息,例如,数据A的描述信息,该描述信息可以包括数据A的数据类型(例如,RAR类型、JPEG类型、avi类型等)、数据A的大小(例如,1M、30kB等)、数据A的名称(例如,photo1、JPG2等)、用户的标识(例如,用户的IP地址、用户的编号等)等信息,在此不作限制。当存储系统的管理单元接收该写数据请求后,则可以从该写数据请求中获取数据A的描述信息,数据的A的描述信息可以理解为待存储数据(数据A)的第一信息。
第二种方式:
当存储系统从服务器的写数据请求中获取数据A的多个数据包,存储系统的管理单元 可以根据包头字符与数据类型的对应关系,以及,数据A的多个数据包的包头,确定数据A的类型。具体来讲,请参考表1,为包头字符与数据类型的对应关系的一种示例,其中,包头字符以十六进制数进行表示。如表1所示,当包头字符为“52617221”时,则表示该数据的类型为RAR类型,当包头字符为“504B0304”时,则表示该数据的类型为ZIP类型。在这种情况下,数据的A的类型即为第一信息。需要说明的是,第一信息的内容是存储系统或者技术人员预先设置的,例如,第一信息可以是待存储数据的类型、待存储数据的名称以及与待存储数据对应的用户标识,第一信息也可以只包括待存储数据的类型,在此不作限制。
表1
包头字符 数据类型
52617221 RAR类型
FFD8FF JPEG类型
504B0304 ZIP类型
47494638 GIF类型
…… ……
当然,存储系统的管理单元也可以通过其他方式获取待存储数据的第一信息,在此不作限制。
S23、该存储系统的管理单元根据待存储数据的第一信息及预设的策略,确定待存储数据期望存储的位置。
在本申请实施例中,该预设的策略为:当第一信息满足条件时,则确定该待存储数据期望存储的位置为读写性能高于或等于阈值的第一存储空间,若第一信息不满足条件,则确定该待存储数据期望存储的位置为读写性能低于阈值的第二存储空间。在本申请实施例中不对该阈值的具体取值作限制,或者,读写性能高于或等于阈值的第一存储空间以及读写性能低于阈值的第二存储空间,可以理解为第一存储空间的读写性能高于第二存储空间。具体到图1所示的存储系统,该第一存储空间可以理解为由至少一个第一存储介质构成的存储空间,该第二存储空间可以理解为由至少一个第二存储介质构成的存储空间。为方便说明,在下文中,以第一存储空间为SSD,第二存储空间为HDD为例。
下面对预设的策略进行说明。该预设的策略可以包括但不限于如下三种情况:
第一种情况,该预设的策略为:若待存储数据的类型与预设的类型相同,则确定该待存储数据期望存储的位置为SSD,否则确定待存储数据期望存储的位置为HDD。
作为一种示例,预设的类型可以为RAR类型。当存储系统的管理单元获取数据A的第一信息后,则从第一信息中获取数据A的类型,例如,该数据A为JPEG类型,存储系统确定数据A的类型不是RAR类型,从而确定数据A期望存储的位置为HDD。
第二种情况,该预设的策略为:若待存储数据的名称与预设的名称相同,则确定该待存储数据期望存储的位置为SSD,否则确定待存储数据期望存储的位置为HDD。
作为一种示例,预设的名称为以photo开头的名称。当存储系统的管理单元获取数据A的第一信息后,则从第一信息中获取数据A的名称,例如,该数据A为JPEG2,存储系统确定数据A的名称不以photo开头,从而确定数据A期望存储的位置为HDD。
第三种情况,该预设的策略为:与待存储数据对应的用户标识与预设的用户标识相同,则确定该待存储数据期望存储的位置为SSD,否则确定待存储数据期望存储的位置为HDD。
作为一种示例,以用户标识为用户的编号为例,预设的用户标识为ID1000。当存储系统的管理单元获取数据A的第一信息后,则从第一信息中获取数据A对应的用户的编号,例如,与该数据A对应的用户的编号为ID100,存储系统的管理单元确定与数据A对应的用户编号与预设的用户标识不相同,从而确定数据A期望存储的位置为HDD。
当然,该预设的策略可以是上述三种情况中的至少两种情况的组合。例如,该预设的策略可以是上述第一种情况和第二种情况的组合,或者,该预设的策略可以是上述三种情况的组合,等等,在这种情况下,存储系统的管理单元确定待存储数据期望存储的位置的过程与上述三种情况中的任意一种情况相似,在此不再赘述。
由于存储系统可以根据待存储数据的相关信息,确定待存储数据期望存储的位置,这样可以避免对存储空间的读写性能要求较高的数据被默认存储到读写性能较低的存储空间而无法满足数据需求的问题,而且可以避免对存储空间的读写性能要求较低的数据被存储到读写性能较高的存储空间而导致的浪费读写性能较高的存储资源的问题。
S24、存储系统的管理单元将待存储数据的多个数据包的每个数据包存储至期望存储的位置。
在存储系统的管理单元确定待存储数据期望存储的位置后,则将接收到的该待存储数据的每一个数据包存储至所述期望存储的位置,例如,确定数据A期望存储的位置为HDD,则将数据A包括的多个数据包均存储至HDD中。由于待存储数据存储在期望存储的位置,这样,当存储系统的管理单元对存储的所有数据进行扫描以确定是否需要进行数据迁移时,该数据便已经在目标位置了,从而无需再对该数据进行迁移,可以减少需要进行数据迁移的数据量,以及减少数据迁移过程中消耗的存储系统的资源。
S25、存储系统的管理单元记录待存储数据的存储状态为第一存储状态。
在本申请实施例中,存储状态包括将待存储数据的多个数据包存储至其期望存储的位置的第一存储状态(也可以称为无需迁移的状态),以及将待存储数据的多个数据包的一部分数据包存储在期望存储的位置且将另一部分数据包存储在与期望存储的位置不同的第一位置的第二存储状态(也可以称为需要迁移的状态)。如果期望存储的位置为读写性能较高的第一存储空间,则第一位置为读写性能较低的第二存储空间,如果期望存储的位置为读写性能较低的第二存储空间,则第一位置为读写性能较高的第一存储空间。
作为一种示例,在S23中,数据A包括的所有的数据包均存储至期望存储的位置了,因此,存储系统的管理单元可以记录数据A的存储状态为第一存储状态。具体来将,存储系统中可以包括一专用空间,该专用空间专门用于记录数据的存储状态,例如,可以在第一存储空间或者第二存储空间中预留出该专用空间,若存储系统中存储有10个数据,该专用空间中可以存储10个比特,每个数据的存储状态对应其中的一个比特,当比特的取值为0时,表示与该比特对应的数据的存储状态为无需迁移的状态,当比特的取值为1时,则表示该比特对应的数据的存储状态为需要迁移的状态。若数据A为存储系统中存储的第一个数据,从而该专用空间中的第一个比特对应数据A的存储状态,则存储系统的管理单元将专用空间中的第一个比特的取值置为0。当然,也可以采用其他方式记录存储状态,在此不作限制。
需要说明的是,在本申请实施例中,不对S24和S25的执行顺序进行限制,也就是说,可以先执行S24再执行S25,也可以先执行S25在执行S24,或者同时执行S24和S25,在图2中以先执行S24再执行S25为例。
S26、存储系统的管理单元获取待存储数据的存储状态。
使用分级存储技术的存储系统会定期扫描存储系统中存储的数据,从而确定是否需要进行数据迁移。在本申请实施例中,由于存储系统的管理单元记录了每个数据的存储状态,例如,每个数据的存储状态存储在用于记录该存储状态的专用空间中,这样,存储系统的管理单元可以根据专用空间中记录的数据的存储状态来确定是否需要进行数据迁移,从而可以减小扫描的时间以及减少扫描所消耗的资源。以数据A为例,数据A为存储系统中存储的第一个数据,则存储系统的管理单元获取用于记录存储状态的专用空间中第一个比特的取值,该第一个比特的取值为0。
S27、存储系统的管理单元确定不需要迁移待存储数据。
存储系统的管理单元确定用于记录存储状态的专用空间中,与数据A对应的第一个比特的取值为0,从而管理单元根据比特的取值与存储状态的对应关系确定数据A不需要进行迁移。
在上述技术方案中,由于待存储数据在存储时已经存储至期望存储的位置,因此,存储系统无需再迁移该数据,可以减少需要进行数据迁移的数据量,进而可以减少数据迁移过程消耗的资源,提升存储系统的存储性能。
进一步,由于待存储数据在存储时已经存储至期望存储的位置,这样,存储系统中存储的所有的数据都不需要再迁移,也就是说S25~S27为可选步骤,即不是必须要执行的,从而,存储系统可以省略对数据进行扫描并确定需要进行数据迁移的数据的过程,可以提升存储系统的存储性能。
在图2所示的实施例中,存储系统在存储数据之前先确定该数据期望存储的位置,然后便将该数据存储至期望存储的位置,由于存储系统确定数据期望存储的位置需要消耗一定的时间,因此,为了不影响存储系统在存储数据时的响应速度,请参考图3,为本申请提供的数据存储方法的另一种示例的流程图。
在下文的介绍过程中,以该方法应用于图1所示的存储系统中为例,也就是说,下文中执行该数据存储方法的可以是图1所示的存储系统。另外,该方法可由一个通信装置执行,其中,该通信装置可以是存储系统的服务器或能够支持存储系统实现该方法所需的功能的通信装置,当然还可以是其他通信装置,例如芯片系统,在此,不对该通信装置的实现方式均进行限制。为便于介绍,在下文中,以该方法由存储系统的管理单元执行为例。
S31、其他电子设备向存储系统发送待存储数据的多个数据包,存储系统的管理单元获取该多个数据包。
在本申请实施例中,该其他电子设备可以为服务器、客户端等,在下文的描述中,以其他电子设备为服务器为例。S31与S21相似,在此不再赘述。
S32、存储系统的管理单元将待存储数据的多个数据包的一部分数据包存储至第一位置。
在本申请实施例中,该第一位置是存储系统默认的位置,也就是说,存储系统的管理单元会将接收到的每一个数据的至少一部分数据包存储至该第一位置。在图1所示的存储系统中,包括第一存储空间和第二存储空间,则该第一位置可以是该第一存储空间,也可 以是该第二存储空间,本领域技术人员可以根据实际使用需求进行设置在此不作限制。为方便说明,在下文中,以第一存储空间为SSD、第二存储空间为HDD以及第一位置为HDD为例。
作为一种示例,待存储的数据为数据A,数据A包括10个数据包。当存储系统的管理单元根据服务器的写数据请求获取数据A的10个数据包后,会依次在存储系统中的存储空间中写入该10个数据包,存储系统的管理单元可以以数据包为单位,逐次写入该10个数据包,也就是说在将第一个数据包写入HDD后,再将第二个数据包写入HDD。或者,存储系统的管理单元也可以将数据包拆分成多个数据块,然后以数据块为单位,逐次写入该10个数据包,例如,存储系统的管理单元将每个数据包拆分成3个数据块,然后将第一个数据包对应的3个数据块写入HDD后,再将第二个数据包对应的3个数据块写入HDD。
S33、存储系统的管理单元获取待存储数据的第一信息。
当存储系统的管理单元将待存储数据的一部分数据包写入HDD后,存储系统的管理单元则获取待存储数据的第一信息。该第一信息的内容以及获取第一信息的方式与S22中相同,在此不再赘述。
S34、该存储系统的管理单元根据待存储数据的第一信息及预设的策略,确定待存储数据期望存储的位置。
S34与S23相似,在此不再赘述。
需要说明的是,存储系统的管理单元确定出的期望存储的位置可能与第一位置相同,也可能与第一位置不相同。例如,若存储系统的管理单元确定期望存储的位置为HDD,则期望存储的位置与第一位置相同,若存储系统的管理单元确定待存储数据期望存储的位置为SSD,则期望存储的位置与第一位置不同。在本申请实施例中,以期望存储的位置与第一位置相同为例进行说明。
S35、在该期望存储的位置与第一位置相同时,存储系统的管理单元将待存储数据的多个数据包的每个数据包存储至第一位置。
S36、存储系统的管理单元记录待存储数据的存储状态为第一存储状态。
S37、存储系统的管理单元获取待存储数据的存储状态。
S38、存储系统的管理单元确定不需要迁移待存储数据。
S35~S38与S24~S27相似,在此不再赘述。S36~S38为可选步骤,即不是必须要执行的。
在上述技术方案中,存储系统在获取待存储的数据后,先将该数据的一部分数据包存储至默认的位置,然后在存储过程中,确定该数据期望存储的位置,这样可以减少存储系统在存储数据时的响应时长。
如图3所示的实施例介绍了在存储过程中确定数据期望存储的位置且该期望存储的位置与第一位置相同的示例,下面对在存储过程中确定数据期望存储的位置且该期望存储的位置与第一位置不同的示例进行说明。请参考图4,为本申请提供的数据存储方法的另一种示例的流程图。
在下文的介绍过程中,以该方法应用于图1所示的存储系统中为例,也就是说,下文中执行该数据存储方法的可以是图1所示的存储系统。另外,该方法可由一个通信装置执行,其中,该通信装置可以是存储系统的服务器或能够支持存储系统实现该方法所需的功 能的通信装置,当然还可以是其他通信装置,例如芯片系统,在此,不对该通信装置的实现方式均进行限制。为便于介绍,在下文中,以该方法由存储系统的管理单元执行为例。
S41、其他电子设备向存储系统发送待存储数据的多个数据包,存储系统的管理单元获取该多个数据包。
S42、存储系统的管理单元将待存储数据的多个数据包的一部分数据包存储至第一位置。
S43、存储系统的管理单元获取待存储数据的第一信息。
S44、该存储系统的管理单元根据待存储数据的第一信息及预设的策略,确定待存储数据期望存储的位置。
S41~S44与S31~S34相似,在此不再赘述。
在本申请实施例中,以期望存储的位置与第一位置不同为例进行说明。
S45、在该期望存储的位置与第一位置不同时,存储系统的管理单元将待存储数据的多个数据包的除该一部分数据包外的剩余数据包存储至该期望存储的位置。
作为一种示例,在S42中,存储系统的管理单元将数据A的前2个数据包存储至第一位置,即存储至HDD中。当存储系统的管理单元确定数据A期望存储的位置为SSD,与第一位置不同,则存储系统的管理单元将数据A剩余的8个数据包存储至SSD。
S46、存储系统的管理单元记录待存储数据的存储状态为第二存储状态。
由于数据A的一部分数据包存储在HDD,另一部分数据包存储在SSD,因此,存储系统的管理单元将数据A的存储状态记为需要进行数据迁移的第二存储状态。
S47、存储系统的管理单元获取待存储数据的存储状态。
S47与S26相似,在此不再赘述。
S48、存储系统的管理单元确定需要迁移待存储数据,并将待存储数据的该一部分数据包由第一位置迁移至期望存储的位置。
在本申请实施例中,存储系统的管理单元获取待存储数据(数据A)的存储状态为第二存储状态,则确定待存储数据需要进行数据迁移,从而将数据A的存储在第一位置的一部分数据包迁移至数据A期望存储的位置。
S49、存储系统的管理单元将待存储数据的存储状态由第二存储状态调整为第一存储状态。
当存储系统完成数据迁移后,则该数据的数据包便全部存储在期望存储的位置,因此,该数据无需在进行数据迁移,从而存储系统的管理单元将该数据的存储状态更新为第一存储状态。
需要说明的是,S46~S49为可选步骤,即不是必须要执行的。
在上述技术方案中,由于在存储数据时,已经将该数据的一部分数据包存储至期望存储的位置了,因此,在进行数据迁移时,只需要迁移该数据的另一部分数据包即可,因此,可以减少数据迁移的数据量,从而可以减少数据迁移消耗的存储资源,提高存储系统的存储性能。
以上对本申请实施例中的数据存储方法在存储系统的总体流程进行了介绍,下面以一个具体的存储系统(例如,文件存储系统)为例,对上述技术方案进行说明。
首先对文件存储系统的数据存储原理进行说明。
在文件存储系统中存储的数据分为两种,一种称为数据,另一种是元数据。数据可以 理解为文件中的实际数据,例如,该文件为一张图片,该文件的实际数据则为该图片中包括人物、动物和环境等信息,而元数据是用来描述一个文件的属性信息的数据,例如,该文件的访问权限、该文件所有者以及该文件的存储位置等。若用户需要对文件存储系统中的文件进行操作,则首先需要得到该文件的元数据,然后才能根据该元数据定位到文件的位置并且得到文件中的实际数据。在文件存储系统中,对元数据的管理方式可以分为集中式管理和分布式管理两种,集中式管理是指在文件系统中设置有一个存储空间,专用于存储所有文件的元数据,例如,所有文件的元数据均存储在SSD上,这样可以方便对文件存储系统中的文件的管理。需要说明的是,在这种情况下,由于各个文件可能存储在不同的位置,例如,有的文件存储在HDD上,有的文件存储在SSD上,则文件和该文件的元数据是存储在不同的存储介质中的。分布式管理是指将元数据存放在文件系统的任意一个存储空间中,例如,元数据可以与每个文件一起存储,若文件存储在HDD上,则该文件的元数据也存储在HDD上,若文件存储在SSD上,则该文件的元数据也存储在SSD上,这样,通过将对元数据管理的职责分布到不同存储空间上,可以避免集中式管理方式中当存储元数据的存储空间故障后导致整个文件存储系统无法使用的问题。
基于上述原理,下面对本申请实施例中的数据存储方法在文件存储系统中的执行过程进行说明。请参考图5,为该方法的流程图。
在下文的介绍过程中,以该方法应用于图1所示的存储系统中为例,也就是说,下文中执行该数据存储方法的可以是图1所示的存储系统。另外,该方法可由一个通信装置执行,其中,该通信装置可以是存储系统的服务器或能够支持存储系统实现该方法所需的功能的通信装置,当然还可以是其他通信装置,例如芯片系统,在此,不对该通信装置的实现方式均进行限制。为便于介绍,在下文中,以该方法由存储系统的管理单元执行且该存储系统为文件存储系统为例。
S51、其他电子设备向文件存储系统发送待存储文件的多个数据包,文件存储系统的管理单元获取该多个数据包。
S51与S21相似,在此不再赘述。
S52、文件存储系统的管理单元获取待存储文件的第一信息。
S53、文件存储系统的管理单元根据待存储文件的第一信息及预设的策略,确定待存储文件期望存储的位置。
S52~S53与S22~S23相似,在此不再赘述。
S54、文件存储系统的管理单元新建与待存储文件对应的元数据。
在文件存储系统的管理单元确定待存储文件期望存储的位置后,则根据文件期望存储的位置新建与该存储文件对应的元数据。
在本申请实施例中,元数据在现有技术的基础上增加如下两种信息:
第一种信息为文件期望存储的位置,记为Store tier,文件期望存储的位置可以为第一存储空间,也可以为第二存储空间,为方便说明,在下文中,以第一存储空间为SSD,第二存储空间为HDD为例。
第二种信息为存储状态,记为Status。其中对存储状态的说明可以参照S25中相应的内容,在此不再赘述。在本申请实施例中,在新建元数据时,会默认将存储状态设置为第一存储状态。
作为一种示例,可以在现有技术中的元数据的基础上增加两个字段分别用来指示前述的第一种信息和第二种信息,例如每个字段的长度为1个比特,若现有技术中的元数据中包括10个比特,则本申请实施例中的元数据可以包括12比特,第11个比特用于指示文件期望存储的位置,其中当该比特的取值为0时,表示该文件期望存储的位置为HDD,当该比特的取值为1时,表示该文件期望存储的位置为SSD。第12个比特用于指示文件的存储状态,当该比特的取值为0时,表示该文件的存储状态为第一存储状态(即不需要迁移的状态),当该比特的取值为1时,表示该文件的存储状态为第二存储状态(即需要进行迁移的状态)。当文件存储系统的管理单元确定待存储文件期望存储的位置后,例如,确定该文件期望存储的位置为HDD,则文件存储系统的管理单元在新建该文件的元数据时,将在该元数据的第11个比特置为0,并且设置文件的存储状态为第一存储状态,也就是说,将该元数据的第12个比特置为0。
S55、文件存储系统的管理单元将该文件的多个数据包存储至元数据中指示的位置。
当文件存储系统的管理单元新建与该文件对应的元数据后,则将该文件的数据包存储至元数据中指示的期望存储的位置。
这样,文件存储系统在新建文件的元数据时,便会主动根据设定的策略,确定并存储该文件期望存储的位置,从而该文件的数据包便直接存储至该期望存储的位置,可以省去文件存储系统周期性扫描文件以及进行数据迁移的过程,可以提高文件存储系统的性能。
为了不影响新建元数据的速度,请参考图6,为本申请提供的数据存储方法的另一种示例的流程图。
在下文的介绍过程中,以该方法应用于图1所示的存储系统中为例,也就是说,下文中执行该数据存储方法的可以是图1所示的存储系统。另外,该方法可由一个通信装置执行,其中,该通信装置可以是存储系统的服务器或能够支持存储系统实现该方法所需的功能的通信装置,当然还可以是其他通信装置,例如芯片系统,在此,不对该通信装置的实现方式均进行限制。为便于介绍,在下文中,以该方法由存储系统的管理单元执行且该存储系统为文件存储系统为例。
S61、其他电子设备向文件存储系统发送待存储文件的多个数据包,文件存储系统的管理单元获取该多个数据包。
S61与S21相似,在此不再赘述。
S62、文件存储系统的管理单元新建与待存储文件对应的元数据。
在本申请实施例中,元数据在现有技术的基础上增加两种信息,分别为文件期望存储的位置以及存储状态。为了不影响新建元数据的速度,在新建元数据时,文件期望存储的位置是由文件存储系统的管理单元预设的,也就是说,对于任意一个待存储文件,在新建该文件的元数据时,该元数据中指示的文件期望存储的位置是相同的,例如,该预设的位置可以是第一存储空间,也可以为第二存储空间,为方便说明,在下文中,以第一存储空间为SSD,第二存储空间为HDD,且以预设的位置为HDD为例。对存储状态的说明与S52中相同,在此不再赘述。
作为一种示例,在元数据中新增2个字段来指示文件期望存储的位置和存储状态,其中每个字段的长度以及字段的取值的含义与S52中相同,在此不再赘述。例如,预设的位置为HDD,则文件存储系统的管理单元将该元数据中用于指示文件期望存储的位置的比特 的取值设置为0。
S63、文件存储系统的管理单元将待存储文件的一部分数据包存储至元数据中指示的位置。
当文件存储系统的管理单元新建与该文件对应的元数据后,则将该文件的数据包依次存储至元数据中指示的期望存储的位置,即HDD。
S64、文件存储系统的管理单元获取待存储文件的第一信息。
S65、文件存储系统的管理单元根据待存储文件的第一信息及预设的策略,确定待存储文件期望存储的位置。
S64~S65与S52~S53相同,在此不再赘述。
S66、在该文件期望存储的位置与元数据中指示的位置不同时,文件存储系统的管理单元更新该文件的元数据。
当文件存储系统的管理单元确定该文件期望存储的位置与元数据中指示的位置不同时,则使用确定出的文件期望存储的位置,更新元数据中用于指示文件期望存储的位置的字段的取值,以及更新元数据中该文件的存储状态。作为一种示例,文件存储系统的管理单元确定该文件期望存储的位置为SSD,而元数据中指示的文件期望存储的位置为HDD,则需要将元数据中指示的文件期望存储的位置由HDD更换为SSD,也就是说,将元数据中用于指示文件期望存储的位置的比特的取值重置为1,且将文件的存储状态更新为第二存储状态,即将元数据中用于指示文件的存储状态的比特的取值重置为1。
S67、文件存储系统的管理单元将待存储文件的除该一部分数据包外的剩余数据包存储至元数据中指示的位置。
由于元数据中指示的文件期望存储的位置发生了变化,则该文件在文件存储系统中存储的位置也发生了变化。作为一种示例,元数据中指示的文件期望存储的位置变为SSD,则该文件的剩余数据包将存储至SSD。
S68、文件存储系统的管理单元扫描元数据,确定存储状态为第二存储状态的文件需要进行数据迁移。
S69、文件存储系统的管理单元将存储状态为第二存储状态的文件迁移至该文件的元数据指示的文件期望存储的位置。
在上述技术方案中,文件存储系统在存储文件的过程中,确定该文件期望存储的位置,可以保证不增加新建该文件的元数据的操作时延。并且,上述技术方案在文件存储过程中已经将该文件的一部分数据包存储至期望存储的位置了,因此,可以减少数据迁移的数据量,从而可以提高存储系统的存储性能。
上述本申请提供的实施例中,分别从存储系统及服务器之间交互的角度对本申请实施例提供的方法进行了介绍。为了实现上述本申请实施例提供的方法中的各功能,存储系统可以包括硬件结构和/或软件模块,以硬件结构、软件模块、或硬件结构加软件模块的形式来实现上述各功能。上述各功能中的某个功能以硬件结构、软件模块、还是硬件结构加软件模块的方式来执行,取决于技术方案的特定应用和设计约束条件。
图7示出了一种数据存储装置700的结构示意图。其中,数据存储装置700可以应用于存储系统,或者是存储系统中的装置,能够实现本申请实施例提供的方法中存储系统的功能;数据存储装置700也可以是能够支持存储系统实现本申请实施例提供的方法中存储 系统的功能的装置。数据存储装置700可以是硬件结构、软件模块、或硬件结构加软件模块。数据存储装置700可以由芯片系统实现。本申请实施例中,芯片系统可以由芯片构成,也可以包含芯片和其他分立器件。
数据存储装置700可以包括通信模块701和处理模块702。
通信模块701可以用于执行图2所示的实施例中的步骤S21,和/或用于执行图3所示的实施例中的步骤S31,和/或用于执行图4所示的实施例中的步骤S41,和/或用于执行图5所示的实施例中的步骤S51,和/或用于执行图6所示的实施例中的步骤S61,和/或用于支持本文所描述的技术的其它过程。通信模块701用于数据存储装置700和其它模块进行通信,其可以是电路、器件、接口、总线、软件模块、收发器或者其它任意可以实现通信的装置。
处理模块702可以用于执行图2所示的实施例中的步骤S22~步骤S26,和/或用于执行图3所示的实施例中的步骤S32~步骤S38,和/或用于执行图4所示的实施例中的步骤S42~步骤S49,和/或用于执行图5所示的实施例中的步骤S52~步骤S55,和/或用于执行图6所示的实施例中的步骤S62~步骤S69,和/或用于支持本文所描述的技术的其它过程。
其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。
本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,另外,在本申请各个实施例中的各功能模块可以集成在一个处理器中,也可以是单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
如图8所示为本申请实施例提供的数据存储装置800,其中,数据存储装置800可以是图2~图6所示的实施例中的存储系统,或者是存储系统的装置,能够实现本申请图2~图6所示的实施例中的存储系统的功能;数据存储装置800也可以是能够支持存储系统实现本申请图2~图6所示的实施例提供的方法中存储系统的功能的装置。其中,数据存储装置800可以为芯片系统。本申请实施例中,芯片系统可以由芯片构成,也可以包含芯片和其他分立器件。
数据存储装置800包括至少一个处理器820,用于实现或用于支持数据存储装置800实现本申请图2~图6所示的实施例中的存储系统的管理单元的功能。示例性地,处理器820可以获取待存储数据的第一信息,并根据该第一信息及预设的策略确定待存储数据期望存储的位置,具体参见方法示例中的详细描述,此处不做赘述。
数据存储装置800还可以包括至少一个存储器830,用于存储程序指令和/或数据。存储器830和处理器820耦合。本申请实施例中的耦合是装置、单元或模块之间的间接耦合或通信连接,可以是电性,机械或其它的形式,用于装置、单元或模块之间的信息交互。处理器820可能和存储器830协同操作。处理器820可能执行存储器830中存储的程序指令。所述至少一个存储器中的至少一个可以包括于处理器中。当处理器820执行存储器830中的程序指令时,可以实现图2~图6所示的方法。
数据存储装置800还可以包括通信接口810,用于通过传输介质和其它设备进行通信,从而用于数据存储装置800和其它设备进行通信。示例性地,该其它设备可以是服务器。处理器820可以利用通信接口810收发数据。
本申请实施例中不限定上述通信接口810、处理器820以及存储器830之间的具体连接介质。本申请实施例在图8中以存储器830、处理器820以及通信接口810之间通过总线840连接,总线在图8中以粗线表示,其它部件之间的连接方式,仅是进行示意性说明,并不引以为限。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图8中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
在本申请实施例中,处理器820可以是通用处理器、数字信号处理器、专用集成电路、现场可编程门阵列或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件,可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。
在本申请实施例中,存储器830可以是非易失性存储器,比如硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD)等,还可以是易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM)。存储器是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。本申请实施例中的存储器还可以是电路或者其它任意能够实现存储功能的装置,用于存储程序指令和/或数据。
本申请实施例中还提供一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机执行图2~图6所示的实施例中第一存储阵列执行的方法。
本申请实施例中还提供一种计算机程序产品,包括指令,当其在计算机上运行时,使得计算机执行图2~图6所示的实施例中第一存储阵列执行的方法。
本申请实施例提供了一种芯片系统,该芯片系统包括处理器,还可以包括存储器,用于实现前述方法中存储系统的功能。该芯片系统可以由芯片构成,也可以包含芯片和其他分立器件。
本申请实施例提供的方法中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、网络设备、用户设备或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,简称DSL)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机可以存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如,数字视频光盘(digital video disc,简称DVD))、或者半导体介质(例如,SSD)等。
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。

Claims (12)

  1. 一种数据存储方法,其特征在于,包括:
    获取待存储数据的第一信息,所述第一信息包括所述待存储数据的类型、所述待存储数据的名称以及与所述待存储数据对应的用户标识中的至少一个信息;
    根据所述待存储数据的第一信息及预设的策略,确定所述待存储数据期望存储的位置,所述预设的策略为当所述第一信息满足条件时,则确定所述期望存储的位置为第一存储空间,否则,确定所述期望存储的位置为第二存储空间,所述第一存储空间为存储系统中读写性能高于或等于阈值的存储空间,所述第二存储空间为所述存储系统中读写性能低于所述阈值的存储空间;
    将所述待存储数据的多个数据包中的至少一个数据包存储至所述期望存储的位置。
  2. 根据权利要求1所述的方法,其特征在于,所述条件包括如下条件中的至少一种:
    所述待存储数据的类型与预设的类型相同;
    所述待存储数据的名称与预设的名称相同;
    与所述待存储数据对应的用户标识与预设的用户标识相同。
  3. 根据权利要求1或2所述的方法,其特征在于,获取待存储数据的第一信息,包括:
    在所述待存储数据的多个数据包中的任一个数据包均未存储至所述存储系统之前,获取所述待存储数据的第一信息;
    将所述待存储数据的多个数据包中的至少一个数据包存储至所述期望存储的位置,包括:
    将所述多个数据包中的每个数据包存储至所述期望存储的位置。
  4. 根据权利要求1或2所述的方法,其特征在于,在获取待存储数据的第一信息之前,所述方法还包括:
    将所述待存储数据的多个数据包中的一部分数据包存储至第一位置,所述第一位置与所述期望存储的位置不同;
    将所述待存储数据的多个数据包中的至少一个数据包存储至所述期望存储的位置,包括:
    将所述多个数据包中除所述一部分数据包外的数据包存储至所述期望存储的位置。
  5. 根据权利要求4所述的方法,其特征在于,所述方法还包括:
    记录所述待存储数据的存储状态,所述存储状态包括第一存储状态及第二存储状态,所述第一存储状态是指将所述待存储数据的多个数据包存储至所述期望存储的位置的状态,所述第二存储状态是指将所述待存储数据的多个数据包分别存储在所述第一位置及所述期望存储的位置的状态;
    获取所述待存储数据的存储状态;
    若所述待存储数据的存储状态指示所述待存储数据处于所述第二存储状态,则将所述待存储数据的所述一部分数据包由所述第一位置迁移至所述期望存储的位置;
    将所述待存储数据的存储状态由所述第二存储状态调整为所述第一存储状态。
  6. 一种数据存储装置,其特征在于,所述装置包括通信接口和处理器,其中:
    所述处理器,用于获取待存储数据的第一信息,所述第一信息包括所述待存储数据的类型、所述待存储数据的名称以及与所述待存储数据对应的用户标识中的至少一个信息; 根据所述待存储数据的第一信息及预设的策略,确定所述待存储数据期望存储的位置,所述预设的策略为当所述第一信息满足条件时,则确定所述期望存储的位置为第一存储空间,否则,确定所述期望存储的位置为第二存储空间,所述第一存储空间为存储系统中读写性能高于或等于阈值的存储空间,所述第二存储空间为所述存储系统中读写性能低于所述阈值的存储空间;
    所述处理器还用于将通过所述通信接口接收的所述待存储数据的多个数据包中的至少一个数据包存储至所述期望存储的位置。
  7. 根据权利要求6所述的装置,其特征在于,所述条件包括如下条件中的至少一种:
    所述待存储数据的类型与预设的类型相同;
    所述待存储数据的名称与预设的名称相同;
    与所述待存储数据对应的用户标识与预设的用户标识相同。
  8. 根据权利要求6或7所述的装置,其特征在于,所述处理器获取待存储数据的第一信息时,具体用于:
    在通过所述通信接口接收的所述待存储数据的多个数据包中的任一个数据包均未存储至所述存储系统之前,获取所述待存储数据的第一信息;
    所述处理器将通过所述通信接口接收的所述待存储数据的多个数据包中的至少一个数据包存储至所述期望存储的位置时,具体用于:
    将所述多个数据包中的每个数据包存储至所述期望存储的位置。
  9. 根据权利要求6或7所述的装置,其特征在于,所述处理器,还用于在获取待存储数据的第一信息之前,将通过所述通信接口接收的所述待存储数据的多个数据包中的一部分数据包存储至第一位置,所述第一位置与所述期望存储的位置不同;
    所述处理器将通过所述通信接口接收的所述待存储数据的多个数据包中的至少一个数据包存储至所述期望存储的位置时,具体用于:
    将所述多个数据包中除所述一部分数据包外的数据包存储至所述期望存储的位置。
  10. 根据权利要求9所述的装置,其特征在于,所述处理器还用于:
    记录所述待存储数据的存储状态,所述存储状态包括第一存储状态及第二存储状态,所述第一存储状态是指将所述待存储数据的多个数据包存储至所述期望存储的位置的状态,所述第二存储状态是指将所述待存储数据的多个数据包分别存储在所述第一位置及所述期望存储的位置的状态;
    获取所述待存储数据的存储状态;
    若所述待存储数据的存储状态指示所述待存储数据处于所述第二存储状态,则将所述待存储数据的所述一部分数据包由所述第一位置迁移至所述期望存储的位置;
    将所述待存储数据的存储状态由所述第二存储状态调整为所述第一存储状态。
  11. 一种计算机可读存储介质,其特征在于,所述介质上存储有指令,当所述指令在计算机上运行时,使得计算机执行如权利要求1-5任一项所述的方法。
  12. 一种计算机程序产品,其特征在于,所述计算机程序产品包含有指令,当所述指令在计算机上运行时,使得所述计算机执行如权利要求1-5任一项所述的方法。
PCT/CN2019/115215 2018-11-21 2019-11-04 一种数据存储方法及装置 WO2020103679A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP19887741.7A EP3869313A4 (en) 2018-11-21 2019-11-04 DATA STORAGE PROCESS AND APPARATUS
US17/325,287 US11550486B2 (en) 2018-11-21 2021-05-20 Data storage method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811394013.6A CN111208934B (zh) 2018-11-21 2018-11-21 一种数据存储方法及装置
CN201811394013.6 2018-11-21

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/325,287 Continuation US11550486B2 (en) 2018-11-21 2021-05-20 Data storage method and apparatus

Publications (1)

Publication Number Publication Date
WO2020103679A1 true WO2020103679A1 (zh) 2020-05-28

Family

ID=70773673

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/115215 WO2020103679A1 (zh) 2018-11-21 2019-11-04 一种数据存储方法及装置

Country Status (4)

Country Link
US (1) US11550486B2 (zh)
EP (1) EP3869313A4 (zh)
CN (1) CN111208934B (zh)
WO (1) WO2020103679A1 (zh)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112416858B (zh) * 2020-11-09 2024-08-06 深圳市珍爱捷云信息技术有限公司 文档存储方法、装置、电子设备和计算机可读存储介质
CN112506435B (zh) * 2020-12-12 2024-04-02 南京地铁建设有限责任公司 一种应用于自动扶梯的数据分级存储方法及系统
CN113986116B (zh) * 2021-09-07 2024-08-20 广东珠江智联信息科技股份有限公司 分布式存储系统及基于分布式存储系统的数据管理方法
CN113835630A (zh) * 2021-09-15 2021-12-24 联泰集群(北京)科技有限责任公司 一种数据存储方法、装置、数据服务器、存储介质及系统
US20240256519A1 (en) * 2023-01-26 2024-08-01 Dell Products L.P. Method and apparatus for validating data images
CN115840543B (zh) * 2023-02-28 2023-05-16 浪潮电子信息产业股份有限公司 一种数据分层存储方法、装置、设备及存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541475A (zh) * 2012-03-12 2012-07-04 成都市华为赛门铁克科技有限公司 数据存储方法和数据存储装置
CN106294421A (zh) * 2015-05-25 2017-01-04 阿里巴巴集团控股有限公司 一种数据写入、读取方法及装置
CN106326487A (zh) * 2016-09-05 2017-01-11 天脉聚源(北京)科技有限公司 一种数据存储方法及装置

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011515727A (ja) * 2008-02-12 2011-05-19 ネットアップ,インコーポレイテッド ハイブリッド媒体ストレージシステムアーキテクチャ
CN101281542B (zh) * 2008-05-09 2011-04-20 成都市华为赛门铁克科技有限公司 一种文件存储方法及装置
US8566549B1 (en) * 2008-12-31 2013-10-22 Emc Corporation Synchronizing performance requirements across multiple storage platforms
CN103457963B (zh) * 2012-05-28 2017-06-27 联想(北京)有限公司 存储文件的方法及分布式存储系统
GB2505185A (en) * 2012-08-21 2014-02-26 Ibm Creating a backup image of a first memory space in a second memory space.
GB2506623A (en) * 2012-10-04 2014-04-09 Ibm Managing user files in a tiered storage system
US20140281301A1 (en) * 2013-03-15 2014-09-18 Silicon Graphics International Corp. Elastic hierarchical data storage backend
CN104598495A (zh) * 2013-10-31 2015-05-06 南京中兴新软件有限责任公司 基于分布式文件系统的分级存储方法及系统
JP6005116B2 (ja) * 2014-09-30 2016-10-12 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation 特定のアプリケーションによってリコールされたファイルの自動化されたマイグレーション
CN104283960B (zh) * 2014-10-15 2018-11-20 福建亿榕信息技术有限公司 实现异构网络存储的虚拟化整合及分级管理的系统
CN106484330A (zh) * 2016-09-27 2017-03-08 郑州云海信息技术有限公司 一种混合磁盘分层数据优化方法和装置
CN107729182B (zh) * 2017-10-11 2020-12-04 苏州乐麟无线信息科技有限公司 数据存储和访问的方法及装置
CN108268217B (zh) * 2018-01-10 2021-04-30 北京航天云路有限公司 一种基于时序数据冷热分类的分层存储方法
CN108846064B (zh) * 2018-06-06 2021-07-23 南京群顶科技有限公司 基于ceph的动态链式存储集群实现方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541475A (zh) * 2012-03-12 2012-07-04 成都市华为赛门铁克科技有限公司 数据存储方法和数据存储装置
CN106294421A (zh) * 2015-05-25 2017-01-04 阿里巴巴集团控股有限公司 一种数据写入、读取方法及装置
CN106326487A (zh) * 2016-09-05 2017-01-11 天脉聚源(北京)科技有限公司 一种数据存储方法及装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3869313A4 *

Also Published As

Publication number Publication date
EP3869313A4 (en) 2021-12-22
CN111208934A (zh) 2020-05-29
US20210271405A1 (en) 2021-09-02
CN111208934B (zh) 2021-07-09
EP3869313A1 (en) 2021-08-25
US11550486B2 (en) 2023-01-10

Similar Documents

Publication Publication Date Title
WO2020103679A1 (zh) 一种数据存储方法及装置
US9830101B2 (en) Managing data storage in a set of storage systems using usage counters
US10346081B2 (en) Handling data block migration to efficiently utilize higher performance tiers in a multi-tier storage environment
US7555613B2 (en) Storage access prioritization using a data storage device
US7010657B2 (en) Avoiding deadlock between storage assignments by devices in a network
US20150026417A1 (en) Caching Method for Distributed Storage System, a Lock Server Node, and a Lock Client Node
WO2018068626A1 (zh) 一种磁盘锁的管理方法、装置和系统
CN110688062B (zh) 一种缓存空间的管理方法及装置
US11226778B2 (en) Method, apparatus and computer program product for managing metadata migration
US20110119461A1 (en) File system quota and reservation
EP4087212A1 (en) Method and apparatus for cloning file system
US20220164316A1 (en) Deduplication method and apparatus
WO2023116438A1 (zh) 一种数据访问方法、装置以及设备
JP2022550401A (ja) データのアップロード方法、システム、装置及び電子機器
WO2022171000A1 (zh) 一种数据迁移方法、系统、设备以及介质
US10545667B1 (en) Dynamic data partitioning for stateless request routing
KR101531564B1 (ko) 네트워크 분산 파일 시스템 기반 iSCSI 스토리지 시스템에서의 부하 분산 방법 및 시스템
EP3188029B1 (en) Management and dispatching apparatus, system, and method based on sas
US20230028301A1 (en) Data management apparatus, data management method, and data storage device
EP4040279A1 (en) Method and apparatus for accessing solid state disk
WO2018116389A1 (en) Method and distributed storage system for aggregating statistics
US20200348877A1 (en) Server and associated computer program product
CN116594551A (zh) 一种数据存储方法及装置
WO2021063242A1 (zh) 一种存储系统的元数据的发送方法及存储系统
US20240078485A1 (en) Data management system and data management method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19887741

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2019887741

Country of ref document: EP

Effective date: 20210520