WO2018121456A1 - 一种数据存储方法、服务器以及存储系统 - Google Patents

一种数据存储方法、服务器以及存储系统 Download PDF

Info

Publication number
WO2018121456A1
WO2018121456A1 PCT/CN2017/118148 CN2017118148W WO2018121456A1 WO 2018121456 A1 WO2018121456 A1 WO 2018121456A1 CN 2017118148 W CN2017118148 W CN 2017118148W WO 2018121456 A1 WO2018121456 A1 WO 2018121456A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
hard disk
server
target
hard disks
Prior art date
Application number
PCT/CN2017/118148
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 华为技术有限公司
Publication of WO2018121456A1 publication Critical patent/WO2018121456A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/1608Error detection by comparing the output signals of redundant hardware
    • G06F11/1612Error detection by comparing the output signals of redundant hardware where the redundant component is persistent storage
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/1629Error detection by comparing the output of redundant processing systems
    • G06F11/165Error detection by comparing the output of redundant processing systems with continued operation after detection of the error
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/202Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where processing functionality is redundant
    • G06F11/2041Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where processing functionality is redundant with more than one idle spare processing component

Definitions

  • the embodiments of the present invention relate to the field of data storage technologies, and in particular, to a data storage method, a server, and a storage system.
  • any one of the storage systems 1 includes a plurality of logical groups.
  • the server 10 includes a plurality of logical groups, for example, a logical group 101, a logical group 102, and a logic.
  • Group 103, each logical grouping includes one or more hard disks.
  • logical grouping 101 includes a hard disk 1011, a disk 1012, and a disk 1013.
  • the server 10 stores the data to be stored (including M original data and N redundant data, wherein N redundant data is a checksum of M original data) into a logical grouping by logical grouping, for example, As shown in FIG. 1b, the server 10 writes the original data into the Disk 1011 and writes the redundant data into the Disk 1012 and the Disk 1013.
  • the Disk 1011 fails, the original data cannot be successfully stored in the Disk 1011, so that the data stored in the logical group 101 may be degraded (refer to the source data due to the hard disk in the logical grouping).
  • the failure cannot write complete raw data and redundant data), and if the data is degraded and written, if the hard disk failure occurs again in a logical group, data loss will occur, thereby reducing the reliability of the data written to the logical group. .
  • the embodiment of the present invention provides a data storage method, a server, and a storage system, which are used to solve the problem that the data storing the logical group is degraded and written when any one of the logical disks fails in the prior art.
  • an embodiment of the present invention provides a data storage method, which is applied to a storage system, where the storage system includes multiple servers, each of the multiple servers includes at least one logical group, and each logical group in at least one logical group
  • the method includes the following steps: when the first server determines that the first hard disk in the first logical group of the first server is faulty, the first server obtains the identifier of the target hard disk; the target hard disk is the hard disk included in the storage system.
  • the first hard disk is a different hard disk, and the first server is one of the plurality of servers; the first server stores the target data in the target hard disk indicated by the identifier according to the identifier; the target data is to be stored to the first server.
  • the embodiment of the present invention provides a data storage method, by determining the identifier of the target hard disk from the management module of the storage system when determining the first hard disk failure in the first logical group, and then using the target hard disk indicated by the identifier as a temporary member.
  • the disk is used for storing data to be stored in the first hard disk, so that when the first hard disk is faulty, the data to be stored in the first hard disk is temporarily recorded in the target hard disk, thereby ensuring that the source data can be written in the storage system.
  • the complete number of redundant data and raw data thus ensuring that the source data does not have degraded writes (meaning that the source data cannot be written to the complete raw data and redundant data due to the hard disk failure in the logical group, and the target hard disk is from the whole
  • the storage system is selected from a plurality of hard disks, so that the selected target hard disks may be located in the first logical grouping or may not be located in the first logical grouping, and the capacity of the storage system can be effectively balanced.
  • the source data includes M primary data and N redundant data, and each of the M primary data and the N redundant data carries a version. Number; a version number of the data is used to indicate whether the data is valid; N, M are positive integers greater than or equal to 1; M is greater than N, the first server stores the remaining data of the source data except the target data to
  • the method provided by the embodiment of the present invention further includes: receiving, by the first server, a read data service request for reading source data, where the first server receives the remaining hard disks in the first logical group; Reading, according to the read data service request, M original data and N redundant data, and a version number of each data from the first logical group and the target hard disk respectively; the first server is from the M according to the version number of each data. At least M valid data are determined from the original data and the N redundant data; the first server obtains the source data according to at least M valid data, and returns the source data to the client.
  • the first server obtains the original data and the N portions according to the version number of each data. Determining at least M pieces of valid data in the redundant data, comprising: determining, by the first server, that the M number of the original data and the N pieces of redundant data have the same version number of the M or more pieces of data, determining whether the M or M parts are more than Each piece of data in the data is valid.
  • the first server is in each of the remaining hard disks and An operation log is stored in the target hard disk, and an operation log of a hard disk is used to indicate an offset of data stored in the one hard disk, and an offset of the data is used to indicate that the data is in a hard disk stored therein
  • the address offset of the embodiment of the present invention further includes: when determining that the state of the first hard disk is normal, the first server relocates the target data from the target hard disk to the first hard disk according to the operation log.
  • the embodiment of the present invention before obtaining the identifier of the target hard disk from the management module of the storage system, the embodiment of the present invention The method further includes: sending, by the first server, the management module, to instruct the management module to remove a hard disk from the plurality of hard disks included in the storage system or the plurality of hard disks except the first logical group Selecting a hard disk for storing the target data as the first request message of the target hard disk; the first server receives the first response message that is sent by the management module and carrying the target hard disk identifier, where the target hard disk is the management module And selecting, among the plurality of hard disks or the plurality of hard disks, among the remaining hard disks belonging to the first logical group according to a preset policy.
  • the preset policy is a preset priority level according to each hard disk of the multiple hard disks. The hard disk with the highest priority among the remaining hard disks except the first hard disk is determined as the target hard disk.
  • an embodiment of the present invention provides a server, which is applied to a storage system, where the storage system includes multiple servers, each of the multiple servers includes at least one logical group, and each of the at least one logical group includes multiple logical groups.
  • the hard disk, the server includes: a receiving unit, configured to: when determining the first hard disk failure in the first logical group, obtain the identifier of the target hard disk from the management module of the storage system; the target hard disk is sent by the management module to the first server After the first request message is selected from the plurality of hard disks included in the storage system according to a preset policy, the first logical group is located in the first server, and the first server is any one of the plurality of servers included in the storage system; a storage unit, configured to store, according to the identifier, the target data into the target hard disk indicated by the identifier; the target data is data to be stored to the first hard disk in the source data to be stored to the first server; the storage unit is further configured to The remaining data in the source
  • the source data includes M primary data and N redundant data, and each of the M primary data and the N redundant data carries a version Number; a version number of the data is used to indicate whether the data is valid; N, M are positive integers greater than or equal to 1, M is greater than N, and the receiving unit is configured to receive the read by the client for reading the source data.
  • a reading unit configured to read M primary data and N redundant data, and a version number of each data from the first logical group and the target hard disk according to the read data service request; And determining, according to the version number of each piece of data, at least M pieces of valid data from the M pieces of original data and the N pieces of redundant data; the response unit, configured to obtain the source data according to the at least M pieces of valid data, and return the source data to Client.
  • the acquiring unit is specifically configured to: if the M primary data and the N redundant data are determined If there are M or more versions of the data having the same version number, it is determined that each of the M or M pieces of data is valid data.
  • the storage unit is further configured to: in each of the remaining hard disks and the target hard disk An operation log is stored, an operation log of a hard disk is used to indicate an offset of data stored in one hard disk, and an offset of the data is used to indicate an address offset of the data in the hard disk it stores, and And when determining that the state of the first hard disk is normal, the target data is relocated from the target hard disk to the first hard disk according to the operation log.
  • the server further includes a sending unit, configured to send the first request message to the management module, where A request message is used to instruct the management module to select one hard disk from the plurality of hard disks or the plurality of hard disks included in the storage system except the first logical group, as the target hard disk; and the receiving unit is further configured to receive the management module. And sending, by the management module, a first response message that is selected from the plurality of hard disks or the plurality of hard disks according to a preset policy, except for the target hard disks selected by the remaining hard disks other than the first logical group.
  • the preset policy is that, according to a preset priority level of each hard disk of the multiple hard disks, The hard disk with the highest priority among the plurality of hard disks is determined as the target hard disk.
  • an embodiment of the present invention provides a server, where the server includes a processor, a memory, and a communication bus, where the processor and the memory are connected by using a communication bus, where the memory is used to store a software program and a module, and the processor is used to run the software program. And a module, thereby performing the data storage method described in any one of the possible implementations of the first aspect to the sixth possible implementation of the first aspect.
  • an embodiment of the present invention provides a storage system, where the storage system includes multiple servers, each of the multiple servers includes at least one logical group, and each of the at least one logical group includes multiple A hard disk, wherein each server employs a server as described in any one of the possible implementations of the second aspect.
  • an embodiment of the present invention provides a computer storage medium for storing computer software instructions used in the data storage method described in the first aspect, which is configured to perform the design of the server described in the third aspect. program.
  • 1a is a schematic structural diagram of a storage system provided by the prior art
  • FIG. 1b is a schematic diagram of data storage provided by the prior art
  • FIG. 2a is a schematic structural diagram of a storage system according to an embodiment of the present invention.
  • 2b is a schematic structural diagram of a server according to an embodiment of the present invention.
  • FIG. 3 is a schematic flowchart 1 of a data storage method according to an embodiment of the present invention.
  • 4a is a schematic diagram 1 of a data storage structure according to an embodiment of the present invention.
  • FIG. 4b is a schematic diagram 2 of a data storage structure according to an embodiment of the present disclosure.
  • FIG. 5 is a schematic flowchart 2 of a data storage method according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic flowchart 3 of a data storage method according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic flowchart 4 of a data storage method according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic structural diagram 1 of a server according to an embodiment of the present disclosure.
  • FIG. 8b is a schematic structural diagram 2 of a server according to an embodiment of the present disclosure.
  • FIG. 8c is a schematic structural diagram 3 of a server according to an embodiment of the present invention.
  • an embodiment of the present invention provides a storage system, where the storage system 2 includes multiple servers (for example, a server 21, a server 22, and a server 23, and one or more servers are connected by a switch 241 and a switch 242.
  • Each of the plurality of servers included in the storage system 2 includes one or more logical packets (eg, logical grouping 211, logical grouping 212, and logical grouping 213), one logical grouping for storing one or more source data
  • the logical grouping includes a plurality of hard disks.
  • the logical grouping 211 includes a hard disk 2111, a hard disk 2112, and a hard disk 2113.
  • the logical grouping 212 includes a hard disk 2112, a hard disk 2121, and a hard disk 2122.
  • a hard disk may belong to multiple logical groupings.
  • the hard disk 2112 belongs to both the logical grouping 211 and the logical grouping 212.
  • the hard disk 2113 belongs to both the logical grouping 213 and the logical grouping 211. Only FIG. 2a shows Three servers (server 21, server 22, and server 23) and three logical groups (logical grouping 211, logical points, respectively) Logical grouping 212 and 213), it will be appreciated that the storage system according to an embodiment of the present invention may further include more or fewer servers, each server may include more or fewer logical grouping.
  • the storage system shown in FIG. 2a provided by the embodiment of the present invention is provided with a management module 25, which is connected to each of the plurality of servers, and is used for acquiring information of multiple hard disks included in each server, for example, The capacity information of multiple hard disks, the hard disk ID of multiple hard disks, the identifier of the logical group to which each hard disk belongs, the state of each hard disk of multiple hard disks, etc. (for example, fault or normal state).
  • the management module is configured to periodically update the information of each hard disk in the storage system according to a preset period, and report the information of each hard disk to the server where the hard disk is located, and the request message for receiving the server (for example, After a request message, one of the plurality of hard disks included in the storage system or the plurality of hard disks other than the first logical group is selected as the target hard disk according to the request message of the server.
  • the management module 25 queries the information of each hard disk included in the storage system after the storage system is successfully initialized, and then records the information of each hard disk that is queried in the management module 25, and queries each The information of the hard disk is reported to the server where the corresponding hard disk is located.
  • any one of the servers as described in FIG. 2b may also be referred to as a node, and at least one server is a network device that can provide services for the client.
  • the server 21, the server 22, and the server 23 may be computers with server functions, etc. .
  • the hardware structure of each server in the storage system shown in FIG. 2a is described by using the server 21 as an example.
  • the server 21 includes a memory 2031, a processor 2032, and a system. Bus 2033, power supply component 2034, input/output interface 2035, communication component 2036, and the like.
  • the memory 2031 can be used for storing data, a software program, and a module, and mainly includes a storage program area and a storage data area, the storage program area can store an operating system, an application required for at least one function, and the like, and the storage data area can store the server 203. Use the created data, etc.
  • the processor 2032 performs various functions and processing data of the server 203 by running or executing software programs and/or modules stored in the memory 2031, and calling data stored in the memory 2031.
  • the system bus 2033 includes an address bus, a data bus, a control bus for transmitting data and instructions, a power supply component 2034 for providing power to various components of the server 203, and an input/output interface 2035 for providing between the processor 2032 and the peripheral interface module.
  • the interface; the communication component 2036 is configured to perform wired or wireless communication between the server 21 and other devices.
  • the server 21 undertakes key tasks such as storing, forwarding, and publishing data, and is based on a client/server (C/S) mode or a browser/server (Browser/Server, Abbreviation: An important part of the B/S mode network.
  • an embodiment of the present invention provides a data storage method, which is applied to a storage system as shown in FIG. 2a, where the storage system includes multiple servers, and each of the multiple servers includes at least one logical grouping. Each of the at least one logical group includes a plurality of hard disks, and the method provided by the embodiment of the present invention includes:
  • the first server obtains an identifier of the target hard disk when the first hard disk in the first logical group of the first server is determined.
  • the target hard disk is a hard disk that is different from the first hard disk in the hard disk included in the storage system.
  • the first server is one of the plurality of servers.
  • the first server stores the target data in the target hard disk indicated by the identifier according to the identifier.
  • the target data is data to be stored to the first hard disk in the source data to be stored in the first server.
  • the embodiment of the present invention provides a data storage method, by determining the identifier of the target hard disk from the management module of the storage system when determining the first hard disk failure in the first logical group, and then using the target hard disk indicated by the identifier as a temporary member.
  • the disk is used for storing data to be stored in the first hard disk, so that when the first hard disk is faulty, the data to be stored in the first hard disk is temporarily recorded in the target hard disk, thereby ensuring that the source data can be written in the storage system.
  • the complete number of redundant data and original data thus ensuring that there is no degraded write of the source data (degraded write means that the source data cannot be written to the complete raw data and redundant data due to a hard disk failure in the logical group), and the target hard disk It is selected from a plurality of hard disks included in the entire storage system, so that the selected target hard disks may be located in the first logical grouping or may not be located in the first logical grouping, and the capacity of the storage system can be effectively balanced.
  • the first hard disk fault indication information is reported to the management module 25, so that the management module 25 can store each hard disk according to the plurality of hard disks. And determining the target hard disk capable of storing the target data, and sending the determined identifier of the target hard disk to the first server, so that the first server determines, according to the identifier, a target hard disk for temporarily replacing the first hard disk.
  • the identifier of the target hard disk is used to uniquely identify the target hard disk.
  • the IP address of the target hard disk may be the physical address of the target hard disk, which is not limited in this embodiment of the present invention.
  • the first server stores the source data in the first logical group in a data redundancy manner. Specifically, the first server divides the source data into M pieces of original data and N pieces of redundant data, and the value of the M is The values of and N can be set according to the number of hard disks in the first logical grouping. Exemplarily, if the source data is 2M data, the 2M source data can be divided into two pieces of original data each having a size of 1M, and one checksum is obtained according to the original data of each size of 1M. A redundant data, two original data and one redundant data of each size are stored in a logical grouping. Specifically, each original data may be separately stored in one hard disk in the logical group, and one redundant data is stored in one other hard disk in the one logical group.
  • the sum of M and N may be less than or equal to the number of hard disks included in the first logical group, and M is greater than N.
  • the server 21 stores two pieces of original data in the source data in the hard disk 2111 and the hard disk 2112, respectively, and stores one copy of the redundant data in the hard disk 2113.
  • the faulty hard disk is taken as an example of the hard disk 2113.
  • the server 21 determines that the hard disk 2113 (ie, the first hard disk) in the first logical grouping 211 is faulty, the server 201 receives the fault from the management module 25. Obtaining the identifier of the target hard disk, and using the target hard disk as a temporary member disk for storing data to be stored in the first hard disk.
  • the server 21 uses the hard disk 2114 as a target hard disk, wherein the hard disk 2114 may belong to the first logical grouping 211, or may not belong to the first logical grouping 211.
  • the hard disk 2114 may be one of the servers 22 in the storage system as shown in FIG. 2a, or the hard disk 2114 may also be as shown in the figure. Any one of the second logical groups 2112 of the server 21 in the storage system shown in 2a.
  • the server 21 stores the redundant data to be stored in the hard disk 2113 in the target hard disk (i.e., the hard disk 2114).
  • the first server directly stores the target data to the target hard disk.
  • the first server sends a request message to the second server through the switch, where the request message carries target data, and the request message Used to instruct the second server to write target data to the target hard disk.
  • the data to be stored in the hard disk 2113 is the file 1, the file 2, the file 3, and the file 4, after the file 1 and the file 2 are stored in the hard disk 2113, the hard disk 2113 is faulty, and only the file 3 is needed. And file 4 is stored in the hard disk 2114. When reading data, files 3 and 4 can be read directly from the hard disk 2114 as needed.
  • the embodiment of the present invention may further include steps S104a and S104b before step S101:
  • the first server sends a first request message to the management module of the storage system, where the first request message is used to instruct the management module to remove the hard disk or the plurality of hard disks included in the storage system from the first logical group. Select a hard disk in the hard disk as the target hard disk.
  • the first server receives the first response message sent by the management module, where the first response message carries the identifier of the target hard disk, and the target hard disk is the management module, from the plurality of hard disks or the plurality of hard disks according to the preset policy. The selected one of the remaining hard disks other than the first logical grouping.
  • the first request message carries the indication information, where the indication information carries the identifier of the first hard disk and the state of the first hard disk is a fault state, and after receiving the first request message, the management module according to the After the first request message confirms that the first hard disk is faulty, on the one hand, the management module selects one hard disk from the plurality of hard disks included in the storage system except the first hard disk as the target hard disk according to the preset policy, so that the selected one is selected.
  • the target hard disk may belong to the first logical grouping of the first server, or may be the hard disk on the remaining servers of the storage system except the first server.
  • the management module can select one hard disk from the plurality of hard disks included in the storage system except the first logical group according to the preset policy, as the target hard disk, so as to avoid the selected target.
  • the hard disk is in the first logical grouping.
  • the management module can select one hard disk from the plurality of hard disks included in the storage system except the ones belonging to the first server according to the preset policy, as the target hard disk.
  • the preset policy in the embodiment of the present invention is to preset a hard disk with the highest priority among the remaining hard disks except the first hard disk according to a preset priority level of each of the plurality of hard disks. Determined as the target hard drive.
  • the management module may determine a preset priority level of each hard disk according to a capacity or a capacity occupancy rate of each hard disk.
  • the hard disk with the largest capacity among the plurality of hard disks can be determined as the hard disk with the highest priority, and then the preset priority level of each hard disk is set in order of the largest capacity, that is, the hard disk with the largest capacity.
  • the default priority is the highest, and the hard disk with the smallest capacity has the lowest preset priority.
  • the embodiment of the present invention selects the hard disk with the largest capacity according to the capacity of each hard disk of the plurality of hard disks as the target hard disk, or selects the hard disk with the lowest capacity occupation rate as the target hard disk according to the capacity occupancy rate of each of the plurality of hard disks, so that The capacity or capacity occupancy of each hard disk in the storage system is selected to target the hard disk, which can balance the capacity of each hard disk in the storage system.
  • the two or more devices may be determined according to the capacity occupancy rate of each of the two or more hard disks.
  • the default priority level of each hard disk in the hard disk Illustratively, the capacity occupancy of two or more hard disks of equal capacity is sorted in order of capacity occupancy from low to high, and the capacity occupancy of two or more hard disks having the same capacity is the lowest.
  • the default priority of the hard disk is set to the highest (in two or more hard disks with equal capacity), and the preset priority level of the hard disk with the highest capacity occupancy of two or more hard disks with the same capacity is set. The lowest (in two or more hard drives with equal capacity).
  • the capacities of hard disk A, hard disk B, and hard disk C are respectively Q, but the capacity occupancy rate of hard disk A is 50%, the capacity occupancy rate of hard disk B is 51%, and the capacity occupancy rate of hard disk C is 49%.
  • the preset priority level of the hard disk C can be set higher than the preset priority level of the hard disk A, and the preset priority level of the hard disk A is higher than the preset priority level of the hard disk B.
  • two or more of the two hard disks may be determined according to the capacity corresponding to each of the two or more hard disks having the same capacity occupancy rate.
  • the preset priority level of each hard disk in the hard disk with the same capacity usage For example, the hard disk with the largest capacity of any two or more hard disks with the same capacity capacity can be determined as the hard disk with a higher preset priority, and then the capacity is used according to two or more capacities.
  • the default priority level of each hard disk is set in order from the highest to the lowest in each hard disk.
  • the default priority of hard disk A, hard disk B, and hard disk C is 60%, but the capacity of hard disk A is 32G, the capacity of hard disk B is 16G, and the capacity of hard disk C is 64G, then hard disk A, hard disk B and In the hard disk C, the preset priority level of the hard disk A is higher than the preset priority level of the hard disk B. However, the preset priority level of the hard disk A is lower than the preset priority level of the hard disk C.
  • each of the M primary data and the N redundant data carries a version number, and the version number is used to indicate each data.
  • the method provided by the embodiment of the present invention further includes:
  • the first server receives a read data service request sent by the client, where the read data service request is used to read the source data.
  • the read data service request carries an identifier of the active data.
  • the first server stores a record table for recording which logical grouping the M pieces of original data and the N pieces of redundant data included in the source data are located.
  • the first server reads the M primary data and the N redundant data, and a version number of each data, from the first logical group and the target hard disk according to the read data service request.
  • the first server needs to be acquired from the first hard disk, and the source data is stored in the first before the first hard disk fault occurs.
  • the data in the hard disk and the version number of the data in the source data that has been stored in the first hard disk are identical to the state of the first hard disk and the version number of the data in the source data that has been stored in the first hard disk.
  • the first server determines at least M valid data from the M primary data and the N redundant data according to the version number of each data.
  • the source data is divided into two pieces of original data, and then a redundant data is calculated according to an EC (ErasureCode) algorithm.
  • the first server only needs to find two valid data among the three data (ie, two original data and one redundant data) according to the read data service request for reading the source data sent by the client.
  • the source data can be calculated by the EC algorithm.
  • the first server acquires source data according to at least M valid data, and returns the source data to the client.
  • step S107 the step S107 provided by the embodiment of the present invention may be implemented in the following manner:
  • the embodiment of the present invention sets the version number of each of the M pieces of original data and the N pieces of redundant data included in the source data, so that even if the target data stored in the target hard disk is not moved back to the first hard disk, the version may be Obtaining at least M valid data of M original data and N redundant data, and obtaining source data according to at least M valid data, so that the client can read before the target data is not moved back to the first hard disk Source data is added to enhance storage system availability.
  • step S109 the embodiment of the present invention further includes step S109:
  • the first server stores an operation log in each of the remaining hard disks and the target hard disk, and an operation log of the hard disk is used to indicate an offset of data stored in one hard disk, and an offset of the data. Used to indicate the amount of address offset in the hard disk it stores.
  • the embodiment of the present invention stores the operation log in each hard disk, so that when the first server is restarted, the problem that the operation log is lost due to the restart of the first server can be avoided, because the operation log is stored in the first in the prior art.
  • the operation log will be lost after the first server is restarted, and the first server can only reconstruct the data of the migration target according to the entire disk, so that the time for the target data to be moved back to the first hard disk becomes longer. Therefore, the embodiment of the present invention Compared with the prior art, according to the operation log fetching the target data, the time for the target data to be moved back to the first hard disk can be reduced.
  • the S109 may be performed at the same time as the steps S102 and 103 are performed, and the S109 may be performed after the steps S102 and S103 are performed, which is not limited by the embodiment of the present invention. It can be understood that the step 102 and The sequence of 103 and S109 does not affect the technical solution of the embodiment of the present invention, and only the operation log can be ensured in each hard disk.
  • the method provided by the embodiment of the present invention further includes:
  • the first server when determining that the state of the first hard disk is normal, moves the target data from the target hard disk to the first hard disk according to the operation log.
  • the first server may directly move the target data stored on the target hard disk to the first hard disk.
  • the first server may be to the server where the target hard disk is located (for example, the server 22 as shown in FIG. 2a) Sending a request message, the request message is used to indicate that the server where the target hard disk is located sends the target data to the first server, and then the first server receives the target data fed back by the server where the target hard disk is located, and stores the target data in the first In the hard drive.
  • An embodiment of the present invention provides a computer storage medium for storing computer software instructions for use in the data storage method described in the first aspect, comprising a program designed to execute the server of the above embodiment.
  • the solution provided by the embodiment of the present invention is mainly introduced from the perspective of a server.
  • the server or the like includes a corresponding hardware structure and/or software module for executing each function in order to implement the above functions.
  • the present invention can be implemented in a combination of hardware or hardware and computer software in combination with the elements and algorithm steps of the various examples described in the embodiments disclosed herein. Whether a function is implemented in hardware or computer software to drive hardware depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods for implementing the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present invention.
  • the embodiment of the present invention may divide a function module into a server or the like according to the foregoing method example.
  • each function module may be divided according to each function, or two or more functions may be integrated into one processing module.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of the module in the embodiment of the present invention is schematic, and is only a logical function division, and the actual implementation may have another division manner.
  • FIG. 8a shows a possible structural diagram of a server involved in the foregoing embodiment
  • the server 1 includes a receiving unit 10 and a storage unit 11 in the case of dividing each functional module by a corresponding function.
  • the receiving unit 10 is configured to support the server 1 to execute the processes S101, S104b, and S105 described in the foregoing embodiments
  • the storage unit 11 is configured to support the server to execute the steps S102, S103, S109, and S110 described in the foregoing embodiments.
  • the server 1 provided by the embodiment of the present invention may further include a reading unit, a response unit, and a sending unit.
  • the sending unit is configured to support the server 1 to execute S104a in the foregoing embodiment
  • the determining unit is configured to support the server to execute the foregoing embodiment.
  • the described step S107 (specifically, S1071), a response unit for supporting the server to execute S108 described in the above embodiment, is used to support the server 1 to execute the process S106 in the above embodiment. All the related content of the steps involved in the foregoing method embodiments may be referred to the functional descriptions of the corresponding functional modules, and details are not described herein again.
  • FIG. 8b shows a possible structural diagram of the server involved in the above embodiment.
  • the server 1 includes a processing module 102 and a communication module 103.
  • the processing module 102 is configured to control and manage the actions of the server 1.
  • the processing module 102 is configured to support the server 1 to perform the steps S101, S102, S103, S104a, S104b, S105, S106, S107 described in the embodiment (specific S1071), S108, S109, and S110 are included, and/or other processes for the techniques described herein.
  • the communication module 103 is configured to support communication between the server and other network entities (for example, communicating with the management module 25 and other servers in the storage system except the first server and communicating with the client), and the server 1 may also include storage.
  • the module 101 is configured to store program code and data of the server 1.
  • the processing module 102 can be a processor or a controller, for example, a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), and an application-specific integrated circuit (Application-Specific Integrated Circuit (ASIC), Field Programmable Gate Array (FPGA) or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It is possible to implement or carry out the various illustrative logical blocks, modules and circuits described in connection with the present disclosure.
  • the processor may also be a combination of computing functions, for example, including one or more microprocessor combinations, a combination of a DSP and a microprocessor, and the like.
  • the communication module 103 can be a transceiver, a transceiver circuit or a communication interface 1013, and the like.
  • the storage module 101 can be a memory.
  • the server 1 When the processing module 102 is the processor 1012, the communication module 103 is the communication interface 1013, and the storage module 101 is the memory, the server 1 according to the embodiment of the present invention may be the server shown in FIG. 8c.
  • the server 1 includes a processor 1012, a communication interface 1013, a memory 1011, and a bus 1014.
  • the communication interface 1013, the processor 1012, and the memory 1011 are connected to each other through a bus 1014.
  • the bus 1014 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. Wait.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • Wait The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 8c, but it does not mean that there is only one bus or one type of bus.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the modules or units is only a logical function division.
  • there may be another division manner for example, multiple units or components may be used. Combinations can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including a plurality of instructions for causing a computer device (which may be a personal computer, a server, Either a network device or the like) or a processor performs all or part of the steps of the method described in various embodiments of the invention.
  • the storage medium is a non-transitory medium, including: a flash memory, a mobile hard disk, a read only memory, a random access memory, a magnetic disk, or an optical disk, and the like, which can store program code.

Landscapes

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

Abstract

本发明实施例提供一种数据存储方法、服务器以及存储系统,尤其涉及数据存储技术领域,用以解决现有技术中若逻辑分组中存在任意一个硬盘故障时,造成的存储该逻辑分组的数据出现降级写的问题,包括:第一服务器在确定第一服务器的第一逻辑分组中的第一硬盘故障时,获取目标硬盘的标识;目标硬盘为所述存储系统包括的硬盘中与第一硬盘不同的硬盘,第一服务器为所述多个服务器中的一个;第一服务器根据标识,将目标数据存储至标识所指示的目标硬盘中;目标数据为源数据中待存储至第一硬盘的数据;第一服务器将源数据中除目标数据之外的其余数据,存储至第一逻辑分组中除第一硬盘之外的其余硬盘中。

Description

一种数据存储方法、服务器以及存储系统 技术领域
本发明实施例涉及数据存储技术领域,尤其涉及一种数据存储方法、服务器以及存储系统。
背景技术
随着存储容量的不断增大,存储系统中服务器、硬盘数量也在增加,如何保证在出现节点、硬盘或网络等故障的情况下,还能保证新写入存储系统的数据的可靠性成为日益迫切的需求。
现有技术中,如图1a所示,存储系统1中任意一个服务器均包括多个逻辑分组,如图1a所示,服务器10包括多个逻辑分组,例如,逻辑分组101、逻辑分组102以及逻辑分组103,每个逻辑分组包括一个或多个硬盘,例如,逻辑分组101包括硬盘(Disk)1011、Disk1012以及Disk1013。服务器10将待存入数据(包括M个原始数据和N个冗余数据,其中,N个冗余数据为M个原始数据的校验和)以逻辑分组为粒度存入一个逻辑分组中,例如,如图1b所示,服务器10将原始数据写入Disk1011中,将冗余数据写入Disk1012和Disk1013中。
但是,如图1b所示,在Disk(硬盘)1011故障时,原始数据则不能成功存入Disk1011中,使得存入逻辑分组101的数据,会出现降级写(指源数据由于逻辑分组中的硬盘故障不能写入完整的原始数据和冗余数据),并且数据出现降级写后,若在一个逻辑分组中再次出现硬盘故障,则会导致数据丢失,从而降低写入该逻辑分组的数据的可靠性。
发明内容
本发明的实施例提供一种数据存储方法、服务器以及存储系统,用以解决现有技术中若逻辑分组中任意一个硬盘故障时,造成的存储该逻辑分组的数据出现降级写的问题。
为达到上述目的,本发明的实施例采用如下技术方案:
第一方面,本发明实施例提供一种数据存储方法,应用于存储系统中,存储系统包括多个服务器,多个服务器中每个服务器包括至少一个逻辑分组,至少一个逻辑分组中每个逻辑分组包括多个硬盘,本发明实施例提供方法包括:第一服务器在确定第一服务器的第一逻辑分组中的第一硬盘故障时,获取目标硬盘的标识;目标硬盘为存储系统包括的硬盘中与所述第一硬盘不同的硬盘,第一服务器为所述多个服务器中的一个;第一服务器根据标识,将目标数据存储至标识所指示的目标硬盘中;目标数据为待存储至第一服务器的源数据中待存储至第一硬盘的数据;第一服务器将源数据中除所述目标数据之外的其余数据,存储至第一逻辑分组中除第一硬盘之外的其余硬盘中。
本发明实施例提供一种数据存储方法,通过在确定第一逻辑分组中的第一硬盘故障时,从存储系统的管理模块处获取目标硬盘的标识,然后将该标识指示的目标硬盘作为临时成员盘用于存储待存入第一硬盘的数据,这样能够在第一硬盘故障时,及时将待存入第一硬盘的数据临时记录到目标硬盘中,保证了源数据能够在存储系统中写入完整份数的冗余数据和原始数据,从而保证了源数据不存在降级写(指源数据由于逻辑分组中的硬盘故障不能写入完整的原始数据和冗余数据,并且,目标硬盘是从整个存储系统包括的多个硬盘中选择的,这样所选择的目标硬盘可以位于第一逻辑分组中,也可以不位于第一逻辑分组中,能够有效的平衡存储系统的容量。
结合第一方面,在第一方面的第一种可能的实现方式中,源数据包括M份原始数据和N份冗余数据,M份原始数据和N份冗余数据中每份数据均携带版本号;一份数据的版本号用于指示数据是否有效;N、M均为大于或等于1的正整数;M大于N,第一服务器将源数据中除目标数据之外的其余数据,存储至第一逻辑分组中除第一硬盘之外的其余硬盘中之后,本发明实施例提供的方法还包括:第一服务器接收客户端发送的用于读取源数据的读数据业务请求;第一服务器根据读数据业务请求,从第一逻辑分组以及目标硬盘中分别读取M份原始数据和N份冗余数据,以及每份数据的版本号;第一服务器根据每份数据的版本号,从M份原始数据和N份冗余数据中确定至少M份有效数据;第一服务器根据至少M份有效数据获取源数据,以及将源数据返回给客户端。
结合第一方面或第一方面的第一种可能的实现方式,在第一方面的第二种可能的实现方式中,第一服务器根据每份数据的版本号,从M份原始数据和N份冗余数据中确定至少M份有效数据,包括:第一服务器若确定M份原始数据和N份冗余数据中存在M份或M份以上的数据的版本号一致,则确定M或M份以上的数据中的每份数据均为有效数据。
结合第一方面至第一方面的第二种可能的实现方式中的任意一种实现方式,在第一方面的第三种可能的实现方式中,第一服务器在其余硬盘中的每个硬盘以及所述目标硬盘中存储有操作日志,一个硬盘的操作日志用于指示存储在所述一个硬盘中的数据的偏移量,一个数据的偏移量用于指示所述数据在其存储的硬盘中的地址偏移量,本发明实施例提供的方法还包括:第一服务器在确定第一硬盘的状态为正常时,根据操作日志则将目标数据从目标硬盘中回迁至第一硬盘中。
结合第一方面至第一方面的第三种可能的实现方式中,在第一方面的第四种可能的实现方式中,从存储系统的管理模块处获取目标硬盘的标识之前,本发明实施例提供的方法还包括:第一服务器向管理模块发送用于指示所述管理模块从所述存储系统包括的多个硬盘或者所述多个硬盘中除属于所述第一逻辑分组之外的其余硬盘中选择一个用于存储所述目标数据的硬盘,作为目标硬盘的第一请求消息;第一服务器接收所述管理模块发送的携带有目标硬盘标识的第一响应消息,目标硬盘为所述管理模块根据预设策略从所述多个硬盘或者所述多个硬盘中除属于第一逻辑分组之外的其余硬盘中所选择。
结合第一方面至第一方面的第四种可能的实现方式中,在第一方面的第五种可能的实现方式中,预设策略为按照多个硬盘中每个硬盘的预设优先等级,将多个硬盘中除第一硬盘之外的其余硬盘中预设优先等级最高的硬盘确定为目标硬盘。
第二方面,本发明实施例提供一种服务器,应用于存储系统中,存储系统包括多个服务器,多个服务器中每个服务器包括至少一个逻辑分组,至少一个逻辑分组中每个逻辑分组包括多个硬盘,服务器包括:接收单元,用于在确定第一逻辑分组中的第一硬盘故障时,从存储系统的管理模块处获取目标硬盘的标识;目标硬盘为管理模块在接收到第一服务器发送的第一请求消息后,根据预设策略从所述存储系统包括的多个硬盘中选择的,第一逻辑分组位于第一服务器中,第一服务器为存储系统包括的多个服务器中任意一个;存储单元,用于根据标识,将目标数据存储至标识所指示的目标硬盘中;目标数据为待存储至第一服务器的源数据中待存储至第一硬盘的数据;存储单元,还用于将源数据中除目标数据之外的其余数据,存储至第一逻辑分组中除第一硬盘之外的其余硬盘中。
结合第二方面,在第二方面的第一种可能的实现方式中,源数据包括M份原始数据和N 份冗余数据,M份原始数据和N份冗余数据中每份数据均携带版本号;一份数据的版本号用于指示数据是否有效;N、M均为大于或等于1的正整数,M大于N,接收单元,用于接收客户端发送的用于读取源数据的读数据业务请求;读取单元,用于根据读数据业务请求,从第一逻辑分组以及目标硬盘中分别读取M份原始数据和N份冗余数据,以及每份数据的版本号;确定单元,用于根据每份数据的版本号,从M份原始数据和N份冗余数据中确定至少M份有效数据;响应单元,用于根据至少M份有效数据获取源数据,以及将源数据返回给客户端。
结合第二方面或第二方面的第一种可能的实现方式中,在第二方面的第二种可能的实现方式中,获取单元具体用于,若确定M份原始数据和N份冗余数据中存在M份或M份以上的数据的版本号一致,则确定M或M份以上的数据中的每份数据均为有效数据。
结合第二方面至第二方面的第二种可能的实现方式中,在第二方面的第三种可能的实现方式中,存储单元还用于:在其余硬盘中的每个硬盘以及目标硬盘中存储有操作日志,一个硬盘的操作日志用于指示存储在一个硬盘中的数据的偏移量,一个数据的偏移量用于指示所述数据在其存储的硬盘中的地址偏移量,以及用于在确定第一硬盘的状态为正常时,根据操作日志则将所述目标数据从所述目标硬盘中回迁至所述第一硬盘中。
结合第二方面至第二方面的第三种可能的实现方式中,在第二方面的第四种可能的实现方式中,服务器还包括发送单元,用于向管理模块发送第一请求消息,第一请求消息用于指示管理模块从存储系统包括的多个硬盘或者多个硬盘中除属于第一逻辑分组之外的其余硬盘中选择一个硬盘,作为目标硬盘;接收单元,还用于接收管理模块发送的携带有所述管理模块根据预设策略从所述多个硬盘或者所述多个硬盘中除属于所述第一逻辑分组之外的其余硬盘中所选择的目标硬盘的第一响应消息。
结合第二方面至第二方面的第四种可能的实现方式中,第二方面的第五种可能的实现方式中,预设策略为按照多个硬盘中每个硬盘的预设优先等级,将多个硬盘中预设优先等级最高的硬盘确定为目标硬盘。
第三方面,本发明实施例提供一种服务器,服务器包括处理器、存储器和通信总线,该处理器和存储器通过通信总线连接,该存储器用于存储软件程序以及模块,该处理器用于运行软件程序以及模块,从而执行:第一方面至第一方面的第六种可能的实现方式中任意一种可能的实现方式所描述的数据存储方法。
第四方面,本发明实施例提供一种存储系统,该存储系统中包括多个服务器,多个服务器中每个服务器包括至少一个逻辑分组,所述至少一个逻辑分组中每个逻辑分组包括多个硬盘,其中,每个服务器采用如第二方面任意一种可能的实现方式所描述的服务器。
第五方面,本发明实施例提供了一种计算机存储介质,用于储存为第一方面所描述的数据存储方法所用的计算机软件指令,其包含用于执行第三方面所描述的服务器所设计的程序。
附图说明
图1a为现有技术提供的一种存储系统的结构示意图;
图1b为现有技术提供的一种数据存储示意图;
图2a为本发明实施例提供的一种存储系统的结构示意图;
图2b为本发明实施例提供的一种服务器的结构示意图;
图3为本发明实施例提供的一种数据存储方法的流程示意图一;
图4a为本发明实施例提供的一种数据存储结构示意图一;
图4b为本发明实施例提供的一种数据存储结构示意图二;
图5为本发明实施例提供的一种数据存储方法的流程示意图二;
图6为本发明实施例提供的一种数据存储方法的流程示意图三;
图7为本发明实施例提供的一种数据存储方法的流程示意图四;
图8a为本发明实施例提供的一种服务器的结构示意图一;
图8b为本发明实施例提供的一种服务器的结构示意图二;
图8c为本发明实施例提供的一种服务器的结构示意图三。
具体实施方式
如图2a所示,本发明实施例提供一种存储系统,该存储系统2包括多个服务器(例如,服务器21、服务器22以及服务器23,一个或多个服务器之间通过交换机241和交换机242进行连接。该存储系统2包括的多个服务器中每个服务器包括一个或多个逻辑分组(例如,逻辑分组211、逻辑分组212以及逻辑分组213),一个逻辑分组用于存储一个或多个源数据,一个逻辑分组包括多个硬盘,如图2a所示,逻辑分组211包括硬盘2111、硬盘2112以及硬盘2113,逻辑分组212包括硬盘2112、硬盘2121以及硬盘2122,为了保证每个硬盘的占用率均衡,一个硬盘可以属于多个逻辑分组,如图2a所示,硬盘2112既属于逻辑分组211又属于逻辑分组212,硬盘2113既属于逻辑分组213又属于逻辑分组211。在图2a中仅示出了三个服务器(服务器21、服务器22和服务器23)以及三个逻辑分组(分别为逻辑分组211、逻辑分组212和逻辑分组213),但是可以理解的是,本发明实施例提供的存储系统还可以包括更多或者更少的服务器,每个服务器也可以包括更多或者更少的逻辑分组。
本发明实施例提供的如图2a所示的存储系统设置有管理模块25,该管理模块25与多个服务器中每个服务器相连,用于获取每个服务器包括的多个硬盘的信息,例如,多个硬盘的容量信息,多个硬盘的硬盘标识,多个硬盘中每个硬盘所属的逻辑分组的标识,多个硬盘中每个硬盘的状态等(例如,故障或者正常状态)。管理模块用于按照预设周期周期性的更新存储系统中每个硬盘的信息,并将每个硬盘的信息上报给该硬盘所在的服务器,以及用于在接收到服务器的请求消息(例如,第一请求消息)之后,根据服务器的请求消息从存储系统包括的多个硬盘中或者从多个硬盘中除属于第一逻辑分组之外的其余硬盘中选择一个硬盘作为目标硬盘。示例性的,管理模块25,在存储系统初始化成功后,查询该存储系统包括的每个硬盘的信息,然后将查询到的每个硬盘的信息记录在管理模块25中,并将查询到的每个硬盘的信息上报给对应硬盘所在的服务器。
其中,如图2b中所描述的任意一个服务器也可以称为节点,至少一个服务器为可以为客户端提供服务的网络设备,比如,服务器21、服务器22以及服务器23可以是具有服务器功能的计算机等。由于每个服务器的硬件结构相同,本发明实施例以服务器21为例介绍图2a所示的存储系统系统中每个服务器的硬件架构,参见图2b,服务器21包括存储器2031、处理器2032、系统总线2033、电源组件2034、输入\输出接口2035和通信组件2036等。其中,存储器2031可用于存储数据、软件程序以及模块,主要包括存储程序区和存储数据区,存储程序区可存储操作系统、至少一个功能所需的应用程序等,存储数据区可存 储服务器203的使用所创建的数据等。处理器2032通过运行或执行存储在存储器2031内的软件程序和/或模块,以及调用存储在存储器2031内的数据,执行服务器203的各种功能和处理数据。系统总线2033包括地址总线、数据总线、控制总线,用于传输数据和指令;电源组件2034用于为服务器203的各个组件提供电源;输入\输出接口2035为处理器2032和外围接口模块之间提供接口;通信组件2036用于为服务器21和其他设备之间进行有线或无线方式的通信。在通信系统中,服务器21承担着数据的存储、转发、发布等关键任务,是各类基于客户机/服务器(Client/Server,简称:C/S)模式或者浏览器/服务器(Browser/Server,简称:B/S)模式网络中不可或缺的重要组成部分。
如图3所示,本发明实施例提供一种数据存储方法,应用于如图2a所示的存储系统中,存储系统包括多个服务器,所述多个服务器中每个服务器包括至少一个逻辑分组,所述至少一个逻辑分组中每个逻辑分组包括多个硬盘,本发明实施例提供的方法包括:
S101、第一服务器在确定第一服务器的第一逻辑分组中的第一硬盘故障时,获取目标硬盘的标识;目标硬盘为所述存储系统包括的硬盘中与所述第一硬盘不同的硬盘,第一服务器为所述多个服务器中的一个。
S102、第一服务器根据标识,将目标数据存储至标识所指示的目标硬盘中;目标数据为待存储至第一服务器的源数据中待存储至第一硬盘的数据。
S103、将源数据中除目标数据之外的其余数据,存储至第一逻辑分组中除第一硬盘之外的其余硬盘中。
本发明实施例提供一种数据存储方法,通过在确定第一逻辑分组中的第一硬盘故障时,从存储系统的管理模块处获取目标硬盘的标识,然后将该标识指示的目标硬盘作为临时成员盘用于存储待存入第一硬盘的数据,这样能够在第一硬盘故障时,及时将待存入第一硬盘的数据临时记录到目标硬盘中,保证了源数据能够在存储系统中写入完整份数的冗余数据和原始数据,从而保证了源数据不存在降级写(降级写指源数据由于逻辑分组中的硬盘故障不能写入完整的原始数据和冗余数据),并且,目标硬盘是从整个存储系统包括的多个硬盘中选择的,这样所选择的目标硬盘可以位于第一逻辑分组中,也可以不位于第一逻辑分组中,能够有效的平衡存储系统的容量。
本发明实施例中当第一服务器确定位于其内的第一硬盘故障时,则向管理模块25上报第一硬盘故障的指示信息,这样管理模块25可以根据其存储的多个硬盘中每个硬盘的信息,确定能够存储目标数据的目标硬盘,并将所确定的目标硬盘的标识发送给第一服务器,以使得第一服务器根据该标识确定用于暂时替代第一硬盘的目标硬盘。
其中,目标硬盘的标识用于唯一识别目标硬盘,示例性的,可以为目标硬盘的IP地址,也可以为目标硬盘的物理地址,本发明实施例对此不进行限定。
本发明实施例中第一服务器将源数据以数据冗余方式存储在第一逻辑分组中,具体的,第一服务器将源数据分为M份原始数据和N份冗余数据,该M的值和N的值可以根据第一逻辑分组中硬盘的数量进行设置。示例性的,该源数据为2M数据,则可以将该2M的源数据分为两份大小各为1M的原始数据,并根据该两份大小各为1M的原始数据获取1份校验和作为一份冗余数据,将两份大小各1M的原始数据和一份冗余数据存入一个逻辑分组中。具体的,可以将每份原始数据分别存储在该逻辑分组中的一个硬盘中,将一份冗余数据存储在该一个逻辑分组中的一个其他硬盘中。
具体的,M和N之和可以小于或等于第一逻辑分组所包括的硬盘的数量,M大于N。
如图4a所示,本发明实施例以第一服务器为服务器21,以源数据包括两份原始数据(即M=2)和一份冗余数据(即N=1)为例进行说明,该服务器21将源数据中的两份原始数据分别存储在硬盘2111和硬盘2112中,并将一份冗余数据存储在硬盘2113中。
示例性的,如图4a所示,以故障硬盘为硬盘2113为例进行说明:当服务器21确定第一逻辑分组211中的硬盘2113(即第一硬盘)故障时,则服务器201从管理模块25处获取目标硬盘的标识,并将该目标硬盘作为临时成员盘,以用于存储待存入第一硬盘的数据,如图4b中所示,服务器21将硬盘2114作为目标硬盘,其中,该硬盘2114可以属于第一逻辑分组211,也可以不属于第一逻辑分组211,例如,硬盘2114可以为如图2a所示的存储系统中服务器22中的一个硬盘,或者该硬盘2114也可以为如图2a所示的存储系统中服务器21的第二逻辑组2112中的任意一个硬盘等。服务器21将待存入硬盘2113的冗余数据存入目标硬盘(即硬盘2114)中。
若目标硬盘位于第一服务器中,则第一服务器直接将目标数据存储至目标硬盘中。
若目标硬盘属于存储系统中第一服务器之外的其余服务器(例如,第二服务器),则第一服务器通过交换机向该第二服务器发送请求消息,该请求消息中携带有目标数据,该请求消息用于指示第二服务器将目标数据写入目标硬盘中。
需要说明的是,若待存入硬盘2113的数据为文件1、文件2、文件3和文件4,在向硬盘2113中存入文件1、文件2后,硬盘2113故障,则只需要将文件3和文件4存储到硬盘2114中。在读取数据时,可以根据需要直接从硬盘2114中读取文件3和文件4即可。
具体的,结合图3,如图5所示,本发明实施例在步骤S101之前还可以包括步骤S104a和S104b:
S104a、第一服务器向存储系统的管理模块发送第一请求消息,该第一请求消息用于指示管理模块从存储系统包括的多个硬盘或者多个硬盘中除属于第一逻辑分组之外的其余硬盘中选择一个硬盘,作为目标硬盘。
S104b、第一服务器接收管理模块发送的第一响应消息,第一响应消息中携带有所述目标硬盘的标识,目标硬盘为所述管理模块根据预设策略从多个硬盘或者所述多个硬盘中除属于第一逻辑分组之外的其余硬盘中所选择。
具体的,该第一请求消息中携带有指示信息,该指示信息携带有第一硬盘的标识以及第一硬盘所处的状态为故障状态,管理模块在接收到该第一请求消息后,根据该第一请求消息确认第一硬盘故障后,一方面,管理模块按照预设策略从存储系统包括的多个硬盘中除第一硬盘之外的其余硬盘中选择一个硬盘作为目标硬盘,这样所选择的目标硬盘可以属于第一服务器的第一逻辑分组,也可以为存储系统中除第一服务器之外的其余服务器上的硬盘。另一方面,管理模块可以按照预设策略从存储系统包括的多个硬盘中除属于第一逻辑分组之外的其余硬盘中选择一个硬盘,作为目标硬盘,这样做的目的可以避免所选择的目标硬盘位于第一逻辑分组。又一方面,管理模块可以按照预设策略从存储系统包括的多个硬盘中除属于第一服务器之外的其余硬盘中选择一个硬盘,作为目标硬盘。
可选的,本发明实施例中的预设策略为按照多个硬盘中每个硬盘的预设优先等级,将多个硬盘中除第一硬盘之外的其余硬盘中预设优先等级最高的硬盘确定为目标硬盘。
可选的,本发明实施例中管理模块可以根据每个硬盘的容量或者容量占用率等确定每 个硬盘的预设优先等级。
示例性的,可以将多个硬盘中容量最大的硬盘确定为预设优先等级最高的硬盘,然后按照容量由大到小的顺序,依次设置每个硬盘的预设优先等级,即容量最大的硬盘的预设优先等级最高,容量最小的硬盘的预设优先等级最低。
或者可以将多个硬盘中容量占用率最低的硬盘确定为预设优先等级最高的硬盘,然后按照容量占用率由低到高的顺序依次设置每个硬盘的预设优先等级,即容量占用率最低的硬盘的预设优先等级最高,容量占用率最高的硬盘的预设优先等级最低。
本发明实施例通过根据多个硬盘中每个硬盘的容量选择容量最大的硬盘作为目标硬盘,或者根据多个硬盘中每个硬盘的容量占用率选择容量占用率最低的硬盘作为目标硬盘,这样根据存储系统中每个硬盘的容量或者容量占用率去选择目标硬盘,能够均衡存储系统中每个硬盘的容量。
需要说明的是,当任意两个或两个以上的硬盘容量相等时,则可以根据该两个或两个以上的硬盘中每个硬盘对应的容量占用率来确定该两个或两个以上的硬盘中每个硬盘的预设优先等级。示例性的,将两个或两个以上的容量相等的硬盘中容量占用率按照容量占用率由低到高的顺序排序,将两个或两个以上的容量相等的硬盘中容量占用率最低的硬盘的预设优先等级设置为最高(在两个或两个以上的容量相等的硬盘中),将两个或两个以上的容量相等的硬盘中容量占用率最高的硬盘的预设优先等级设置为最低(在两个或两个以上的容量相等的硬盘中),。例如,硬盘A、硬盘B和硬盘C的容量分别为Q,但是硬盘A的容量占用率为50%,硬盘B的容量占用率为51%,硬盘C的容量占用率为49%,则在硬盘A、硬盘B和硬盘C中,可以设置硬盘C的预设优先等级高于硬盘A的预设优先等级,硬盘A的预设优先等级高于硬盘B的预设优先等级。
当任意两个或两个以上的硬盘的容量占用率相等时,则可以根据该两个或两个以上的容量占用率相等的硬盘中每个硬盘对应的容量来确定两个或两个以上的容量占用率相等的硬盘中每个硬盘对应的预设优先等级。示例性的,可以将任意两个或两个以上的硬盘的容量占用率相等的硬盘中容量最大的硬盘确定为较高预设优先等级的硬盘,然后按照两个或两个以上的容量占用率相等的硬盘中每个硬盘容量由高至低的顺序依次设置每个硬盘的预设优先等级。例如,硬盘A、硬盘B和硬盘C的预设优先等级均为60%,但是硬盘A的容量为32G,硬盘B的容量为16G,硬盘C的容量为64G,则在硬盘A,硬盘B和硬盘C中,硬盘A的预设优先等级高于硬盘B的预设优先等级,但是,硬盘A的预设优先等级低于硬盘C的预设优先等级。
可选的,结合图3,如图6所示,本发明实施例提供的方法中,M份原始数据和N份冗余数据中每份数据均携带版本号,版本号用于指示每份数据是否有效,因此,在步骤S103之后,本发明实施例提供的方法还包括:
S105、第一服务器接收客户端发送的读数据业务请求,该读数据业务请求用于读取源数据。
具体的,该读数据业务请求中携带有源数据的标识。
可以理解的是,第一服务器中存储有记录表,该记录表用于记录源数据包括的M份原始数据和N份冗余数据具体位于哪个逻辑分组。
S106、第一服务器根据读数据业务请求,从第一逻辑分组以及目标硬盘中分别读取所 述M份原始数据和所述N份冗余数据,以及每份数据的版本号。
需要说明的是,此时若第一硬盘的状态从故障状态恢复为正常状态,则第一服务器还需要从该第一硬盘中获取,在第一硬盘故障之前该源数据中已存储在第一硬盘中的数据,以及源数据中已存储在第一硬盘中的数据的版本号。
S107、第一服务器根据每份数据的版本号,从M份原始数据和N份冗余数据中确定至少M份有效数据。
示例性的,第一服务器在将源数据写入第一逻辑分组时,将源数据分为两份原始数据,然后根据EC(ErasureCode,数据校验擦除码)算法计算出一份冗余数据。第一服务器在根据客户端发送的用于读取源数据的读数据业务请求时,只需要在这三份数据(即两份原始数据和一份冗余数据)中找出两份有效数据,就可以通过EC算法计算出源数据。
S108、第一服务器根据至少M份有效数据获取源数据,以及将源数据返回给客户端。
可选的,结合图6,本发明实施例提供的步骤S107可以通过以下方式实现:
S1071、第一服务器若确定所述M份原始数据和N份冗余数据中存在M份或M份以上的数据的版本号一致,则确定M或M份以上的数据中的每份数据均为有效数据。
本发明实施例通过设置源数据包括的M份原始数据和N份冗余数据中每份数据的版本号,这样即使存储至目标硬盘中的目标数据没有回迁至第一硬盘之前,也可以根据版本号获取M份原始数据和N份冗余数据中的至少M份有效数据,并根据至少M份有效数据获取源数据,这样使得客户端能够在目标数据没有回迁至第一硬盘之前,也可以读取源数据,增强了存储系统可用性。
可选的,结合图3所示,本发明实施例还包括步骤S109:
S109、第一服务器在其余硬盘中的每个硬盘以及目标硬盘中存储有操作日志,一个所述硬盘的操作日志用于指示存储在一个硬盘中的数据的偏移量,一个数据的偏移量用于指示数据在其存储的硬盘中的地址偏移量。
本发明实施例通过将操作日志存储在每个硬盘中,这样当第一服务器重启时,可以避免操作日志因为第一服务器的重启而丢失的问题,因为现有技术中将操作日志存储在第一服务器的内存中,这样当第一服务器重启后操作日志将丢失,第一服务器只能根据整盘重构回迁目标数据,使得目标数据回迁至第一硬盘的时间变长,因此,本发明实施例与现有技术相比,根据操作日志回迁目标数据,能够降低目标数据回迁至第一硬盘的时间。
本发明实施例中在执行步骤S102和103的同时可以执行S109,也可以在执行完步骤S102和S103之后再执行S109,本发明实施例对此不进行限定,可以理解的是,该步骤102和103与S109的顺序对本发明实施例的技术方案不构成影响,只有最终能够保证每个硬盘中均存储有操作日志即可。
可选的,结合图3,如图7所示,本发明实施例提供的方法还包括:
S110、第一服务器在确定第一硬盘的状态为正常时,根据操作日志则将所述目标数据从目标硬盘中回迁至第一硬盘中。
具体的,当该目标硬盘属于第一服务器时,该第一服务器可以直接将存储在该目标硬盘上的目标数据回迁至第一硬盘中。
当该目标硬盘不属于第一服务器(例如,该目标硬盘属于如图2a所示的服务器22)时,该第一服务器可以向该目标硬盘所在的服务器(例如,如图2a所示的服务器22)发送请 求消息,该请求消息用于指示该目标硬盘所在的服务器将目标数据发送给第一服务器,然后第一服务器接收该目标硬盘所在的服务器反馈的目标数据,并将目标数据存储在第一硬盘中。
本发明实施例提供了一种计算机存储介质,用于储存为第一方面所描述的数据存储方法所用的计算机软件指令,其包含用于执行上述实施例的服务器所设计的程序。
上述主要从服务器的角度对本发明实施例提供的方案进行了介绍。可以理解的是,服务器等为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本发明能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。
本发明实施例可以根据上述方法示例对服务器等进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本发明实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
在采用对应各个功能划分各个功能模块的情况下,图8a示出了上述实施例中所涉及的服务器的一种可能的结构示意图,服务器1包括:接收单元10,存储单元11。接收单元10用于支持服务器1执行上述实施例描述的过程S101,S104b,S105;存储单元11用于支持服务器执行上述实施例中所描述的步骤S102、S103,S109,S110,。当然,本发明实施例提供的服务器1还可以包括读取单元、响应单元以及发送单元,发送单元用于支持服务器1执行上述实施例中的S104a,确定单元,用于支持服务器执行上述实施例中所描述的步骤S107(具体的,S1071),响应单元,用于支持服务器执行上述实施例中所描述的S108,该读取单元用于支持服务器1执行上述实施例中的过程S106。其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。
在采用集成的单元的情况下,图8b示出了上述实施例中所涉及的服务器的一种可能的结构示意图。服务器1包括:处理模块102和通信模块103。处理模块102用于对服务器1的动作进行控制管理,例如,处理模块102用于支持服务器1执行实施例中所描述的步骤S101、S102、S103、S104a、S104b、S105、S106、S107(具体的包括S1071)、S108、S109以及S110,和/或用于本文所描述的技术的其它过程。通信模块103用于支持服务器与其他网络实体的通信,(例如,与管理模块25以及存储系统中除第一服务器之外的其余服务器进行通信以及与客户端进行通信),服务器1还可以包括存储模块101,用于存储服务器1的程序代码和数据。
其中,处理模块102可以是处理器或控制器,例如可以是中央处理器(Central Processing Unit,CPU),通用处理器,数字信号处理器(Digital Signal Processor,DSP),专用集成电路(Application-Specific Integrated Circuit,ASIC),现场可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本发明公开内容所描述的各种示例性的 逻辑方框,模块和电路。所述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。通信模块103可以是收发器、收发电路或通信接口1013等。存储模块101可以是存储器。
当处理模块102为处理器1012,通信模块103为通信接口1013,存储模块101为存储器时,本发明实施例所涉及的服务器1可以为图8c所示的服务器。
参阅图8c所示,该服务器1包括:处理器1012、通信接口1013、存储器1011以及总线1014。其中,通信接口1013、处理器1012以及存储器1011通过总线1014相互连接;总线1014可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图8c中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器执行本发明各个实施例所述方法的全部或部分步骤。所述存储介质是非短暂性(英文:non-transitory)介质,包括:快闪存储器、移动硬盘、只读存储器、随机存取存储器、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应所述以权利要求的保护范围为准。

Claims (13)

  1. 一种数据存储方法,其特征在于,应用于存储系统中,所述存储系统包括多个服务器,所述多个服务器中每个服务器包括至少一个逻辑分组,所述至少一个逻辑分组中每个逻辑分组包括多个硬盘,所述方法包括:
    第一服务器在确定所述第一服务器的第一逻辑分组中的第一硬盘故障时,获取目标硬盘的标识;所述目标硬盘为所述存储系统包括的硬盘中与所述第一硬盘不同的硬盘,所述第一服务器为所述多个服务器中的一个;
    所述第一服务器根据所述标识,将目标数据存储至所述标识所指示的目标硬盘中;所述目标数据为源数据中待存储至第一硬盘的数据;
    所述第一服务器将所述源数据中除所述目标数据之外的其余数据,存储至所述第一逻辑分组中除所述第一硬盘之外的其余硬盘中。
  2. 根据权利要求1所述的方法,其特征在于,所述源数据包括M份原始数据和N份冗余数据,所述M份原始数据和所述N份冗余数据中每份数据均携带版本号;一份数据的版本号用于指示所述一份数据是否有效;N、M均为大于或等于1的正整数;所述M大于N;
    所述第一服务器将所述源数据中除所述目标数据之外的其余数据,存储至所述第一逻辑分组中除所述第一硬盘之外的其余硬盘中之后,所述方法还包括:
    所述第一服务器接收客户端发送的读数据业务请求,所述读数据业务请求用于读取所述源数据;
    所述第一服务器根据所述读数据业务请求,从所述第一逻辑分组以及所述目标硬盘中分别读取所述M份原始数据和所述N份冗余数据,以及所述每份数据的版本号;
    所述第一服务器根据所述每份数据的版本号,从所述M份原始数据和所述N份冗余数据中确定至少M份有效数据;
    所述第一服务器根据所述至少M份有效数据获取所述源数据,以及将所述源数据返回给所述客户端。
  3. 根据权利要求2所述的方法,其特征在于,所述第一服务器根据所述每份数据的版本号,从所述M份原始数据和所述N份冗余数据中确定至少M份有效数据,包括:
    所述第一服务器若确定所述M份原始数据和所述N份冗余数据中存在M份或M份以上的数据的版本号一致,则确定所述M或M份以上的数据中的每份数据均为有效数据。
  4. 根据权利要求1所述的方法,其特征在于,所述第一服务器在所述其余硬盘中的每个硬盘以及所述目标硬盘中存储有操作日志,一个所述硬盘的操作日志用于指示存储在所述一个硬盘中的数据的偏移量,一个所述数据的偏移量用于指示所述数据在其存储的硬盘中的地址偏移量,所述方法还包括:
    所述第一服务器在确定所述第一硬盘的状态为正常时,根据所述操作日志则将所述目标数据从所述目标硬盘中回迁至所述第一硬盘中。
  5. 根据权利要求1-4任意一项所述的方法,其特征在于,所述获取目标硬盘的标识,包括:
    所述第一服务器向所述存储系统的管理模块发送第一请求消息,所述第一请求消息用于指示所述管理模块确定用于存储所述目标数据的目标硬盘;
    所述第一服务器接收所述管理模块发送的第一响应消息,所述第一响应消息中携带有所述目标硬盘的标识,所述目标硬盘为所述管理模块根据预设策略从所述多个硬盘或者所述多个硬盘中除属于所述第一逻辑分组之外的其余硬盘中所选择。
  6. 根据权利要求1-5任意一项所述的方法,所述预设策略为按照所述多个硬盘中每个硬盘的预设优先等级,将所述多个硬盘中除所述第一硬盘之外的其余硬盘中预设优先等级最高的硬盘确定为所述目标硬盘。
  7. 一种服务器,其特征在于,应用于存储系统中,所述存储系统包括多个服务器,所述多个服务器中每个服务器包括至少一个逻辑分组,所述至少一个逻辑分组中每个逻辑分组包括多个硬盘,所述服务器包括:
    接收单元,用于在确定所述第一服务器的第一逻辑分组中的第一硬盘故障时,获取目标硬盘的标识;所述目标硬盘为所述存储系统包括的硬盘中与所述第一硬盘不同的硬盘,所述第一服务器为所述多个服务器中的一个;
    存储单元,用于根据所述标识,将目标数据存储至所述标识所指示的目标硬盘中;所述目标数据为源数据中待存储至第一硬盘的数据;
    所述存储单元,还用于将所述源数据中除所述目标数据之外的其余数据,存储至所述第一逻辑分组中除所述第一硬盘之外的其余硬盘中。
  8. 根据权利要求7所述的服务器,其特征在于,所述源数据包括M份原始数据和N份冗余数据,所述M份原始数据和所述N份冗余数据中每份数据均携带版本号;一份数据的版本号用于指示所述数据是否有效;所述N、M均为大于或等于1的正整数,M大于N,所述接收单元,用于接收客户端发送的读数据业务请求,所述读数据业务请求用于读取所述源数据;
    读取单元,用于根据所述读数据业务请求,从所述第一逻辑分组以及所述目标硬盘中分别读取所述M份原始数据和所述N份冗余数据,以及所述每份数据的版本号;
    确定单元,用于根据所述每份数据的版本号,从所述M份原始数据和所述N份冗余数据中确定至少M份有效数据;
    响应单元,用于根据所述至少M份有效数据获取所述源数据,以及将所述源数据返回给所述客户端。
  9. 根据权利要求8所述的服务器,其特征在于,所述获取单元具体用于,若确定所述M份原始数据和所述N份冗余数据中存在M份或M份以上的数据的版本号一致,则确定所述M或M份以上的数据中的每份数据均为有效数据。
  10. 根据权利要求7所述的服务器,其特征在于,所述存储单元还用于:在所述其余硬盘中的每个硬盘以及所述目标硬盘中存储有操作日志,一个所述硬盘的操作日志用于指示存储在所述一个硬盘中的数据的偏移量,一个所述数据的偏移量用于指示所述数据在其存储的硬盘中的地址偏移量,以及用于在确定所述第一硬盘的状态为正常时,根据所述操作日志则将所述目标数据从所述目标硬盘中回迁至所述第一硬盘中。
  11. 根据权利要求7-10任意一项所述的服务器,其特征在于,所述服务器还包括发送单元,用于向所述管理模块发送第一请求消息,所述第一请求消息用于指示所述管理模块从所述存储系统包括的多个硬盘或者所述多个硬盘中除属于所述第一逻辑分组之外的其余硬盘中选择一个硬盘,作为目标硬盘;
    接收单元,还用于接收所述管理模块发送的第一响应消息,所述第一响应消息中携带有所述目标硬盘的标识,所述目标硬盘为所述管理模块根据预设策略从所述多个硬盘或者所述多个硬盘中除属于所述第一逻辑分组之外的其余硬盘中所选择。
  12. 根据权利要求7-11任意一项所述的服务器,其特征在于,所述预设策略为按照所述多个硬盘中每个硬盘的预设优先等级,将所述多个硬盘中预设优先等级最高的硬盘确定为所述目标硬盘。
  13. 一种存储系统,其特征在于,所述存储系统中包括多个服务器,所述多个服务器中每个服务器包括至少一个逻辑分组,所述至少一个逻辑分组中每个逻辑分组包括多个硬盘,其中,所述每个服务器为如权利要求7-12任意一项所述的服务器。
PCT/CN2017/118148 2016-12-29 2017-12-23 一种数据存储方法、服务器以及存储系统 WO2018121456A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611249903.9A CN106844108B (zh) 2016-12-29 2016-12-29 一种数据存储方法、服务器以及存储系统
CN201611249903.9 2016-12-29

Publications (1)

Publication Number Publication Date
WO2018121456A1 true WO2018121456A1 (zh) 2018-07-05

Family

ID=59113521

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/118148 WO2018121456A1 (zh) 2016-12-29 2017-12-23 一种数据存储方法、服务器以及存储系统

Country Status (2)

Country Link
CN (1) CN106844108B (zh)
WO (1) WO2018121456A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110069506A (zh) * 2018-07-27 2019-07-30 阿里巴巴集团控股有限公司 业务数据的维护方法、装置及服务器
CN110858122A (zh) * 2018-08-23 2020-03-03 杭州海康威视系统技术有限公司 存储数据的方法和装置
CN112783866A (zh) * 2021-01-29 2021-05-11 深圳追一科技有限公司 数据读取方法、装置、计算机设备和存储介质
CN113282246A (zh) * 2021-06-15 2021-08-20 杭州海康威视数字技术股份有限公司 数据处理方法及装置

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106844108B (zh) * 2016-12-29 2019-05-24 成都华为技术有限公司 一种数据存储方法、服务器以及存储系统
CN107908499B (zh) * 2017-11-02 2021-03-05 华为技术有限公司 一种数据校验方法及装置
CN108345519A (zh) * 2018-01-31 2018-07-31 河南职业技术学院 计算机硬盘故障的处理方法及装置
CN112181915B (zh) * 2019-07-03 2023-12-08 成都华为技术有限公司 执行业务的方法、装置、终端和存储介质
CN111488124A (zh) * 2020-04-08 2020-08-04 深信服科技股份有限公司 一种数据更新方法、装置、电子设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001216095A (ja) * 2000-02-02 2001-08-10 Nec Software Hokkaido Ltd ディスクアレイ装置及びデータ保全方法
US7525749B2 (en) * 2006-01-25 2009-04-28 Fujitsu Limited Disk array apparatus and disk-array control method
CN105138280A (zh) * 2015-07-31 2015-12-09 成都华为技术有限公司 数据写入方法、装置及系统
CN105357294A (zh) * 2015-10-31 2016-02-24 成都华为技术有限公司 一种存储数据的方法及集群管理节点
CN105653406A (zh) * 2015-12-31 2016-06-08 华为技术有限公司 一种管理分布式存储系统的方法及分布式存储系统
CN106844108A (zh) * 2016-12-29 2017-06-13 成都华为技术有限公司 一种数据存储方法、服务器以及存储系统

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100922584B1 (ko) * 2006-12-01 2009-10-21 한국전자통신연구원 객체 기반 분산 공유 시스템 및 그의 방법
US8381025B2 (en) * 2009-09-30 2013-02-19 Cleversafe, Inc. Method and apparatus for dispersed storage memory device selection
CN105897859B (zh) * 2016-03-25 2021-07-30 北京书生云科技有限公司 一种存储系统
CN105487609A (zh) * 2015-11-25 2016-04-13 浪潮电子信息产业股份有限公司 一种服务器

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001216095A (ja) * 2000-02-02 2001-08-10 Nec Software Hokkaido Ltd ディスクアレイ装置及びデータ保全方法
US7525749B2 (en) * 2006-01-25 2009-04-28 Fujitsu Limited Disk array apparatus and disk-array control method
CN105138280A (zh) * 2015-07-31 2015-12-09 成都华为技术有限公司 数据写入方法、装置及系统
CN105357294A (zh) * 2015-10-31 2016-02-24 成都华为技术有限公司 一种存储数据的方法及集群管理节点
CN105653406A (zh) * 2015-12-31 2016-06-08 华为技术有限公司 一种管理分布式存储系统的方法及分布式存储系统
CN106844108A (zh) * 2016-12-29 2017-06-13 成都华为技术有限公司 一种数据存储方法、服务器以及存储系统

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110069506A (zh) * 2018-07-27 2019-07-30 阿里巴巴集团控股有限公司 业务数据的维护方法、装置及服务器
CN110858122A (zh) * 2018-08-23 2020-03-03 杭州海康威视系统技术有限公司 存储数据的方法和装置
CN110858122B (zh) * 2018-08-23 2023-10-20 杭州海康威视系统技术有限公司 存储数据的方法和装置
CN112783866A (zh) * 2021-01-29 2021-05-11 深圳追一科技有限公司 数据读取方法、装置、计算机设备和存储介质
CN113282246A (zh) * 2021-06-15 2021-08-20 杭州海康威视数字技术股份有限公司 数据处理方法及装置

Also Published As

Publication number Publication date
CN106844108A (zh) 2017-06-13
CN106844108B (zh) 2019-05-24

Similar Documents

Publication Publication Date Title
WO2018121456A1 (zh) 一种数据存储方法、服务器以及存储系统
US10261853B1 (en) Dynamic replication error retry and recovery
US10977123B2 (en) Coordination protocol between dispersed storage processing units and rebuild modules
US9317384B2 (en) Cache data processing using cache cluster with configurable modes
US10382380B1 (en) Workload management service for first-in first-out queues for network-accessible queuing and messaging services
US10496308B2 (en) Using pseudo DSN memory units to handle data in motion within a DSN memory
US20190220379A1 (en) Troubleshooting Method, Apparatus, and Device
WO2014000430A1 (zh) 一种实现高可用集群的心跳服务的方法及装置
US10970190B2 (en) Hybrid log viewer with thin memory usage
US10609123B2 (en) Hybrid quorum policies for durable consensus in distributed systems
US9477429B2 (en) Block storage gateway module, method for providing access to block storage, mediator system and mediating method for storage, cloud storage system, and content delivery apparatus
KR101983208B1 (ko) 데이터 관리 방법, 노드, 그리고 데이터베이스 클러스터를 위한 시스템
US9781201B2 (en) Multicast transport
US9720789B2 (en) Multicast transport configuration
US9639431B2 (en) Fault policy implementation
US20230259427A1 (en) Mapping Storage Slots to a Set of Storage Units
US9891992B2 (en) Information processing apparatus, information processing method, storage system and non-transitory computer readable storage media
US8621260B1 (en) Site-level sub-cluster dependencies
JP6671708B2 (ja) バックアップリストアシステム及びバックアップリストア方法
CN108133034B (zh) 共享存储访问方法及相关装置
US20230100323A1 (en) Memory Allocation for Block Rebuilding in a Storage Network
US20220394091A1 (en) Storing a Data Object as Data Regions in a Storage Network
WO2023029485A1 (zh) 数据处理方法、装置、计算机设备及计算机可读存储介质
CN115470041A (zh) 一种数据灾备管理方法及装置
US11770448B1 (en) Rotating offline storage units in a dispersed storage network

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: 17887741

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17887741

Country of ref document: EP

Kind code of ref document: A1