WO2015074392A1 - 一种存储单元的数据处理方法、设备及系统 - Google Patents

一种存储单元的数据处理方法、设备及系统 Download PDF

Info

Publication number
WO2015074392A1
WO2015074392A1 PCT/CN2014/078079 CN2014078079W WO2015074392A1 WO 2015074392 A1 WO2015074392 A1 WO 2015074392A1 CN 2014078079 W CN2014078079 W CN 2014078079W WO 2015074392 A1 WO2015074392 A1 WO 2015074392A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
storage unit
server
information
repairable
Prior art date
Application number
PCT/CN2014/078079
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 EP14864210.1A priority Critical patent/EP3054626B1/en
Publication of WO2015074392A1 publication Critical patent/WO2015074392A1/zh
Priority to US15/160,129 priority patent/US10049024B2/en

Links

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/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/2023Failover techniques
    • G06F11/2033Failover techniques switching over of hardware resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/2053Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant
    • G06F11/2094Redundant storage or storage space
    • 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/2002Error 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 interconnections or communication control functionality are redundant
    • G06F11/2007Error 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 interconnections or communication control functionality are redundant using redundant communication media
    • G06F11/201Error 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 interconnections or communication control functionality are redundant using redundant communication media between storage system components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/2053Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant
    • G06F11/2056Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant by mirroring
    • G06F11/2069Management of state, configuration or failover
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/2053Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant
    • G06F11/2089Redundant storage control functionality
    • G06F11/2092Techniques of failing over between control units
    • 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/1658Data re-synchronization of a redundant component, or initial sync of replacement, additional or spare unit
    • G06F11/1662Data re-synchronization of a redundant component, or initial sync of replacement, additional or spare unit the resynchronized component or unit being a persistent storage device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/805Real-time

Definitions

  • HDD Hard Disk Drive
  • SDD Solid State Disk
  • Possible failures of such storage media include some repairable faults, such as ECC uncorrectable errors (UNC), sector ID not found (IDNF), and fixable faults can usually be rewritten by new The data is fixed.
  • ECC ECC uncorrectable errors
  • IDNF sector ID not found
  • the backup data is distributed across different servers. If the primary server has a repairable fault such as UNC or IDNF, the primary server requests the backup server storing the backup data of the faulty area to send the backup data, overwrites the received backup data to the fault area, and completes the fault repair; likewise, if the standby server A repairable fault such as UNC, IDNF, etc. occurs, and the standby server sends a request to the corresponding primary server to complete the fault repair according to the received backup data from the primary server. When the same backup data of the primary and backup servers fails, the fault area cannot be repaired.
  • a repairable fault such as UNC or IDNF
  • the primary or secondary server may again receive a request to read the fault zone data and schedule the operating system (Operate System, OS) input again.
  • the Output (10) channel accesses the hard disk fault area, restarts the fault repair process, and then returns to the fault repair failure. Repeated 10 scheduling and repair processes waste a lot of system resources. Summary of the invention
  • the embodiments of the present invention provide a data processing method, device, and system for a storage unit, which are used to solve the problem that the same 10 backup and repair processes waste system resources when the same backup data of the primary and backup servers fails.
  • a first aspect is a data processing method for a storage unit, the method comprising:
  • the first server records, for at least one storage unit for storing data, information of a storage unit in which a repairable failure but repair fails occurs;
  • the first server Each time the first server receives a request for reading data, it queries whether a part or all of the data in the data is stored in a storage unit corresponding to the information of the stored storage unit; if yes, sends the request The requestor returns a message that the data failed to be read; otherwise, the data is read in a storage unit in which the data is stored and fed back to the requesting party that sent the request.
  • the first server records information about a storage unit that can repair a fault but fails to repair, including:
  • the first server After the first server receives the message returned by the second server when the backup data fails to be read, it is determined that the repair of the repair unit that fails the repair fails;
  • the first server records information of the storage unit in which the repairable fault occurs.
  • the first server determines, by using the following manner, a storage unit that has a repairable fault: The first server receives a request to read data;
  • the first server inputs and outputs a storage unit in which the data read by the OS 10 channel access request is located through an operating system;
  • the first server determines, according to the message reported by the OS 10, that a repairable fault occurs in a storage unit in which the data requested to be read is located.
  • the message that is reported by the OS 10 channel includes:
  • bitmap bitmap corresponding to the storage unit that can repair the fault, and the error code of the repairable fault is the bitmap bitmap corresponding to the storage unit that can repair the fault, and the error code of the repairable fault.
  • the first server records information about a storage unit that can repair a fault but fails to repair, including:
  • the first server sets the bit bit of the memory in the bad partition table BST corresponding to the memory cell in which the repairable fault occurs but the repair fails.
  • the method further includes:
  • the first server stores the BST of the memory to the hard disk.
  • the repairable fault includes: , and / or sector flag error.
  • the method further includes: the first server determining information of a storage unit to be written data each time a request for writing data is received;
  • the storage unit that writes data writes data.
  • the method further includes: When the first server determines to send data to any server, whether to store part or all of the data in the data to be sent in the storage unit corresponding to the information of the storage unit of the record; if yes, the first server to the receiver The server sends an indication message indicating that the storage unit in which some or all of the data in the to-be-sent data is stored has a repairable fault but the repair fails;
  • the first server sends the to-be-sent data to the receiver server.
  • the method further includes: when the first server determines that data sent by any server is to be received, if part or all of the data indicated by the sender server is received.
  • the storage unit of the sender server that is stored therein generates a message that repairable failure but fails to repair, and then determines a storage unit for storing the part or all of the data, and locally records a storage unit for storing the part or all of the data. information.
  • a server device includes:
  • a recording unit configured to record, for at least one storage unit for storing data, information of a storage unit that has a repairable failure but fails to repair;
  • a read request processing unit configured to query, in each of the storage units corresponding to the information of the stored storage unit, whether some or all of the data in the data is stored in each time the request for reading data is received; if yes, to the sending station The requesting party of the request returns a message that the reading of the data failed; otherwise, the data is read in a storage unit in which the data is stored, and is fed back to the requesting party that sent the request.
  • the recording unit includes: a fault determining unit, configured to determine a storage unit in which a repairable fault occurs locally;
  • a message sending unit configured to send a message to the other server, to request the other server to read the backup data of the data stored in the storage unit in which the repairable fault occurs
  • a message processing unit configured to: after receiving the message returned by the other server when the backup data fails to be read, determining that the repairing failure of the storage unit that fails the fault occurs;
  • An information recording unit configured to record information of the storage unit in which the repairable fault occurs.
  • the fault determining unit is specifically configured to:
  • the message that is reported by the fault determining unit and received by the OS 10 channel includes:
  • bitmap bitmap corresponding to the storage unit that can repair the fault, and the error code of the repairable fault is the bitmap bitmap corresponding to the storage unit that can repair the fault, and the error code of the repairable fault.
  • the recording unit is configured to: when the information of the storage unit that fails to repair but fails to be repaired is recorded, specifically:
  • the bit bit bit in the bad partition table BST of the memory corresponding to the memory cell in which the repairable fault occurred but the repair failed is set to 1.
  • the device further includes:
  • BST storage unit for storing the BST of the memory to the hard disk.
  • the information of the storage unit recorded in the recording unit Repairable faults that occur in the corresponding storage unit including:
  • the device further includes: a write request processing unit, configured to determine information of a storage unit to be written data each time a request for writing data is received When the information of the storage unit of the record is included to include the information of the storage unit to which the data is to be written, the information of the storage unit to which the data is to be written is deleted; to the data to be written The storage unit writes data.
  • a write request processing unit configured to determine information of a storage unit to be written data each time a request for writing data is received When the information of the storage unit of the record is included to include the information of the storage unit to which the data is to be written, the information of the storage unit to which the data is to be written is deleted; to the data to be written The storage unit writes data.
  • the device further includes: an indicating unit, configured to: when determining to send data to any server, whether to store in the storage unit corresponding to the information of the stored storage unit Sending part or all of the data in the data; if yes, sending an indication message to the receiving server, indicating that the storage unit in which some or all of the data in the to-be-sent data is stored has a repairable fault but the repair fails; otherwise, receiving The party server sends the to-be-sent data.
  • an indicating unit configured to: when determining to send data to any server, whether to store in the storage unit corresponding to the information of the stored storage unit Sending part or all of the data in the data; if yes, sending an indication message to the receiving server, indicating that the storage unit in which some or all of the data in the to-be-sent data is stored has a repairable fault but the repair fails; otherwise, receiving The party server sends the to-be-sent data.
  • the device further includes: an indication receiving unit, configured to receive part or all of the data indicated by the sender server when determining that data sent by any server is to be received
  • the stored unit of the sender server generates a repairable fault but the repair fails message, and then determines a storage unit for storing the part or all of the data, and locally records the part or all of the data for storing Information about the storage unit.
  • a server device includes:
  • a processor configured to record, for at least one storage unit for storing data, information of a storage unit that has a repairable fault but fails to repair; and each time a request for reading data is received, the information of the storage unit of the query record corresponds to Whether some or all of the data in the data is stored in the storage unit; if so, returning a message that the data failed to be read to the requesting party that sent the request; otherwise, in the storage unit storing the data The data is read and fed back to the requesting party that sent the request.
  • the device further includes a transmission module, where the processor is configured to: when the information about the storage unit that fails to repair but fails to be repaired is recorded, specifically:
  • the message that is reported by the processor on the OS 10 channel includes:
  • bitmap bitmap corresponding to the storage unit that can repair the fault, and the error code of the repairable fault is the bitmap bitmap corresponding to the storage unit that can repair the fault, and the error code of the repairable fault.
  • the device further includes a memory; when the processor is configured to record information about a storage unit that has a repairable fault but fails to repair, specifically:
  • the bit bit bit in the bad partition table BST of the memory corresponding to the memory cell in which the repairable fault occurred but the repair failed is set to 1.
  • the device further includes a hard disk
  • the processor is further configured to store the BST of the memory to the hard disk.
  • the information of the storage unit recorded by the processor corresponds to Repairable faults that occur in the storage unit, including:
  • the processor is further configured to When receiving a request to write data, determining information of a storage unit to which data is to be written; when determining information of the storage unit to be written in the information of the recorded storage unit, deleting the recorded location The information of the storage unit to be written into the data; the data is written to the storage unit to which the data is to be written.
  • the processor is further configured to: when determining to send data to any server, query whether the storage unit corresponding to the information of the stored storage unit stores the data to be sent Part or all of the data; if yes, sending an indication message to the receiving server, indicating that the storage unit in which some or all of the data in the to-be-sent data is stored has a repairable failure but the repair fails; otherwise, sending to the receiving server The data to be sent.
  • the processor is further configured to: when it is determined that data sent by any server is to be received, if some or all data indicated by the sender server is received, The storage unit of the sender server generates a message that repairable failure but fails to repair, and then determines a storage unit for storing the part or all of the data, and locally records the information of the storage unit for storing the part or all of the data. .
  • a distributed storage system includes at least:
  • a first server configured to record, for at least one storage unit for storing data, information of a storage unit that has a repairable failure but fails to repair; and each time a request for reading data is received, querying information of the recorded storage unit Whether some or all of the data in the data is stored in the corresponding storage unit; if yes, returning a message that the data failure is returned to the requesting party that sent the request; otherwise, the storage unit storing the data The data is read and fed back to the requesting party that sent the request.
  • each first server there is a second server corresponding to the first server;
  • the first server is used to record information about a storage unit that has a repairable fault but fails to repair, and is specifically used to: Sending a message to the second server, to request the second server to read backup data of data stored in the storage unit in the first server where a repairable fault occurs;
  • the repairable fault that occurs in the storage unit corresponding to the information of the storage unit recorded by the first server includes:
  • the first server is further configured to: when it is determined that the data is sent to any server, whether the storage unit corresponding to the information of the storage unit of the record is stored is to be sent Part or all of the data in the data; if yes, sending an indication message to the receiving server, indicating that the storage unit in which some or all of the data in the to-be-sent data is stored has a repairable failure but the repair fails; otherwise, to the receiving party The server sends the to-be-sent data.
  • the first server is further configured to: when it is determined that data sent by any server is to be received, if some or all data indicated by the sender server is received, When the storage unit of the sender server generates a message that repairable failure but repair fails, determining a storage unit for storing the part or all of the data, and locally recording information of the storage unit for storing the part or all of the data .
  • the first server records, for at least one storage unit for storing data, information of a storage unit that fails to repair but fails to repair; and the first server queries the record each time a request for reading data is received. Whether some or all of the data in the data is stored in the storage unit corresponding to the information of the storage unit; if yes, returning the message that the data failed to be read to the requesting party that sent the request; otherwise, in the storage The data is read in a storage unit of the data and fed back to the requesting party that sent the request.
  • FIG. 1 is a schematic flowchart of a data processing method of a storage unit according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of a method for processing a fault of a storage unit according to an embodiment of the present invention
  • FIG. 3 is a schematic flowchart of a fault processing method of a storage unit according to another embodiment of the present invention.
  • FIG. 4 is a schematic flowchart of a data migration method of a storage unit according to another embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a server device according to an embodiment of the present disclosure.
  • FIG. 6 is another schematic structural diagram of a server device according to an embodiment of the present invention
  • FIG. 7 is another schematic structural diagram of a server device according to an embodiment of the present invention
  • FIG. . detailed description
  • Embodiments of the present invention provide a data processing method, device, and system for a storage unit, which are used to avoid repetitive and ineffective repair of a storage unit in which a repairable fault occurs, thereby saving system resources.
  • a data processing method for a storage unit includes:
  • the first server records, for the at least one storage unit for storing data, information about a storage unit that fails to repair but fails to repair.
  • the first server After the first server reports that the storage unit has a repairable fault on the OS 10 channel, it attempts to obtain backup data stored in other servers to repair the fault. If the repair process fails, the information of the storage unit is recorded.
  • the repairable fault includes: IDNF, and/or UNC.
  • the first server when receiving the request for reading data, query whether a part or all of the data in the data is stored in a storage unit corresponding to the information of the stored storage unit; if yes, to the sending station.
  • the requesting party of the request returns a message that the reading of the data failed; otherwise, the data is read in a storage unit in which the data is stored, and is fed back to the requesting party that sent the request.
  • the request to read data comes from the user, either from a local daemon or from another computer in the distributed storage system.
  • the first server records information about a storage unit that fails to repair but fails to repair, and the first server sends a message to the second server to request the second server to read the first server. Repairing the backup data of the data stored in the faulty storage unit; when the first server receives the message returned by the second server when the backup data fails to be read, determining that the repair of the repairable fault occurs; A server records information about the storage unit in which the repairable fault occurs.
  • the first server determines the storage unit in which the repairable fault occurs: the first server receives the request to read the data; the first server inputs and outputs the storage of the data read by the OS 10 channel access request through the operating system. The first server determines, according to the message reported by the OS 10, a storage unit in which a repairable fault occurs in a storage unit in which the data requested to be read is located.
  • the OS 10 channel accesses a memory cell that has any fault, the OS 10 channel reports an Error Input Output (EIO), and the user layer cannot know whether the memory cell is a repairable fault, which is not conducive to The user layer performs reasonable troubleshooting.
  • EIO Error Input Output
  • the specific type of the fault that the storage unit is faulty can be reported by the OS 10 channel, so that the user layer can determine the storage unit that can repair the fault according to the message reported by the OS 10 channel, and then the repairable fault occurs.
  • Storage unit sends to other servers The message is requested to transfer backup data for troubleshooting.
  • the user layer does not perform repair processing on the storage unit that cannot be repaired due to hardware damage determined according to the message reported by the OS 10 channel.
  • the reporting manner of the OS 10 channel is improved as follows: in the message reported by the OS 10 channel, the bitmap bitmap corresponding to the failed storage unit and the error code of the fault are indicated.
  • the bitmap is used to determine the location of the storage unit.
  • the error code is used to determine the specific fault type. UNC and IDNF have their own corresponding error codes.
  • the information of the storage unit that recovers the fault but fails to be repaired is recorded, including: the first server sets the bit bit of the memory in the bad partition table BST corresponding to the storage unit that has a repairable fault but fails to repair.
  • one bit of UINT32 (Unsigned INTeger 32, 32-bit unsigned integer) data can be used to mark one storage unit.
  • the value of 64 UINT32 can be expressed, and each bit is initially 0. If a sector has a repairable fault and the repair fails, the corresponding bit of the sector is set to 1.
  • the first server stores the BST of the memory to the hard disk when a certain trigger condition is met.
  • the BST is stored to the hard disk at a fixed point in time, or when the BST is updated, the BST is synchronized to the hard disk.
  • the computer reads the BST from the hard disk every time the memory is powered down, thus avoiding the loss of BST records.
  • the embodiment further provides a method for writing data to the storage unit, specifically comprising: determining, by the first server, a storage unit to be written data each time a request for writing data is received; Determining, by the server, the storage unit corresponding to the information of the storage unit of the record, the storage unit to which the data is to be written; if so, the first server deleting the record of the information of the storage unit to which the data is to be written Writing data to the storage unit to which the data is to be written; otherwise, the first server writes data to the storage unit to which the data is to be written.
  • the sender server should indicate the data in the storage unit that has been recorded to recover the fault but fails to repair, and the receiver server should also record the corresponding local storage unit to avoid errors.
  • the transmission and reading of data ensures data consistency.
  • the first server determines to send data to any server, whether part or all of the data in the data to be sent is stored in the storage unit corresponding to the information of the storage unit of the query; if yes, the first server sends the server to the receiver. Sending an indication message indicating that the storage unit in which some or all of the data to be sent is stored has a repairable fault but the repair fails; otherwise, the first server sends the to-be-sent data to the receiver server.
  • the first server determines that data to be sent by any server is to be received, if a message that the repairable failure but the repair fails occurs in the storage unit of the sender server where some or all of the data indicated by the sender server is received, the message is locally Information of a storage unit corresponding to the part or all of the data is recorded. For example, the invalid data in the storage unit that has been recorded by the sender server BST is not received, and the same size storage space is reserved locally for the invalid data, and these storage spaces are recorded in the local BST.
  • Scenario 1 Server A, B, and C all have a piece of data M, m is a piece of data in M, completely occupying one sector in server A, A is the primary server, B and C are the standby servers, and server A There is a BST in the maintenance.
  • the storage unit failure handling of Server A includes the following processes:
  • the server A receives the read operation request, and calls the OS 10 to read the data M;
  • the OS 10 of the server A returns data UNC or IDNF in the sector where the m is located;
  • server A sends a read repair request to server B;
  • server B reads data m, server B's OS 10 returns UNC or IDNF;
  • the server A receives the message returned by the server B, and determines that the read repair fails. 5205, server A sends a read repair request to server C; server C reads data m, server C's OS 10 returns UNC or IDNF;
  • the server A receives the message returned by the server C, and determines that the read repair fails.
  • Server A marks the sector where m is located in the BST.
  • the server A When the server A receives the request for reading the data M again, it first queries the BST, and finds that the data m has been marked by the BST, and returns the read data M. When the server A receives the request for writing data, it first queries the BST and finds that If the sector in which m is already marked by BST, the label of the sector in which the m is located in the BST is revoked, and then the data is written to the sector where m is located.
  • Scenario 2 Server A, B, and C all have a piece of data M, m is a piece of data in M, completely occupying one sector in server A, C is the primary server, A and B are standby servers, and server A There is a BST in the maintenance.
  • the storage unit fault handling of Server A includes the following processes:
  • server A performs disk background scanning, and calls OS 10 to read data M;
  • the OS 10 of the server A returns data.
  • the sector where the m is located is UNC or IDNF;
  • server A sends a read repair request to server C;
  • server C reads data m, server C's OS 10 returns UNC or IDNF;
  • server C sends a read repair request to server B;
  • server B reads data m, server B's OS 10 returns UNC or IDNF;
  • the server C receives the message returned by the server B, and determines that the read repair fails.
  • the server A receives the message returned by the server C, and determines that the read repair fails.
  • Server A marks the sector in which the data m is located in the BST.
  • server A When server A performs the operation of reading data such as disk background scan again, first query BST, and find that data m has been marked by BST, and returning read data M fails; when server A receives the request for writing data, first query BST If the sector where m is found has been marked by BST, the flag of the sector in which the m is located in the BST is revoked, and then the data is written to the sector where m is located.
  • Scenario 3 Server A, B, and C all have a piece of data M, and m is a number in M. According to this, a sector is completely occupied in A, and the sector where m is located is marked by the BST of A. At this time, the server D is added to share the storage load of the servers A, B, and C. As shown in Figure 4, the rebalance of the distributed storage system includes the following processes:
  • server A determines to migrate data M to server D;
  • the server A transmits the data M, the data m is not transmitted, and the sector where the server D data m is located is indicated by the BST;
  • the server D receives the data M, and reserves the storage space occupied by the data m, and marks the sector where the m is located in the BST.
  • the server D When the server D reads the data M, it first queries the BST, and finds that the data m has been marked by the BST, and the read data M fails. When the server D receives the request for writing data, the BST is first queried, and the sector where the m is located has been found. Marked by BST, the mark in the BST for the sector where m is located is revoked, and then the data is written to the sector where m is located.
  • a server device provided by an embodiment of the present invention includes:
  • the recording unit 51 is configured to record, for the at least one storage unit for storing data, information about a storage unit that fails to repair but fails to repair;
  • the read request processing unit 52 is configured to, when each request for reading data is received, query whether some or all of the data in the data is stored in a storage unit corresponding to the information of the stored storage unit; if yes, send to the data The requesting party of the request returns a message that the data failed to be read; otherwise, the data is read in a storage unit in which the data is stored and fed back to the requesting party that sent the request.
  • the recording unit 51 includes:
  • the fault determining unit 511 is configured to determine a storage unit that locally generates a repairable fault.
  • the message sending unit 512 is configured to send a message to the other server, to request the other server to read the storage unit in the storage unit where the repairable fault occurs. Backup data of the data;
  • the message processing unit 513 is configured to: after receiving the message returned by the other server when the backup data fails to be read, determine that the repairing failure of the storage unit that fails the fault occurs;
  • the information recording unit 514 is configured to record information about the storage unit in which the repairable fault occurs.
  • the fault determining unit 511 is specifically configured to:
  • the message reported by the OS 10 channel received by the fault determining unit 511 includes: a bitmap bitmap corresponding to the storage unit in which the repairable fault occurs, and an error code of the repairable fault.
  • the recording unit 51 is configured to record information about a storage unit that has a repairable fault but fails to repair.
  • the bit bit bit in the bad partition table BST of the memory corresponding to the memory cell in which the repairable fault occurred but the repair failed is set to 1.
  • the device further comprises:
  • BST storage unit for storing the BST of the memory to the hard disk.
  • the repairable faults occurring in the storage unit corresponding to the information of the storage unit recorded by the recording unit 51 include:
  • the device further comprises:
  • a write request processing unit configured to determine, when each request for writing data is received, a storage unit to be written data; whether the storage unit corresponding to the information of the storage unit of the query record includes the data to be written a storage unit; if so, deleting a record of information of the storage unit to which the data is to be written, writing data to the storage unit to which the data is to be written; otherwise, writing to the data to be written
  • the storage unit writes data.
  • the device further comprises:
  • An indication unit configured to query a storage list of records when sending data to any server Whether part or all of the data to be transmitted is stored in the storage unit corresponding to the information of the meta; if yes, sending an indication message to the receiving server, indicating that the storage unit in which some or all of the data in the to-be-sent data is stored occurs.
  • the fault can be repaired but the repair fails; otherwise, the data to be sent is sent to the recipient server.
  • the device further comprises:
  • the indication receiving unit is configured to: when it is determined that the data sent by any server is to be received, if the storage unit of the sender server where some or all of the data indicated by the sender server is received has a repairable fault but the repair fails, Then, the information of the storage unit corresponding to the part or all of the data is locally recorded.
  • server device of this embodiment is for implementing the above steps S101-S102, and the above explanation and limitation of the method are also applicable to the server device of the embodiment.
  • a server device provided by an embodiment of the present invention includes:
  • the processor 71 is configured to: record, for the at least one storage unit for storing data, information of a storage unit that has a repairable fault but fails to repair; and query the information of the stored storage unit each time the request for reading the data is received. Whether some or all of the data in the data is stored in the corresponding storage unit; if yes, returning a message that the data failure is returned to the requesting party that sent the request; otherwise, the storage unit storing the data The data is read and fed back to the requesting party that sent the request.
  • the device further includes a transmission module 72;
  • the processor is configured to record information about a storage unit that has a repairable fault but fails to repair, specifically for:
  • the processor 71 when the processor 71 is configured to determine a storage unit in which a repairable fault occurs locally, the processor is specifically configured to:
  • the message reported by the OS 10 channel received by the processor 71 includes: a bitmap bitmap corresponding to the storage unit in which the repairable fault occurs, and an error code of the repairable fault.
  • the device further includes a memory 73;
  • the processor is configured to record information about a storage unit that has a repairable fault but fails to repair, specifically for:
  • the bit bit of the bad partition table BST of the memory 73 corresponding to the memory cell in which the repairable fault occurred but the repair failed is set to 1.
  • the device further includes a hard disk 74;
  • the processor 71 is also used to store the BST of the memory 73 to the hard disk 74.
  • the repairable faults occurring in the storage unit corresponding to the information of the storage unit recorded by the processor 71 include:
  • the processor 71 is further configured to: when each request for writing data is received, determine a storage unit to be written data; whether the storage unit corresponding to the information of the storage unit of the query record includes the a storage unit to which data is to be written; if so, deleting a record of information of the storage unit to which the data is to be written, and writing data to the storage unit to which the data is to be written; Otherwise, data is written to the memory cell to which the data will be written.
  • the processor 71 is further configured to: when determining to send data to any server, query whether a part or all of the data in the data to be sent is stored in a storage unit corresponding to the information of the stored storage unit; if yes, The receiving server sends an indication message indicating that the storage unit in which some or all of the data in the to-be-sent data is stored has a repairable fault but the repair fails; otherwise, the to-be-sent data is sent to the receiver server.
  • the processor 71 is further configured to: when it is determined that the data sent by any server is to be received, if the storage unit of the sender server where some or all of the data indicated by the sender server is received is repairable, a repairable fault occurs. However, if the message fails to be repaired, the information of the storage unit corresponding to the part or all of the data is locally recorded.
  • a distributed storage system includes:
  • a first server 81 configured to record, for at least one storage unit for storing data, information of a storage unit that has a repairable fault but fails to repair; and each time a request for reading data is received, querying the recorded storage unit Whether some or all of the data in the data is stored in the storage unit corresponding to the information; if yes, returning the message that the data failed to be returned to the requesting party that sent the request; otherwise, storing the data in the storage The data is read in the unit and fed back to the requesting party that sent the request.
  • each first server there is a second server 82 corresponding to the first server;
  • the first server 81 is used to record information about a storage unit that has a repairable failure but fails to repair, and is specifically used to:
  • the repairable faults occurring in the storage unit corresponding to the information of the storage unit recorded by the first server 81 include: a check error, and/or a sector flag error.
  • the first server 81 is further configured to:
  • the first server 81 is further configured to:
  • the local record is recorded locally.
  • the storage unit corresponding to some or all of the data is ingrown, o
  • the embodiments of the present invention provide a data processing method, device, and system for a storage unit, which improve a data read, write, and transfer mechanism of the storage unit, and avoid repeated repair of the storage unit data, thereby saving the system. Resources, as well as avoiding the data of the failed storage unit being used by other devices.
  • embodiments of the present invention can be provided as a method, system, or computer program product.
  • the present invention can take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware.
  • the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
  • These computer program instructions can be provided to a general purpose computer, Using a processor of a computer, embedded processor or other programmable data processing device to produce a machine such that instructions executed by a processor of a computer or other programmable data processing device are generated for implementation in a flow or in a flowchart A flow and/or block diagram of a device in a box or a plurality of functions specified in a plurality of blocks.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Abstract

本发明提供了一种存储单元的数据处理方法、设备及系统。该方法包括如下步骤:第一服务器针对至少一个用于存储数据的存储单元,记录发生可修复故障但修复失败的存储单元的信息(S101);所述第一服务器在每次接收到读取数据的请求时,査询记录的存储单元的信息对应的存储单元中是否存储有所述数据中的部分或全部数据;如果是,向发送所述请求的请求方返回读取所述数据失败的消息;否则,在存储有所述数据的存储单元中读取所述数据,并反馈给发送所述请求的请求方(S102)。采用本发明,可以避免对存储单元进行重复的数据读取操作,提供存储单元的数据处理机制合理性,节省系统资源。

Description

一种存储单元的数据处理方法、 设备及系统
本申请要求于 2013 年 11 月 22 日提交中国专利局、 申请号为 201310600884.X, 发明名称为" 一种存储单元的数据处理方法、 设备及系 统" 的中国专利申请的优先权,其全部内容通过引用结合在本申请中。 技术领域 本发明涉及电子计算机技术领域,尤其涉及一种存储单元的数据处理 方法、 设备及系统。
背景技术
现有存储系统常使用磁盘驱动器 (Hard Disk Drive, HDD)和固态硬盘 (Solid State Disk, SDD)作为存储介质。此类存储介质可能出现的故障中包括 一些可修复故障,例如校验错误 (ECC uncorrectable errors, UNC) ,扇区标识 出错 (sector ID not found, IDNF) ,可修复故障通常可以通过重新写入新的数 据进行修复。
对于数据存在备份的分布式存储系统,备份数据会分布在不同的服务 器。 如果主用服务器发生 UNC、 IDNF等可修复故障,主用服务器请求存 储有故障区域的备份数据的备用服务器发送备份数据,将接收的备份数据 覆盖到故障区域,完成故障修复;同样,如果备用服务器发生 UNC、 IDNF 等可修复故障,备用服务器向相应的主用服务器发送请求,根据接收的来 自主用服务器的备份数据完成故障修复。 而当主、 备用服务器的同一备份 数据均发生故障时,故障区域则无法完成修复。
在无法完成修复的情况下,主用服务器或者备用服务器可能再次接收 到读取故障区域数据的请求,并再次调度操作系统 (Operate System, OS)输入 输出 (Input Output, 10)通道访问硬盘故障区域,进而重新启动故障修复过程, 然后返回故障修复失败。 反复的 10调度和修复过程会浪费掉大量的系统资 源。 发明内容
本发明实施例提供了一种存储单元的数据处理方法、 设备及系统,用 以解决主、 备用服务器的同一备份数据均发生故障时,反复的 10调度和修 复过程浪费系统资源的问题。
本发明实施例提供的具体技术方案如下:
第一方面,一种存储单元的数据处理方法,该方法包括:
第一服务器针对至少一个用于存储数据的存储单元,记录发生可修复 故障但修复失败的存储单元的信息;
所述第一服务器在每次接收到读取数据的请求时,查询记录的存储单 元的信息对应的存储单元中是否存储有所述数据中的部分或全部数据; 如果是,向发送所述请求的请求方返回读取所述数据失败的消息; 否则,在存储有所述数据的存储单元中读取所述数据,并反馈给发送 所述请求的请求方。
结合第一方面,在第一种可能的实现方式中,所述第一服务器记录发 生可修复故障但修复失败的存储单元的信息,包括:
所述第一服务器向第二服务器发送消息,用以请求所述第二服务器读 取所述第一服务器内发生可修复故障的存储单元中存储的数据的备份数 据;
当所述第一服务器接收到所述第二服务器在读取所述备份数据失败时 返回的消息后,确定所述发生可修复故障的存储单元修复失败;
所述第一服务器记录所述发生可修复故障的存储单元的信息。
结合第一方面的第一种可能的实现方式,在第二种可能的实现方式中, 所述第一服务器通过下述方式确定发生可修复故障的存储单元: 所述第一服务器接收读取数据的请求;
所述第一服务器通过操作系统输入输出 OS 10通道访问请求读取的数 据所在的存储单元;
所述第一服务器根据所述 OS 10上报的消息,确定所述请求读取的数 据所在的存储单元中发生可修复故障的存储单元。
结合第一方面的第二种可能的实现方式,在第三种可能的实现方式中, 所述 OS 10通道上报的消息,包括:
所述发生可修复故障的存储单元对应的位图 bitmap ,以及所述可修复 故障的错误码。
结合第一方面,在第四种可能的实现方式中,所述第一服务器记录发 生可修复故障但修复失败的存储单元的信息,包括:
所述第一服务器将内存的坏分区表 BST中对应于所述发生可修复故障 但修复失败的存储单元的比特 bit位设置为 1。
结合第一方面的第四种可能的实现方式,在第五种可能的实现方式中, 该方法还包括:
所述第一服务器将内存的 BST存储至硬盘。
结合第一方面和第一方面的第一种可能的实现方式至第五种可能的实 现方式中任意一种,在第六种可能的实现方式中,所述可修复故障,包括: 校验错误,和 /或扇区标志出错。
结合第一方面,在第七种可能的实现方式中,该方法还包括: 所述第一服务器在每次接收到写入数据的请求时,确定将被写入数据 的存储单元的信息;
当所述第一服务器确定记录的存储单元的信息中包括所述将被写入数 据的存储单元的信息时,删除记录的所述将被写入数据的存储单元的信息; 向所述将被写入数据的存储单元写入数据。
结合第一方面,在第八种可能的实现方式中,该方法还包括: 当所述第一服务器确定向任一服务器发送数据时,查询记录的存储单 元的信息对应的存储单元中是否存储有待发送数据中的部分或全部数据; 如果是,所述第一服务器向接收方服务器发送指示消息,指示所述待 发送数据中的部分或全部数据所存储在的存储单元发生可修复故障但修复 失败;
否则,所述第一服务器向接收方服务器发送所述待发送数据。
结合第一方面,在第九种可能的实现方式中,该方法还包括: 当所述第一服务器确定将要接收任一服务器发送的数据时,若接收到 发送方服务器指示的部分或全部数据所存储在的发送方服务器的存储单元 发生可修复故障但修复失败的消息,则确定用于存储所述部分或全部数据 的存储单元,在本地记录用于存储所述部分或全部数据的存储单元的信息。
第二方面,一种服务器设备,该设备包括:
记录单元,用于针对至少一个用于存储数据的存储单元,记录发生可 修复故障但修复失败的存储单元的信息;
读请求处理单元,用于在每次接收到读取数据的请求时,查询记录的 存储单元的信息对应的存储单元中是否存储有所述数据中的部分或全部数 据;如果是,向发送所述请求的请求方返回读取所述数据失败的消息;否 则,在存储有所述数据的存储单元中读取所述数据,并反馈给发送所述请 求的请求方。
结合第二方面,在第一种可能的实现方式中,所述记录单元,包括: 故障确定单元,用于确定本地发生可修复故障的存储单元;
消息发送单元,用于向其它服务器发送消息,用以请求所述其它服务 器读取所述发生可修复故障的存储单元中存储的数据的备份数据,
消息处理单元,用于接收到所述其它服务器在读取所述备份数据失败 时返回的消息后,确定所述发生可修复故障的存储单元修复失败;
信息记录单元,用于记录所述发生可修复故障的存储单元的信息。 结合第二方面的第一种可能的实现方式,在第二种可能的实现方式中, 所述故障确定单元具体用于:
接收读取数据的请求;
通过 OS 10通道访问请求读取的数据所在的存储单元;
根据所述 OS 10上报的消息,确定所述请求读取的数据所在的存储单 元中发生可修复故障的存储单元。
结合第二方面的第二种可能的实现方式,在第三种可能的实现方式中, 所述故障确定单元接收的 OS 10通道上报的消息,包括:
所述发生可修复故障的存储单元对应的位图 bitmap ,以及所述可修复 故障的错误码。
结合第二方面,在第四种可能的实现方式中,所述记录单元用于记录 发生可修复故障但修复失败的存储单元的信息时,具体用于:
将内存的坏分区表 BST中对应于所述发生可修复故障但修复失败的存 储单元的比特 bit位设置为 1。
结合第二方面的第四种可能的实现方式,在第五种可能的实现方式中, 该设备还包括:
BST存储单元,用于将内存的 BST存储至硬盘。
结合第二方面和第二方面的第一种可能的实现方式至第五种可能的实 现方式中任意一种,在第六种可能的实现方式中,所述记录单元中记录的 存储单元的信息对应的存储单元发生的可修复故障,包括:
校验错误,和 /或扇区标志出错。
结合第二方面,在第七种可能的实现方式中,该设备还包括: 写请求处理单元,用于在每次接收到写入数据的请求时,确定将被写 入数据的存储单元的信息;当确定记录的存储单元的信息中包括所述将被 写入数据的存储单元的信息时,删除记录的所述将被写入数据的存储单元 的信息;向所述将被写入数据的存储单元写入数据。 结合第二方面,在第八种可能的实现方式中,该设备还包括: 指示单元,用于当确定向任一服务器发送数据时,查询记录的存储单 元的信息对应的存储单元中是否存储有待发送数据中的部分或全部数据; 如果是,向接收方服务器发送指示消息,指示所述待发送数据中的部分或 全部数据所存储在的存储单元发生可修复故障但修复失败;否则,向接收 方服务器发送所述待发送数据。
结合第二方面,在第九种可能的实现方式中,该设备还包括: 指示接收单元,用于当确定将要接收任一服务器发送的数据时,若接 收到发送方服务器指示的部分或全部数据所存储在的发送方服务器的存储 单元发生可修复故障但修复失败的消息,则确定用于存储所述部分或全部 数据的存储单元,在本地记录所述用于存储所述部分或全部数据的存储单 元的信息。
第三方面,一种服务器设备,该设备包括:
处理器,用于针对至少一个用于存储数据的存储单元,记录发生可修 复故障但修复失败的存储单元的信息;在每次接收到读取数据的请求时, 查询记录的存储单元的信息对应的存储单元中是否存储有所述数据中的部 分或全部数据;如果是,向发送所述请求的请求方返回读取所述数据失败 的消息;否则,在存储有所述数据的存储单元中读取所述数据,并反馈给 发送所述请求的请求方。
结合第三方面,在第一种可能的实现方式中,该设备还包括传输模块; 所述处理器用于记录发生可修复故障但修复失败的存储单元的信息 时,具体用于:
确定本地发生可修复故障的存储单元;
向其它服务器发送消息,用以请求所述其它服务器读取所述发生可修 复故障的存储单元中存储的数据的备份数据;
当接收到所述其它服务器在读取所述备份数据失败时返回的消息后, 确定所述发生可修复故障的存储单元修复失败;
记录所述发生可修复故障的存储单元的信息。
结合第三方面的第一种可能的实现方式,在第二种可能的实现方式中, 所述处理器用于确定本地发生可修复故障的存储单元时,具体用于:
接收读取数据的请求;
通过操作系统输入输出 OS 10通道访问请求读取的数据所在的存储单 元;
根据所述 OS 10上报的消息,确定所述请求读取的数据所在的存储单 元中发生可修复故障的存储单元。
结合第三方面的第二种可能的实现方式,在第三种可能的实现方式中, 所述处理器接收的 OS 10通道上报的消息,包括:
所述发生可修复故障的存储单元对应的位图 bitmap ,以及所述可修复 故障的错误码。
结合第三方面,在第四种可能的实现方式中,该设备还包括内存; 所述处理器用于记录发生可修复故障但修复失败的存储单元的信息 时,具体用于:
将内存的坏分区表 BST中对应于所述发生可修复故障但修复失败的存 储单元的比特 bit位设置为 1。
结合第三方面的第四种可能的实现方式,在第五种可能的实现方式中, 该设备还包括硬盘;
所述处理器还用于将内存的 BST存储至硬盘。
结合第三方面和第三方面第一种可能的实现方式至第五种可能的实现 方式中任意一种,在第六种可能的实现方式中,所述处理器记录的存储单 元的信息对应的存储单元发生的可修复故障,包括:
校验错误,和 /或扇区标志出错。
结合第三方面,在第七种可能的实现方式中,所述处理器还用于在每 次接收到写入数据的请求时,确定将被写入数据的存储单元的信息;当确 定记录的存储单元的信息中包括所述将被写入数据的存储单元的信息时, 删除记录的所述将被写入数据的存储单元的信息;向所述将被写入数据的 存储单元写入数据。
结合第三方面,在第八种可能的实现方式中,所述处理器还用于当确 定向任一服务器发送数据时,查询记录的存储单元的信息对应的存储单元 中是否存储有待发送数据中的部分或全部数据;如果是,向接收方服务器 发送指示消息,指示所述待发送数据中的部分或全部数据所存储在的存储 单元发生可修复故障但修复失败;否则,向接收方服务器发送所述待发送 数据。
结合第三方面,在第九种可能的实现方式中,所述处理器还用于当确 定将要接收任一服务器发送的数据时,若接收到发送方服务器指示的部分 或全部数据所存储在的发送方服务器的存储单元发生可修复故障但修复失 败的消息,则确定用于存储所述部分或全部数据的存储单元,在本地记录 所述用于存储所述部分或全部数据的存储单元的信息。
第四方面,一种分布式存储系统,至少包括:
第一服务器,用于针对至少一个用于存储数据的存储单元,记录发生 可修复故障但修复失败的存储单元的信息;在每次接收到读取数据的请求 时,查询记录的存储单元的信息对应的存储单元中是否存储有所述数据中 的部分或全部数据;如果是,向发送所述请求的请求方返回读取所述数据 失败的消息;否则,在存储有所述数据的存储单元中读取所述数据,并反 馈给发送所述请求的请求方。
结合第四方面,在第一种可能的实现方式中,所述系统中,对于每一 第一服务器,存在与该第一服务器对应的第二服务器;
所述第一服务器用于记录发生可修复故障但修复失败的存储单元的信 息时,具体用于: 向所述第二服务器发送消息,用以请求所述第二服务器读取所述第一 服务器内发生可修复故障的存储单元中存储的数据的备份数据;
当接收到所述第二服务器在读取所述备份数据失败时返回的消息后, 确定所述发生可修复故障的存储单元修复失败;
记录所述发生可修复故障的存储单元的信息。
结合第四方面或第四方面的第一种可能的实现方式,在第二种可能的 实现方式中,所述第一服务器记录的存储单元的信息对应的存储单元发生 的可修复故障,包括:
校验错误,和 /或扇区标志出错。
结合第四方面,在第三种可能的实现方式中,所述第一服务器还用于: 当确定向任一服务器发送数据时,查询记录的存储单元的信息对应的 存储单元中是否存储有待发送数据中的部分或全部数据;如果是,向接收 方服务器发送指示消息,指示所述待发送数据中的部分或全部数据所存储 在的存储单元发生可修复故障但修复失败;否则,向接收方服务器发送所 述待发送数据。
结合第四方面,在第四种可能的实现方式中,所述第一服务器还用于: 当确定将要接收任一服务器发送的数据时,若接收到发送方服务器指 示的部分或全部数据所存储在的发送方服务器的存储单元发生可修复故障 但修复失败的消息,则确定用于存储所述部分或全部数据的存储单元,在 本地记录用于存储所述部分或全部数据的存储单元的信息。
本发明实施例,第一服务器针对至少一个用于存储数据的存储单元, 记录发生可修复故障但修复失败的存储单元的信息;第一服务器在每次接 收到读取数据的请求时,查询记录的存储单元的信息对应的存储单元中是 否存储有所述数据中的部分或全部数据;如果是,向发送所述请求的请求 方返回读取所述数据失败的消息;否则,在存储有所述数据的存储单元中 读取所述数据,并反馈给发送所述请求的请求方。 通过记录发生可修复故 障但修复失败的存储单元,并在每次读取数据之前查询记录的存储单元的 信息,避免了对发生可修复故障的存储单元进行重复的没有效果的修复, 使得存储单元的数据读取机制更加合理,节省了系统资源。 附图说明
图 1是本发明实施例提供的存储单元的数据处理方法的流程示意图; 图 2是本发明一具体实施例提供的存储单元的故障处理方法的流程示 意图;
图 3是本发明另一具体实施例提供的存储单元的故障处理方法的流程 示意图;
图 4是本发明另一具体实施例提供的存储单元的数据迁移方法的流程 示意图;
图 5是本发明实施例提供的服务器设备的结构示意图;
图 6是本发明实施例提供的服务器设备的另一结构示意图; 图 7是本发明实施例提供的服务器设备的另一结构示意图; 图 8是本发明实施例提供的分布式存储系统的结构示意图。 具体实施方式
本发明实施例提供了一种存储单元的数据处理方法、 设备及系统,用 以避免对发生可修复故障的存储单元进行重复的没有效果的修复,节省系 统资源。
参见图 1 ,本发明实施例提供的存储单元的数据处理方法包括:
S101、 第一服务器针对至少一个用于存储数据的存储单元,记录发生 可修复故障但修复失败的存储单元的信息。
第一服务器在 OS 10通道上报存储单元发生可修复故障之后,尝试获 取存储在其它服务器的备份数据,用以修复故障,若该修复过程失败,则 记录此类存储单元的信息。
所述可修复故障,包括: IDNF ,和 /或 UNC。 S102、 所述第一服务器在每次接收到读取数据的请求时,查询记录的 存储单元的信息对应的存储单元中是否存储有所述数据中的部分或全部数 据;如果是,向发送所述请求的请求方返回读取所述数据失败的消息;否 则,在存储有所述数据的存储单元中读取所述数据,并反馈给发送所述请 求的请求方。
读取数据的请求来自用户,或者来自本地后台程序,或者来自分布式 存储系统中的其它计算机。
在调用系统资源访问存储介质之前,先查询存储单元是否有发生可修 复故障但修复失败的记录,这样,能够避免对存储单元进行重复修复,节 约了系统资源。
较佳的, S101中,第一服务器记录发生可修复故障但修复失败的存储 单元的信息,包括:第一服务器向第二服务器发送消息,用以请求第二服 务器读取第一服务器内发生可修复故障的存储单元中存储的数据的备份数 据;当第一服务器接收到第二服务器在读取所述备份数据失败时返回的消 息后,确定所述发生可修复故障的存储单元修复失败;第一服务器记录所 述发生可修复故障的存储单元的信息。
较佳的,第一服务器通过下述方式确定发生可修复故障的存储单元: 第一服务器接收读取数据的请求;第一服务器通过操作系统输入输出 OS 10 通道访问请求读取的数据所在的存储单元;第一服务器根据所述 OS 10上 报的消息,确定所述请求读取的数据所在的存储单元中发生可修复故障的 存储单元。 现有技术中,通过 OS 10通道访问发生任何故障的存储单元时 OS 10通道均上报输入输出错误 (Error Input Output, EIO) ,用户层无法得知 存储单元发生的是否为可修复故障,不利于用户层进行合理的故障处理。 因此,本发明实施例中,定义 OS 10通道能够上报存储单元故障的具体类 型,这样,使得用户层能够根据 OS 10通道上报的消息,确定发生可修复 故障的存储单元,然后针对发生可修复故障的存储单元向其它服务器发送 消息,以请求传输备份数据进行故障修复。 而针对根据 OS 10通道上报的 消息确定的发生硬件损坏等不可修复故障的存储单元,用户层不作修复处 理。
较佳的, OS 10通道的上报方式进行如下改进:在 OS 10通道上报的 消息中,指示发生故障的存储单元对应的位图 bitmap ,以及故障的错误码。 bitmap 用于确定存储单元的位置,错误码用于确定具体的故障类型, UNC 和 IDNF均有各自对应的错误码。
较佳的,记录发生可修复故障但修复失败的存储单元的信息,包括: 第一服务器将内存的坏分区表 BST中对应于所述发生可修复故障但修复失 败的存储单元的比特 bit位设置为 1。 具体地,可以使用 UINT32(Unsigned INTeger 32, 32位无符号整型)数据的一个 bit标记一个存储单元,对于 HDD , 存储单元为扇区, 1M 存储空间对应的 2048(=64x32)个扇区使用 64 个 UINT32的值即可表示,各个 bit初始为 0 ,若某一扇区发生可修复故障并 修复失败,将该扇区对应的 bit置为 1。
较佳的,当满足一定的触发条件时,第一服务器将内存的 BST存储至 硬盘。例如,在固定的时间点将 BST存储至硬盘,或者,当 BST有更新时, 将 BST同步至硬盘。 计算机每次在内存掉电之后,从硬盘中读取 BST ,这 样,能够避免 BST的记录丟失。
较佳的,本实施例还提供向存储单元写入数据的方法,具体包括: 第一服务器在每次接收到写入数据的请求时,确定将被写入数据的存 储单元;所述第一服务器查询记录的存储单元的信息对应的存储单元中是 否包括所述将被写入数据的存储单元;如果是,所述第一服务器删除对所 述将被写入数据的存储单元的信息的记录,向所述将被写入数据的存储单 元写入数据;否则,所述第一服务器向所述将被写入数据的存储单元写入 数据。
这样,能够正常读取新写入的数据。 当分布式存储系统内增、 減服务器时,服务器之间需要进行再平衡
(rebalance)过程,通过转移存储的数据来平衡各服务器负荷。 在转移数据的 过程中,对于已被记录的发生可修复故障但修复失败的存储单元中的数据, 发送方服务器应当指示出来,接收方服务器也应当对本地相应的存储单元 进行记录,以避免错误数据的传输和读取,保障数据的一致性。
具体的,当第一服务器确定向任一服务器发送数据时,查询记录的存 储单元的信息对应的存储单元中是否存储有待发送数据中的部分或全部数 据;如果是,第一服务器向接收方服务器发送指示消息,指示所述待发送 数据中的部分或全部数据所存储在的存储单元发生可修复故障但修复失 败;否则,第一服务器向接收方服务器发送所述待发送数据。
当第一服务器确定将要接收任一服务器发送的数据时,若接收到发送 方服务器指示的部分或全部数据所存储在的发送方服务器的存储单元发生 可修复故障但修复失败的消息,则在本地记录与所述部分或全部数据对应 的存储单元的信息。 例如,不接收已被发送方服务器 BST记录的存储单元 中的无效数据,仅在本地为无效数据保留同样大小的存储空间,并在本地 BST记录这些存储空间。
下面结合实际应用场景,对本发明实施例提供的方法进行详细说明。 场景一、 服务器 A、 B、 C中均存有一份数据 M , m是 M中的一段数 据,在服务器 A中完全占用一个扇区, A为主用服务器, B和 C为备用服 务器,服务器 A中维护有一张 BST。 如图 2所示,服务器 A的存储单元故 障处理包括以下流程:
5201、 服务器 A接收到读操作请求,调用 OS 10读取数据 M;
5202、 服务器 A的 OS 10返回数据 m所在扇区发生 UNC或 IDNF;
5203、 服务器 A向服务器 B发送读修复请求;服务器 B读取数据 m , 服务器 B的 OS 10的返回 UNC或 IDNF;
5204、 服务器 A接收到服务器 B返回的消息,确定读修复失败; 5205、 服务器 A向服务器 C发送读修复请求;服务器 C读取数据 m , 服务器 C的 OS 10的返回 UNC或 IDNF;
5206、 服务器 A接收到服务器 C返回的消息,确定读修复失败;
5207、 服务器 A在 BST中标记 m所在扇区。
当服务器 A再次接收到读取数据 M的请求时,先查询 BST ,发现数据 m已被 BST标记,返回读取数据 M失败;当服务器 A接收到写入数据的 请求时,先查询 BST ,发现 m所在扇区已被 BST标记,则撤销 BST中对 m所在扇区的标记,然后向 m所在扇区写入数据。
场景二、 服务器 A、 B、 C中均存有一份数据 M , m是 M中的一段数 据,在服务器 A中完全占用一个扇区, C为主用服务器, A和 B为备用服 务器,服务器 A中维护有一张 BST。 如图 3所示,服务器 A的存储单元故 障处理包括以下流程:
5301、 服务器 A进行磁盘后台扫描,调用 OS 10读取数据 M;
5302、 服务器 A的 OS 10返回数据 m所在扇区发生 UNC或 IDNF;
5303、 服务器 A向服务器 C发送读修复请求;服务器 C读取数据 m , 服务器 C的 OS 10的返回 UNC或 IDNF;
5304、 服务器 C向服务器 B发送读修复请求;服务器 B读取数据 m , 服务器 B的 OS 10的返回 UNC或 IDNF;
5305、 服务器 C接收到服务器 B返回的消息,确定读修复失败;
5306、 服务器 A接收到服务器 C返回的消息,确定读修复失败;
5307、 服务器 A在 BST中标记数据 m所在扇区。
当服务器 A再次进行磁盘后台扫描等读取数据的操作时,先查询 BST , 发现数据 m已被 BST标记,返回读取数据 M失败;当服务器 A接收到写 入数据的请求时,先查询 BST ,发现 m所在扇区已被 BST标记,则撤销 BST中对 m所在扇区的标记,然后向 m所在扇区写入数据。
场景三、 服务器 A、 B、 C中均存有一份数据 M , m是 M中的一段数 据,在 A中完全占用一个扇区,m所在扇区已被 A的 BST标记,此时加入 服务器 D ,用于分担服务器 A、 B、 C的存储负荷。 如图 4所示,分布式存 储系统的 rebalance包括以下流程:
5401、 服务器 A确定将数据 M迁移至服务器 D;
5402、 服务器 A在传输数据 M时,不传输数据 m ,同时指示服务器 D 数据 m所在扇区已被 BST标记;
5403、 服务器 D接收数据 M ,保留数据 m占用的存储空间,同时在 BST中标记 m所在扇区。
当服务器 D读取数据 M时,先查询 BST ,发现数据 m已被 BST标记, 返回读取数据 M失败;当服务器 D接收到写入数据的请求时,先查询 BST , 发现 m所在扇区已被 BST标记,则撤销 BST中对 m所在扇区的标记,然 后向 m所在扇区写入数据。
参见图 5 ,本发明实施例提供的服务器设备,包括:
记录单元 51 ,用于针对至少一个用于存储数据的存储单元,记录发生 可修复故障但修复失败的存储单元的信息;
读请求处理单元 52 ,用于在每次接收到读取数据的请求时,查询记录 的存储单元的信息对应的存储单元中是否存储有所述数据中的部分或全部 数据;如果是,向发送所述请求的请求方返回读取所述数据失败的消息; 否则,在存储有所述数据的存储单元中读取所述数据,并反馈给发送所述 请求的请求方。
较佳的,参见图 6 ,所述记录单元 51 ,包括:
故障确定单元 511 ,用于确定本地发生可修复故障的存储单元; 消息发送单元 512 ,用于向其它服务器发送消息,用以请求所述其它服 务器读取所述发生可修复故障的存储单元中存储的数据的备份数据;
消息处理单元 513 ,用于当接收到所述其它服务器在读取所述备份数据 失败时返回的消息后,确定所述发生可修复故障的存储单元修复失败; 信息记录单元 514 ,用于记录所述发生可修复故障的存储单元的信息。 较佳的,所述故障确定单元 511具体用于:
接收读取数据的请求;
通过 OS 10通道访问请求读取的数据所在的存储单元;
根据所述 OS 10上报的消息,确定所述请求读取的数据所在的存储单 元中发生可修复故障的存储单元。
较佳的,所述故障确定单元 511接收的 OS 10通道上报的消息,包括: 所述发生可修复故障的存储单元对应的位图 bitmap ,以及所述可修复 故障的错误码。
较佳的,所述记录单元 51用于记录发生可修复故障但修复失败的存储 单元的信息时,具体用于:
将内存的坏分区表 BST中对应于所述发生可修复故障但修复失败的存 储单元的比特 bit位设置为 1。
较佳的,该设备还包括:
BST存储单元,用于将内存的 BST存储至硬盘。
较佳的,所述记录单元 51记录的存储单元的信息对应的存储单元发生 的可修复故障,包括:
校验错误,和 /或扇区标志出错。
较佳的,该设备还包括:
写请求处理单元,用于在每次接收到写入数据的请求时,确定将被写 入数据的存储单元;查询记录的存储单元的信息对应的存储单元中是否包 括所述将被写入数据的存储单元;如果是,删除对所述将被写入数据的存 储单元的信息的记录,向所述将被写入数据的存储单元写入数据;否则, 向所述将被写入数据的存储单元写入数据。
较佳的,该设备还包括:
指示单元,用于当确定向任一服务器发送数据时,查询记录的存储单 元的信息对应的存储单元中是否存储有待发送数据中的部分或全部数据; 如果是,向接收方服务器发送指示消息,指示所述待发送数据中的部分或 全部数据所存储在的存储单元发生可修复故障但修复失败;否则,向接收 方服务器发送所述待发送数据。
较佳的,该设备还包括:
指示接收单元,用于当确定将要接收任一服务器发送的数据时,若接 收到发送方服务器指示的部分或全部数据所存储在的发送方服务器的存储 单元发生可修复故障但修复失败的消息,则在本地记录与所述部分或全部 数据对应的存储单元的信息。
需要说明的是,该实施例的服务器设备是为实现上述步骤 S101 - S102 的,上述的对方法的解释和限定同样适用于本实施例的服务器设备。
参见图 7 ,本发明实施例提供的服务器设备,包括:
处理器 71 ,用于针对至少一个用于存储数据的存储单元,记录发生可 修复故障但修复失败的存储单元的信息;在每次接收到读取数据的请求时, 查询记录的存储单元的信息对应的存储单元中是否存储有所述数据中的部 分或全部数据;如果是,向发送所述请求的请求方返回读取所述数据失败 的消息;否则,在存储有所述数据的存储单元中读取所述数据,并反馈给 发送所述请求的请求方。
较佳的,所述设备还包括传输模块 72;
所述处理器用于记录发生可修复故障但修复失败的存储单元的信息 时,具体用于:
确定本地发生可修复故障的存储单元;
通过所述传输模块 72向其它服务器发送消息,用以请求所述其它服务 器读取所述发生可修复故障的存储单元中存储的数据的备份数据;
通过所述传输模块 72接收所述其它服务器返回的消息;
当接收到所述其它服务器在读取所述备份数据失败时返回的消息后, 确定所述发生可修复故障的存储单元修复失败;
记录所述发生可修复故障的存储单元的信息。
较佳的,所述处理器 71用于确定本地发生可修复故障的存储单元时, 具体用于:
接收读取数据的请求;
通过操作系统输入输出 OS 10通道访问请求读取的数据所在的存储单 元;
根据所述 OS 10上报的消息,确定所述请求读取的数据所在的存储单 元中发生可修复故障的存储单元。
较佳的,所述处理器 71接收的 OS 10通道上报的消息,包括: 所述发生可修复故障的存储单元对应的位图 bitmap ,以及所述可修复 故障的错误码。
较佳的,该设备还包括内存 73;
所述处理器用于记录发生可修复故障但修复失败的存储单元的信息 时,具体用于:
将内存 73的坏分区表 BST中对应于所述发生可修复故障但修复失败的 存储单元的比特 bit位设置为 1。
较佳的,该设备还包括硬盘 74;
所述处理器 71还用于将内存 73的 BST存储至硬盘 74。
较佳的,所述处理器 71记录的存储单元的信息对应的存储单元发生的 可修复故障,包括:
校验错误,和 /或扇区标志出错。
较佳的,所述处理器 71还用于在每次接收到写入数据的请求时,确定 将被写入数据的存储单元;查询记录的存储单元的信息对应的存储单元中 是否包括所述将被写入数据的存储单元;如果是,删除对所述将被写入数 据的存储单元的信息的记录,向所述将被写入数据的存储单元写入数据; 否则,向所述将被写入数据的存储单元写入数据。
较佳的,所述处理器 71还用于当确定向任一服务器发送数据时,查询 记录的存储单元的信息对应的存储单元中是否存储有待发送数据中的部分 或全部数据;如果是,向接收方服务器发送指示消息,指示所述待发送数 据中的部分或全部数据所存储在的存储单元发生可修复故障但修复失败; 否则,向接收方服务器发送所述待发送数据。
较佳的,所述处理器 71还用于当确定将要接收任一服务器发送的数据 时,若接收到发送方服务器指示的部分或全部数据所存储在的发送方服务 器的存储单元发生可修复故障但修复失败的消息,则在本地记录与所述部 分或全部数据对应的存储单元的信息。
参见图 8 ,本发明实施例提供的一种分布式存储系统包括:
第一服务器 81 ,用于针对至少一个用于存储数据的存储单元,记录发 生可修复故障但修复失败的存储单元的信息;在每次接收到读取数据的请 求时,查询记录的存储单元的信息对应的存储单元中是否存储有所述数据 中的部分或全部数据;如果是,向发送所述请求的请求方返回读取所述数 据失败的消息;否则,在存储有所述数据的存储单元中读取所述数据,并 反馈给发送所述请求的请求方。
较佳的,所述系统中,对于每一第一服务器,存在与该第一服务器对 应的第二服务器 82;
第一服务器 81用于记录发生可修复故障但修复失败的存储单元的信息 时,具体用于:
向第二服务器 82发送消息,用以请求第二服务器 82读取第一服务器 81内发生可修复故障的存储单元中存储的数据的备份数据;
当接收到第二服务器 82在读取所述备份数据失败时返回的消息后,确 定所述发生可修复故障的存储单元修复失败;
记录所述发生可修复故障的存储单元的信息。 较佳的,第一服务器 81记录的存储单元的信息对应的存储单元发生的 可修复故障,包括:校验错误,和 /或扇区标志出错。
较佳的,第一服务器 81还用于:
当确定向任一服务器发送数据时,查询记录的存储单元的信息对应的 存储单元中是否存储有待发送数据中的部分或全部数据;如果是,向接收 方服务器发送指示消息,指示所述待发送数据中的部分或全部数据所存储 在的存储单元发生可修复故障但修复失败;否则,向接收方服务器发送所 述待发送数据。
较佳的,第一服务器 81还用于:
当确定将要接收任一服务器发送的数据时,若接收到发送方服务器指 示的部分或全部数据所存储在的发送方服务器的存储单元发生可修复故障 但修复失败的消息,则在本地记录与所述部分或全部数据对应的存储单元 白勺 in磨、o
综上所述,本发明实施例提供了一种存储单元的数据处理方法、 设备 及系统,改进了存储单元的数据读、 写、 传输机制,避免了对存储单元数 据的重复修复,节省了系统资源,以及,避免了发生故障的存储单元的数 据被其它设备使用。
本领域内的技术人员应明白 ,本发明的实施例可提供为方法、 系统、 或计算机程序产品。 因此,本发明可采用完全硬件实施例、 完全软件实施 例、 或结合软件和硬件方面的实施例的形式。 而且,本发明可采用在一个 或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不 限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、 设备(系统 λ 和计算机程序 产品的流程图和 /或方框图来描述的。 应理解可由计算机程序指令实现流 程图和 /或方框图中的每一流程和 /或方框、 以及流程图和 /或方框图中 的流程和 /或方框的结合。 可提供这些计算机程序指令到通用计算机、 专 用计算机、 嵌入式处理机或其他可编程数据处理设备的处理器以产生一个 机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产 生用于实现在流程图一个流程或多个流程和 /或方框图一个方框或多个方 框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理 设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存 储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个 流程或多个流程和 /或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备 上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机 实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现 在流程图一个流程或多个流程和 /或方框图一个方框或多个方框中指定的 功能的步骤。
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离 本发明的精神和范围。 这样,倘若本发明的这些修改和变型属于本发明权 利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在

Claims

权利要求
1、 一种存储单元的数据处理方法,其特征在于,该方法包括: 第一服务器针对至少一个用于存储数据的存储单元,记录发生可修复 故障但修复失败的存储单元的信息;
所述第一服务器在接收到读取数据的请求时,查询记录的存储单元的 信息对应的存储单元中是否存储有所述数据中的部分或全部数据;
如果是,向发送所述请求的请求方返回读取所述数据失败的消息; 否则,在存储有所述数据的存储单元中读取所述数据,并反馈给发送 所述请求的请求方。
2、 如权利要求 1所述的方法,其特征在于,所述第一服务器记录发生 可修复故障但修复失败的存储单元的信息,包括:
所述第一服务器向第二服务器发送消息,用以请求所述第二服务器读 取所述第一服务器内发生可修复故障的存储单元中存储的数据的备份数 据;
当所述第一服务器接收到所述第二服务器在读取所述备份数据失败时 返回的消息后,确定所述发生可修复故障的存储单元修复失败;
所述第一服务器记录所述发生可修复故障的存储单元的信息。
3、 如权利要求 2所述的方法,其特征在于,所述第一服务器通过下述 方式确定发生可修复故障的存储单元:
所述第一服务器接收读取数据的请求;
所述第一服务器通过操作系统输入输出 OS 10通道访问请求读取的数 据所在的存储单元;
所述第一服务器根据所述 OS 10上报的消息,确定所述请求读取的数 据所在的存储单元中发生可修复故障的存储单元。
4、 如权利要求 3所述的方法,其特征在于,所述 OS 10通道上报的消 息,包括: 所述发生可修复故障的存储单元对应的位图 bitmap ,以及所述可修复 故障的错误码。
5、 如权利要求 1所述的方法,其特征在于,所述第一服务器记录发生 可修复故障但修复失败的存储单元的信息,包括:
所述第一服务器将内存的坏分区表 BST中对应于所述发生可修复故障 但修复失败的存储单元的比特 bit位设置为 1。
6、 如权利要求 5所述的方法,其特征在于,该方法还包括:
所述第一服务器将内存的 BST存储至硬盘。
7、 如权利要求 1-6任一权项所述的方法,其特征在于,所述可修复故 障,包括:
校验错误,和 /或扇区标志出错。
8、 如权利要求 1所述的方法,其特征在于,该方法还包括:
所述第一服务器在每次接收到写入数据的请求时,确定将被写入数据 的存储单元的信息;
当所述第一服务器确定记录的存储单元的信息中包括所述将被写入数 据的存储单元的信息时,删除记录的所述将被写入数据的存储单元的信息; 向所述将被写入数据的存储单元写入数据。
9、 如权利要求 1所述的方法,其特征在于,该方法还包括:
当所述第一服务器确定向任一服务器发送数据时,查询记录的存储单 元的信息对应的存储单元中是否存储有待发送数据中的部分或全部数据; 如果是,所述第一服务器向接收方服务器发送指示消息,指示所述待 发送数据中的部分或全部数据所存储在的存储单元发生可修复故障但修复 失败;
否则,所述第一服务器向接收方服务器发送所述待发送数据。
10、 如权利要求 1所述的方法,其特征在于,该方法还包括: 当所述第一服务器确定将要接收任一服务器发送的数据时,若接收到 发送方服务器指示的部分或全部数据所存储在的发送方服务器的存储单元 发生可修复故障但修复失败的消息,则确定用于存储所述部分或全部数据 的存储单元,在本地记录用于存储所述部分或全部数据的存储单元的信息。
11、 一种服务器设备,其特征在于,该设备包括:
记录单元,用于针对至少一个用于存储数据的存储单元,记录发生可 修复故障但修复失败的存储单元的信息;
读请求处理单元,用于在每次接收到读取数据的请求时,查询记录的 存储单元的信息对应的存储单元中是否存储有所述数据中的部分或全部数 据;如果是,向发送所述请求的请求方返回读取所述数据失败的消息;否 则,在存储有所述数据的存储单元中读取所述数据,并反馈给发送所述请 求的请求方。
12、 如权利要求 11所述的设备,其特征在于,所述记录单元,包括: 故障确定单元,用于确定本地发生可修复故障的存储单元;
消息发送单元,用于向其它服务器发送消息,用以请求所述其它服务 器读取所述发生可修复故障的存储单元中存储的数据的备份数据;
消息处理单元,用于当接收到所述其它服务器在读取所述备份数据失 败时返回的消息后,确定所述发生可修复故障的存储单元修复失败;
信息记录单元,用于记录所述发生可修复故障的存储单元的信息。
13、 如权利要求 12所述的设备,其特征在于,所述故障确定单元具体 用于:
接收读取数据的请求;
通过操作系统输入输出 OS 10通道访问请求读取的数据所在的存储单 元;
根据所述 OS 10上报的消息,确定所述请求读取的数据所在的存储单 元中发生可修复故障的存储单元。
14、 如权利要求 13所述的设备,其特征在于,所述故障确定单元接收 的 OS 10通道上报的消息,包括:
所述发生可修复故障的存储单元对应的位图 bitmap ,以及所述可修复 故障的错误码。
15、 如权利要求 11所述的设备,其特征在于,所述记录单元用于记录 发生可修复故障但修复失败的存储单元的信息时,具体用于:
将内存的坏分区表 BST中对应于所述发生可修复故障但修复失败的存 储单元的比特 bit位设置为 1。
16、 如权利要求 15所述的设备,其特征在于,该设备还包括: BST存储单元,用于将内存的 BST存储至硬盘。
17、 如权利要求 11-16任一权项所述的设备,其特征在于,所述记录单 元记录的存储单元的信息对应的存储单元发生的可修复故障,包括:
校验错误,和 /或扇区标志出错。
18、 如权利要求 11所述的设备,其特征在于,该设备还包括: 写请求处理单元,用于在每次接收到写入数据的请求时,确定将被写 入数据的存储单元的信息;当确定记录的存储单元的信息中包括所述将被 写入数据的存储单元的信息时,删除记录的所述将被写入数据的存储单元 的信息;向所述将被写入数据的存储单元写入数据。
19、 如权利要求 11所述的设备,其特征在于,该设备还包括: 指示单元,用于当确定向任一服务器发送数据时,查询记录的存储单 元的信息对应的存储单元中是否存储有待发送数据中的部分或全部数据; 如果是,向接收方服务器发送指示消息,指示所述待发送数据中的部分或 全部数据所存储在的存储单元发生可修复故障但修复失败;否则,向接收 方服务器发送所述待发送数据。
20、 如权利要求 11所述的设备,其特征在于,该设备还包括: 指示接收单元,用于当确定将要接收任一服务器发送的数据时,若接 收到发送方服务器指示的部分或全部数据所存储在的发送方服务器的存储 单元发生可修复故障但修复失败的消息,则确定用于存储所述部分或全部 数据的存储单元,在本地记录所述用于存储所述部分或全部数据的存储单 元的信息。
21、 一种分布式存储系统,其特征在于,至少包括:
第一服务器,用于针对至少一个用于存储数据的存储单元,记录发生 可修复故障但修复失败的存储单元的信息;在每次接收到读取数据的请求 时,查询记录的存储单元的信息对应的存储单元中是否存储有所述数据中 的部分或全部数据;如果是,向发送所述请求的请求方返回读取所述数据 失败的消息;否则,在存储有所述数据的存储单元中读取所述数据,并反 馈给发送所述请求的请求方。
22、 如权利要求 21所述的系统,其特征在于,所述系统中,对于每一 第一服务器,存在与该第一服务器对应的第二服务器;
所述第一服务器用于记录发生可修复故障但修复失败的存储单元的信 息时,具体用于:
向所述第二服务器发送消息,用以请求所述第二服务器读取所述第一 服务器内发生可修复故障的存储单元中存储的数据的备份数据;
当接收到所述第二服务器在读取所述备份数据失败时返回的消息后, 确定所述发生可修复故障的存储单元修复失败;
记录所述发生可修复故障的存储单元的信息。
23、 如权利要求 21或 22所述的系统,其特征在于,所述第一服务器 记录的存储单元的信息对应的存储单元发生的可修复故障,包括:
校验错误,和 /或扇区标志出错。
24、如权利要求 21所述的系统,其特征在于,所述第一服务器还用于: 当确定向任一服务器发送数据时,查询记录的存储单元的信息对应的 存储单元中是否存储有待发送数据中的部分或全部数据;如果是,向接收 方服务器发送指示消息,指示所述待发送数据中的部分或全部数据所存储 在的存储单元发生可修复故障但修复失败;否则,向接收方服务器发送所 述待发送数据。
25、如权利要求 21所述的系统,其特征在于,所述第一服务器还用于: 当确定将要接收任一服务器发送的数据时,若接收到发送方服务器指 示的部分或全部数据所存储在的发送方服务器的存储单元发生可修复故障 但修复失败的消息,则确定用于存储所述部分或全部数据的存储单元,在 本地记录用于存储所述部分或全部数据的存储单元的信息。
PCT/CN2014/078079 2013-11-22 2014-05-22 一种存储单元的数据处理方法、设备及系统 WO2015074392A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP14864210.1A EP3054626B1 (en) 2013-11-22 2014-05-22 Data processing method and device for storage unit
US15/160,129 US10049024B2 (en) 2013-11-22 2016-05-20 Data processing method, device, and system for storage unit

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310600884.X 2013-11-22
CN201310600884.XA CN103647804B (zh) 2013-11-22 2013-11-22 一种存储单元的数据处理方法、设备及系统

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/160,129 Continuation US10049024B2 (en) 2013-11-22 2016-05-20 Data processing method, device, and system for storage unit

Publications (1)

Publication Number Publication Date
WO2015074392A1 true WO2015074392A1 (zh) 2015-05-28

Family

ID=50252957

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/078079 WO2015074392A1 (zh) 2013-11-22 2014-05-22 一种存储单元的数据处理方法、设备及系统

Country Status (4)

Country Link
US (1) US10049024B2 (zh)
EP (1) EP3054626B1 (zh)
CN (1) CN103647804B (zh)
WO (1) WO2015074392A1 (zh)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103647804B (zh) 2013-11-22 2017-04-26 华为技术有限公司 一种存储单元的数据处理方法、设备及系统
CA2942045C (en) * 2014-06-24 2019-04-16 Huawei Technologies Co., Ltd. Fault processing method, related apparatus, and computer
CN106326285B (zh) * 2015-06-30 2019-11-12 华为技术有限公司 一种存储数据的方法及装置
WO2018176388A1 (en) * 2017-03-31 2018-10-04 Intel Corporation Techniques to maintain memory confidentiality through power state changes
CN107395416A (zh) * 2017-07-20 2017-11-24 郑州云海信息技术有限公司 一种数据发送方法及服务器集群
CN109426576B (zh) * 2017-08-30 2022-03-29 华为技术有限公司 容错处理方法以及容错组件
CN108173672B (zh) * 2017-12-04 2021-06-08 华为技术有限公司 检测故障的方法和装置
CN112911185B (zh) * 2021-01-18 2022-10-18 浙江大华技术股份有限公司 一种双控设备故障处理方法及装置

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1588547A (zh) * 2004-09-15 2005-03-02 威盛电子股份有限公司 平顺播放光盘的方法与系统
CN103064759A (zh) * 2012-12-18 2013-04-24 华为技术有限公司 数据修复的方法及装置
CN103647804A (zh) * 2013-11-22 2014-03-19 华为技术有限公司 一种存储单元的数据处理方法、设备及系统

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5913927A (en) * 1995-12-15 1999-06-22 Mylex Corporation Method and apparatus for management of faulty data in a raid system
US6854071B2 (en) * 2001-05-14 2005-02-08 International Business Machines Corporation Method and apparatus for providing write recovery of faulty data in a non-redundant raid system
US7069465B2 (en) * 2002-07-26 2006-06-27 International Business Machines Corporation Method and apparatus for reliable failover involving incomplete raid disk writes in a clustering system
US7007191B2 (en) * 2002-08-23 2006-02-28 Lsi Logic Corporation Method and apparatus for identifying one or more devices having faults in a communication loop
US7251743B2 (en) * 2003-11-20 2007-07-31 International Business Machines Corporation Method, system, and program for transmitting input/output requests from a primary controller to a secondary controller
CN100504795C (zh) * 2006-06-28 2009-06-24 联想(北京)有限公司 一种计算机raid阵列预警系统及方法
CN101276302B (zh) * 2007-03-29 2010-10-06 中国科学院计算技术研究所 一种磁盘阵列系统中磁盘故障处理和数据重构方法
US8140922B2 (en) * 2008-05-20 2012-03-20 International Business Machines Corporation Method for correlating an error message from a PCI express endpoint
JP5486793B2 (ja) * 2008-11-07 2014-05-07 株式会社日立製作所 リモートコピー管理システム、方法及び装置
US8381059B2 (en) * 2010-02-17 2013-02-19 Micron Technology, Inc. Error correction and recovery in chained memory architectures
US8958429B2 (en) * 2010-12-22 2015-02-17 Juniper Networks, Inc. Methods and apparatus for redundancy associated with a fibre channel over ethernet network
CN102761566B (zh) * 2011-04-26 2015-09-23 国际商业机器公司 迁移虚拟机的方法和装置
JP5699852B2 (ja) * 2011-08-12 2015-04-15 富士通株式会社 情報処理装置、ストレージ制御方法およびプログラム

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1588547A (zh) * 2004-09-15 2005-03-02 威盛电子股份有限公司 平顺播放光盘的方法与系统
CN103064759A (zh) * 2012-12-18 2013-04-24 华为技术有限公司 数据修复的方法及装置
CN103647804A (zh) * 2013-11-22 2014-03-19 华为技术有限公司 一种存储单元的数据处理方法、设备及系统

Non-Patent Citations (1)

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

Also Published As

Publication number Publication date
EP3054626A4 (en) 2016-11-23
US10049024B2 (en) 2018-08-14
CN103647804A (zh) 2014-03-19
CN103647804B (zh) 2017-04-26
US20160266988A1 (en) 2016-09-15
EP3054626A1 (en) 2016-08-10
EP3054626B1 (en) 2017-10-11

Similar Documents

Publication Publication Date Title
WO2015074392A1 (zh) 一种存储单元的数据处理方法、设备及系统
US11132256B2 (en) RAID storage system with logical data group rebuild
CN102929750B (zh) 非易失性介质肮脏区段跟踪
JP6056453B2 (ja) プログラム、データ管理方法および情報処理装置
US10185507B1 (en) Stateless block store manager volume reconstruction
WO2018098972A1 (zh) 一种日志恢复方法、存储装置和存储节点
CN103929500A (zh) 一种分布式存储系统的数据分片方法
CN104583930B (zh) 数据迁移的方法、控制器和数据迁移装置
US8676750B2 (en) Efficient data synchronization in a distributed data recovery system
JP2010533911A5 (zh)
JP6987340B2 (ja) データベースのデータ変更要求処理方法及び装置
KR101881232B1 (ko) 이메일 웹클라이언트 통지 큐잉
US20210165760A1 (en) Managing Dependent Delete Operations among Data Stores
US10176035B2 (en) System, information processing device, and non-transitory medium for storing program for migration of virtual machine
CN108932249A (zh) 一种管理文件系统的方法及装置
CN111158955A (zh) 一种基于卷复制的高可用系统以及多服务器数据同步方法
CN110737716A (zh) 一种数据写入的方法和装置
JP5170169B2 (ja) ディスクアレイ装置間のリモートコピー処理システム、処理方法、及び処理用プログラム
US10809920B1 (en) Block store management for remote storage systems
WO2017041670A1 (zh) 数据修复方法及装置
US10990313B2 (en) Multi-storage node system and capacity management method of multi-storage node system
US11645333B1 (en) Garbage collection integrated with physical file verification
US10866756B2 (en) Control device and computer readable recording medium storing control program
TW201516704A (zh) 全局調度系統及方法
WO2016082560A1 (zh) 一种检测键的方法和服务器

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

Country of ref document: EP

Kind code of ref document: A1

REEP Request for entry into the european phase

Ref document number: 2014864210

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2014864210

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE