WO2019072004A1 - 一种数据处理方法、装置及分布式存储系统 - Google Patents

一种数据处理方法、装置及分布式存储系统 Download PDF

Info

Publication number
WO2019072004A1
WO2019072004A1 PCT/CN2018/098655 CN2018098655W WO2019072004A1 WO 2019072004 A1 WO2019072004 A1 WO 2019072004A1 CN 2018098655 W CN2018098655 W CN 2018098655W WO 2019072004 A1 WO2019072004 A1 WO 2019072004A1
Authority
WO
WIPO (PCT)
Prior art keywords
controller
storage device
data
storage
module
Prior art date
Application number
PCT/CN2018/098655
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 EP18866806.5A priority Critical patent/EP3697024B1/en
Priority to US16/755,700 priority patent/US11429313B2/en
Publication of WO2019072004A1 publication Critical patent/WO2019072004A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0659Command handling arrangements, e.g. command buffers, queues, command scheduling
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0659Management of faults, events, alarms or notifications using network fault recovery by isolating or reconfiguring faulty entities
    • 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/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/0727Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in a storage system, e.g. in a DASD or network based storage system
    • 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/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy
    • G06F11/0754Error or fault detection not based on redundancy by exceeding limits
    • G06F11/0757Error or fault detection not based on redundancy by exceeding limits by exceeding a time limit, i.e. time-out, e.g. watchdogs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • G06F3/0619Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0653Monitoring storage devices or systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Definitions

  • the present application relates to the field of distributed storage technologies, and in particular, to a data processing method, apparatus, and distributed storage system.
  • some storage devices contain two controllers, which are also referred to as dual-control storage devices.
  • the two controllers in the dual-control storage device share hardware resources such as storage resources and power supplies, and HBA (Host Bus Adapter).
  • HBA Hypervisor Adapter
  • a dual-control storage device when an abnormality occurs in one controller, such as a network abnormality or a system abnormality, the other controller can continue to operate normally, so that the dual-control storage device can still provide some normal storage services.
  • the purpose of the embodiment of the present application is to provide a data processing method, device, and distributed storage system, so as to improve stability of stored data of the dual-control storage device.
  • the embodiment of the present application provides a data processing method, which is applied to a dual-control storage server in a distributed storage system, where the dual-control storage server includes two controllers: a first controller and a second controller. , the method includes:
  • the first controller After the first controller detects the abnormality of the second controller, the first controller determines the storage device managed by the second controller;
  • the first controller scans the data in the determined storage device to obtain metadata of the storage device
  • the first controller When the first controller receives the data read instruction and determines that the data to be read pointed by the data read instruction is stored in the determined storage device, the first controller uses the obtained metadata in the In the determined storage device, the data to be read pointed to by the data read instruction is read.
  • the method may further include:
  • the first controller receives the data storage instruction and determines that the storage device corresponding to the data storage instruction is the determined storage device, the first controller stores the data storage instruction in the determined storage device. Corresponding data to be stored.
  • the first controller detects the second controller abnormality, and may include:
  • the first controller periodically sends the probe information to the second controller, and determines whether the feedback information of the second controller is received within a preset time period after the probe information is sent; if not received Indicates that the second controller is abnormal.
  • the method may further include:
  • the second controller stores the verification information corresponding to each storage device under its own management
  • the method may further include:
  • the first controller generates, for each of the determined storage devices, verification information corresponding to the storage device, and stores verification information corresponding to the storage device to the storage device, and in the first controller Storing the verification information corresponding to the storage device;
  • the method may further include:
  • the second controller reads the verification information in the storage device for each storage device managed by the second controller, and determines that the verification information in the storage device is stored in the second controller. Whether the verification information corresponding to the storage device information is the same; if different, the metadata of the storage device is obtained from the first controller.
  • the method may further include:
  • the obtained metadata of the storage device managed by the second controller is sent to the second controller;
  • the second controller receives metadata sent by the first controller; and uses the received metadata to update metadata stored in the second controller.
  • the first controller detects the recovery of the second controller, including:
  • the first controller periodically sends the probe information to the second controller, and determines whether the feedback information of the second controller is received within a preset time period after the sending the probe information; if received, Indicates that the second controller is restored.
  • the embodiment of the present application further provides a data processing apparatus, which is applied to a dual-control storage server in a distributed storage system, where the dual-control storage server includes two controllers: a first controller and a second control.
  • the device includes a detection module, a determination module, a scan module, and a reading module applied to the first controller, wherein
  • the detecting module is configured to detect whether the second controller is abnormal, and if abnormal, trigger the determining module;
  • the determining module is configured to determine a storage device managed by the second controller
  • the scanning module is configured to scan data in the storage device determined by the determining module to obtain metadata of the storage device;
  • the reading module is configured to use the scanning module when receiving a data reading instruction and determining that the data to be read pointed by the data reading instruction is stored in a storage device determined by the determining module
  • the obtained metadata in the determined storage device, reads the data to be read pointed to by the data read instruction.
  • the device further includes a storage module applied to the first controller,
  • the storage module is configured to: when the data storage instruction is received, and the storage device corresponding to the data storage instruction is determined to be the storage device determined by the determining module, in the determined storage device, the data is stored The data to be stored corresponding to the storage instruction.
  • the detecting module is specifically configured to:
  • the device further includes a determining module applied to the first controller,
  • the determining module is configured to determine whether the first controller acquires metadata in the second controller from the second controller; if not, triggers the scanning module.
  • the second controller stores the verification information corresponding to each storage device under its own management
  • the device further includes a generation module and a storage module applied to the first controller, wherein
  • the generating module is configured to generate, for each storage device determined by the determining module, a verification information corresponding to the storage device;
  • the storage module is configured to store the verification information corresponding to the storage device generated by the generating module to the storage device, and store the verification information corresponding to the storage device in the first controller;
  • the device further includes a reading module, a determining module, and an obtaining module applied to the second controller, where
  • the reading module is configured to read, after the second controller is restored, the verification information in the storage device for each storage device managed by the second controller;
  • the determining module is configured to determine whether the verification information in the storage device is the same as the verification information corresponding to the storage device information stored in the second controller; if not, triggering the acquiring module;
  • the obtaining module is configured to acquire metadata of the storage device from the first controller.
  • the device further includes a sending module applied to the first controller;
  • the detecting module is further configured to detect whether the second controller is restored, and if it is restored, triggering the sending module;
  • the sending module is configured to send metadata of the storage device managed by the second controller obtained by the scanning module to the second controller;
  • the device also includes a receiving module and an update module applied to the second controller, wherein
  • the receiving module is configured to receive metadata sent by the sending module
  • the update module is configured to update metadata stored in the second controller by using metadata received by the receiving module.
  • the detecting module is further configured to:
  • the embodiment of the present application further provides a distributed storage system, including: at least one dual-control storage server, where the dual-control storage server includes two controllers: a first controller and a second controller; among them,
  • the first controller is configured to: after detecting the abnormality of the second controller, determine a storage device managed by the second controller; scan data in the determined storage device to obtain a element of the storage device Data and manage the storage device.
  • the system includes: a management server and multiple storage servers, where the multiple storage servers include at least one dual-control storage server;
  • the management server is configured to receive data to be stored; segment the data to be stored to obtain a plurality of data blocks; and determine whether the number of storage servers in the system is smaller than the number of the data blocks; if less than The target dual-control storage server is selected in the dual-control storage server, and each target dual-control storage server is determined as two storage servers, and the plurality of data blocks are separately stored in each storage server.
  • the management server is further configured to:
  • the dual-control storage server is further configured to display a correspondence between the two controllers and a storage device, where the correspondence relationship includes a correspondence between the first controller and a storage device under management thereof. And a correspondence between the second controller and a storage device under management thereof;
  • the management server can also be used to:
  • the data storage instruction carries target storage device information that stores data, where the target storage device information is the two displayed by the user equipment according to the dual-control storage server.
  • the controller and the storage device Corresponding relationship between the controller and the storage device;
  • the dual-control storage server is further configured to store, according to the stripe, data to be stored corresponding to the data storage instruction.
  • the embodiment of the present application further provides a dual-control storage server, including two controllers: a first controller and a second controller;
  • the embodiment of the present application further discloses a computer readable storage medium, where the computer readable storage medium stores a computer program, and when the computer program is executed by the processor, implements any one of the foregoing data processing methods. .
  • an embodiment of the present application further discloses an executable program code for being executed to execute any of the above data processing methods.
  • a dual-control storage server When applying the solution provided by the embodiment of the present application for data processing, in a dual-control storage server, if one controller is abnormal, another controller determines a storage device managed by the abnormal controller, and the other controller scans the determined Storing the data in the device, obtaining the metadata of the storage device, and using the metadata to read the data stored in the determined storage device; it can be seen that, in the solution provided by the embodiment of the present application, if one controller is abnormal, another The controller will take over the abnormal controller to provide external services, which improves the stability of the data stored in the dual-control storage server.
  • FIG. 1 is a schematic diagram of an application scenario of a dual-control storage server according to an embodiment of the present disclosure
  • FIG. 2 is a schematic flowchart of a data processing method according to an embodiment of the present application.
  • FIG. 3 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present disclosure.
  • FIG. 4 is a schematic structural diagram of a distributed storage system according to an embodiment of the present disclosure.
  • the embodiment of the present application provides a data processing method, device, and distributed storage system.
  • the method and apparatus can be applied to a dual-control storage server in a distributed storage system.
  • the dual-control storage server can include two controllers as shown in FIG. 1, and each controller manages multiple storage devices.
  • one of the controllers is referred to as a first controller and the other controller is referred to as a second controller.
  • a data processing method provided by an embodiment of the present application is first described in detail below.
  • FIG. 2 is a schematic flowchart of a data processing method according to an embodiment of the present disclosure, including:
  • S202 The first controller scans the data in the determined storage device to obtain metadata of the storage device.
  • a dual-control storage server When applying the solution provided by the embodiment of FIG. 2 of the present application for data processing, in a dual-control storage server, if one controller is abnormal, another controller determines a storage device managed by the abnormal controller, and the other controller scans the storage device. Determining data in the storage device, obtaining metadata of the storage device, and using the metadata to read the data stored in the determined storage device; visible, in this solution, if one controller is abnormal, another controller will Replacing the abnormal controller to provide external services improves the stability of the data stored in the dual-control storage server.
  • the first controller may periodically send the probe information to the second controller, and determine whether the feedback information of the second controller is received within a preset time period after the probe information is sent; if not received To, indicating that the second controller is abnormal.
  • the first controller and the second controller can establish a heartbeat connection, and the two controllers can periodically send the probe information to the other party. If the feedback information of the other party is received within the preset time period, the heartbeat of the other party is normal, if The feedback information of the other party is received within the preset time period, indicating that the other party has an abnormality.
  • a first controller there are two controllers: a first controller and a second controller, wherein the two controllers can respectively manage different storage devices, and the two controllers detect whether the other party is abnormal.
  • the two controllers can respectively manage different storage devices, and the two controllers detect whether the other party is abnormal.
  • the exception occurs in the second controller, it can be understood that if the first controller is abnormal, the processing manner is similar and will not be described again.
  • the storage device in this embodiment may be a disk, an SSD (Solid State Drives), a NAS (Network Attached Storage) device, an iSCSI (Internet Small Computer System Interface) device, or an FC SAN.
  • FC Fibre-Channel, Fibre Channel
  • SAN Storage Area Network, storage area network
  • the storage server may manage the storage device.
  • the “management” herein may include: the storage server writes data in the storage device, and stores metadata of the written data in the storage server; the storage server The data in the storage device is read according to the stored metadata; or the storage server periodically cleans the data in the storage device, and the like, which is not limited.
  • the first controller may manage the storage devices of the odd slots, and the second controller may manage the storage devices of the even slots.
  • the first controller may determine the storage device of the even slot as the storage device under the management of the second controller.
  • the first controller and the second controller may also divide the storage device managed by the second controller according to other manners. After the second controller is abnormal, the first controller may determine, according to the division manner, the storage managed by the second controller. device.
  • S202 The first controller scans the data in the determined storage device to obtain metadata of the storage device.
  • Metadata which is data about data, is mainly related information describing data attributes, and is used to support functions such as indicating storage location, historical data, resource search, and file recording.
  • Metadata For the data stored by the erasure code strategy, it is usually necessary to record the stripe information of the data, and the stripe information is the metadata of the data.
  • Erasure coding is a data protection method.
  • the data to be stored may be divided into k original data blocks, and the k original data blocks are expanded and coded according to the k original data blocks to obtain m redundant data blocks; the k original data blocks and m redundant data blocks are obtained. Store separately; this way, if a block of data is lost, the lost block can be recovered based on the block that was not lost.
  • OSD is the storage server
  • OSD_1, OSD_2, etc. are the storage server identifier
  • wwn is The storage device, wwn_1, wwn_2, etc., can be the storage device identifier.
  • the data A is sliced and redundantly processed to obtain original data blocks and redundant data blocks.
  • Each data block in the strip corresponds to a quad [OSD, wwn, key, value>, where key represents the key of the data block and value represents the value or content of the data block.
  • the stripe information corresponding to the record data A is:
  • the stored stripe information may not include the storage server identifier.
  • the recorded stripe information may also be:
  • the metadata may also contain complete data information, and the complete data information indicates which strip information corresponds to a complete data.
  • the data B is divided into three data B1, B2, and B3, and B1, B2, and B3 respectively correspond to one strip information; in this case, a complete copy can be saved for the data B.
  • Data information, the complete data information indicates that data B corresponds to three pieces of strip information.
  • Metadata for the data can be obtained by scanning the data stored in the storage device. It can be understood that after the data in the storage device is scanned, the storage device identifier, the storage server identifier, and the key and value of the data block can be obtained, so that the stripe information of the data can be combined, and the stripe information is metadata.
  • one piece of data B is divided into three pieces of data B1, B2, and B3, and B1, B2, and B3 respectively correspond to one piece of strip information.
  • B1, B2, and B3 are all available. Carrying a data identifier, indicating that the three data belong to the same data, so that the complete data information can be combined, and the complete data information is also metadata.
  • the metadata of the data in the storage device may be obtained by scanning data in the storage device, or simply referred to as metadata of the storage device.
  • the first controller may determine, before executing S202, whether to obtain metadata in the second controller from the second controller; if not, the first controller performs S202 again. .
  • the first controller cannot directly obtain the metadata in the second controller. In some abnormal situations, the first controller can directly obtain the second control. Metadata in the device. Therefore, the first controller may first determine whether metadata can be obtained from the second controller, if so, directly copy the metadata in the second controller, and if not, scan the data in the determined storage device, Get the metadata.
  • a piece of data B is divided into three pieces of data B1, B2, and B3, and B1, B2, and B3 are respectively stored in the storage device determined by the first controller, and the metadata obtained by the first controller to obtain the data B includes : Three strips of information corresponding to B1, B2, and B3, and complete data information of data B.
  • the first controller receives the instruction of the read data B sent by the user, and the first controller determines the storage device where the data B is located, and uses the metadata of the data B to read B1, B2, and B3, respectively, and reads B1, B2, and B3 are combined into data B and fed back to the user.
  • the first controller may take over the second controller to manage the determined storage device.
  • the “management” herein may include: in addition to the read data in S303, the following:
  • the first controller receives the data storage instruction and determines that the storage device corresponding to the data storage instruction is the determined storage device, the first controller stores the data storage instruction in the determined storage device. Corresponding data to be stored.
  • the metadata of the written data may be stored in the first controller; and read according to the scanned metadata or the newly stored metadata. Take the data from these storage devices.
  • management herein may also include periodically cleaning data in the storage device, etc., and is not limited thereto.
  • the controller may generate a verification information for the storage device, and the controller stores the verification information to the The storage device stores the verification information corresponding to the storage device in the controller. In this way, each controller stores the verification information corresponding to each storage device under its management.
  • the verification information may be a pseudo random number, and the pseudo random number is different from other values existing in the storage device, and the pseudo random number and the storage device identifier may be correspondingly stored in the controller.
  • the first controller may further generate, for each of the determined storage devices, verification information corresponding to the storage device, and store the verification information corresponding to the storage device to The storage device stores the verification information corresponding to the storage device in the first controller.
  • the second controller may read the verification information in the storage device for each storage device under its management; determine the verification information in the storage device. Whether the verification information corresponding to the storage device information stored in the second controller is the same; if different, the metadata of the storage device is obtained from the first controller.
  • the first controller scans each storage device managed by the second controller to generate metadata of each storage device, and if the second controller returns to normal during the scanning process, Then, the first controller only scans part of the storage device, only obtains the metadata of the part of the storage device, and only generates the verification information of the part of the storage device, and only the verification information in some of the storage devices changes.
  • the second controller reads the verification information in the storage device for each storage device under its management, and determines the verification information and the second information in the storage device. Whether the verification information stored in the controller is the same: if the same, it means that the first controller does not obtain the metadata of the storage device, or does not obtain the complete metadata of the storage device, and does not generate the storage device. Verification information; if different, indicating that the first controller has obtained the metadata of the storage device, the verification information of the storage device has been generated.
  • the second controller may directly take over the first controller to manage the storage device; if the determination result is different, the second controller may obtain the first controller. The metadata of the storage device is then managed by the first controller. In this way, the second controller does not need to scan the data in the storage device, and does not need to regenerate the metadata, which reduces the recovery time and improves the recovery efficiency.
  • the first controller may send the obtained metadata of the storage device managed by the second controller to the second controller.
  • the probe information may be periodically sent between the two controllers.
  • the first controller may periodically send the probe information to the second controller, and determine whether the probe information is sent.
  • the feedback information of the second controller is received within the preset time period; if received, the second controller is restored.
  • the first controller sends the obtained metadata of the storage device managed by the second controller to the second controller.
  • the second controller After receiving the metadata, the second controller updates the metadata stored in the second controller by using the received metadata.
  • the metadata may carry the storage device identifier, and the second controller replaces the received metadata with the metadata stored in the second controller according to the storage device identifier.
  • the first controller sequentially scans the storage devices according to the order of wwn_1-wwn_10. After the storage device wwn_5 scans to obtain the metadata of wwn_5, it detects that the second controller recovers. The first controller sends the metadata of the scanned five storage devices to the second controller.
  • the storage device identifier carried by the metadata received by the second controller includes: wwn_1, wwn_2, wwn_3, wwn_4, and wwn_5, indicating that the metadata is metadata of the five storage devices.
  • the second controller stores the metadata of the ten storage devices wwn_1-wwn_10. In this case, the second controller replaces the metadata of the five storage devices received by the wwn_1-wwn_5 stored by the second controller.
  • the metadata of the storage device includes: wwn_1, wwn_2, wwn_3, wwn_4, and wwn_5, indicating that the metadata is metadata of the five storage devices.
  • the second controller stores the metadata of the ten storage devices wwn_1-wwn_10. In this case, the second controller replaces the metadata of the five storage devices received by the wwn_1-wwn_5 stored by the second controller.
  • the metadata of the storage device includes: ww
  • the second controller does not need to scan the data in the storage device, and does not need to regenerate the metadata, which reduces the recovery time and improves the recovery efficiency.
  • the embodiment of the present application further provides a data processing apparatus, as shown in FIG. 3, applied to a dual-control storage server in a distributed storage system, where the dual-control storage server includes two controls.
  • the first controller 100 and the second controller 200, the device includes a detection module 110, a determination module 120, a scanning module 130, and a reading module 140 applied to the first controller 100, where
  • the detecting module 110 is configured to detect whether the second controller is abnormal, and if abnormal, trigger the determining module 120;
  • a determining module 120 configured to determine a storage device managed by the second controller
  • the scanning module 130 is configured to scan data in the storage device determined by the determining module 120 to obtain metadata of the storage device.
  • the reading module 140 is configured to: when receiving the data read instruction, and determining that the data to be read pointed by the data read instruction is stored in the storage device determined by the determining module 120, using the element obtained by the scanning module 130 Data, in the determined storage device, reading data to be read pointed to by the data read instruction.
  • the device further includes a storage module (not shown) applied to the first controller,
  • the storage module is configured to: when the data storage instruction is received, and the storage device corresponding to the data storage instruction is determined to be the storage device determined by the determining module, in the determined storage device, the data is stored The data to be stored corresponding to the storage instruction.
  • the detecting module 110 may be specifically configured to:
  • the device further includes a determining module (not shown) applied to the first controller,
  • the determining module is configured to determine whether the first controller acquires metadata in the second controller from the second controller; if not, the scanning module 130 is triggered.
  • the second controller stores verification information corresponding to each storage device under its own management
  • the device further includes a generation module and a storage module (not shown) applied to the first controller, wherein
  • the generating module is configured to generate, for each storage device determined by the determining module, a verification information corresponding to the storage device;
  • the storage module is configured to store the verification information corresponding to the storage device generated by the generating module to the storage device, and store the verification information corresponding to the storage device in the first controller;
  • the device further includes a reading module, a determining module, and an obtaining module (not shown) applied to the second controller, where
  • the reading module is configured to read, after the second controller is restored, the verification information in the storage device for each storage device managed by the second controller;
  • the determining module is configured to determine whether the verification information in the storage device is the same as the verification information corresponding to the storage device information stored in the second controller; if not, triggering the acquiring module;
  • the obtaining module is configured to acquire metadata of the storage device from the first controller.
  • the apparatus may further include a sending module (not shown) applied to the first controller;
  • the detecting module 110 is further configured to detect whether the second controller is restored, and if it is restored, triggering the sending module;
  • the sending module is configured to send, by the scanning module, metadata of a storage device managed by the second controller to the second controller;
  • the device further includes a receiving module and an update module (not shown) applied to the second controller, wherein
  • the receiving module is configured to receive metadata sent by the sending module
  • the update module is configured to update metadata stored in the second controller by using metadata received by the receiving module.
  • the detecting module 110 can also be used to:
  • the modules included in the first controller 100 and the second controller 200 may be the same.
  • only the abnormality of the second controller is taken as an example for description. If the first controller is abnormal, the steps performed by each module are similar and will not be described again.
  • the embodiment of the present application further provides a distributed storage system, including: at least one dual-control storage server, where the dual-control storage server includes two controllers: a first controller and a second controller;
  • the first controller is configured to: after detecting the abnormality of the second controller, determine a storage device managed by the second controller; scan data in the determined storage device to obtain a element of the storage device Data and manage the storage device.
  • the dual-control storage server in the system shown in this embodiment can execute any of the above data processing methods.
  • the distributed storage system may include: a management server and a plurality of storage servers, where the plurality of storage servers include at least one dual-control storage server;
  • the management server is configured to receive data to be stored; segment the data to be stored to obtain a plurality of data blocks; and determine whether the number of storage servers in the system is smaller than the number of the data blocks; if less than The target dual-control storage server is selected in the dual-control storage server, and each target dual-control storage server is determined as two storage servers, and the plurality of data blocks are separately stored in each storage server.
  • the management server performs segmentation and redundancy processing on the stored data. It is assumed that the data A is stored by the erasure code strategy 4+1, and the management server performs data segmentation and redundancy processing to obtain five data blocks.
  • the distributed storage system contains eight storage servers, and the number of storage servers is not less than the number of data blocks.
  • the management server selects five storage servers from the eight storage servers and sends the five data blocks. To these 5 storage servers for storage, each storage server stores one data block.
  • the distributed storage system contains four storage servers, and the number of storage servers is smaller than the number of data blocks. It is assumed that the four storage servers contain one dual-control storage server. In this case, the management server will control the dual control.
  • the storage server is determined to be two storage servers, so that the number of storage servers in the system becomes 5, and the management server sends the 5 data blocks to the 5 storage servers for storage, and each storage server stores one data block.
  • the management server calculates a difference between the number of the storage servers and the number of the data blocks in a case where it is determined that the number of storage servers in the system is smaller than the number of the data blocks;
  • the target storage server selects a target dual-control storage server equal to the difference.
  • the distributed storage system includes four storage servers
  • the number of storage servers is smaller than the number of data blocks, and the difference is 1
  • the four storage servers contain three dual-control storage servers
  • the management server selects a target dual-control storage server among the three dual-control storage servers, and determines the target dual-control storage server as two storage servers, so that the number of storage servers in the system becomes 5, and management
  • the server sends the 5 data blocks to the 5 storage servers for storage, and each storage server stores one data block.
  • the management server uses the dual-control storage server as a storage server; if the number of storage servers in the system is less than the number of data blocks, the management server will double Control the storage server as two storage servers.
  • the management server can use part of the dual-control storage server as two storage servers according to the difference between the number of storage servers in the system and the number of data blocks. In this way, the storage resources can be utilized in a balanced manner.
  • the dual-control storage server may be further configured to display a correspondence between the two controllers and a storage device, where the correspondence relationship includes the first controller and a storage device under management thereof. Correspondence relationship and corresponding relationship between the second controller and the storage device under management thereof;
  • the management server can also be used to:
  • the data storage instruction carries target storage device information that stores data, where the target storage device information is the two displayed by the user equipment according to the dual-control storage server.
  • the controller and the storage device Corresponding relationship between the controller and the storage device;
  • the dual-control storage server is further configured to store, according to the stripe, data to be stored corresponding to the data storage instruction.
  • the dual-control storage server transparently displays the two controllers and the storage device under management thereof to the user, and the user can select a storage device that stores data according to the displayed content. It can be seen that the implementation method realizes the transparency of the information, and enables the user to select the storage device under the management of the controller according to the needs of the user.
  • the embodiment of the present application further provides a dual control storage server, as shown in FIG. 1 , including two controllers: a first controller and a second controller;
  • the dual-control storage server in this embodiment can execute any of the above data processing methods.
  • a dual-control storage server When applying the solution provided by the embodiment of the present application for data processing, in a dual-control storage server, if one controller is abnormal, another controller determines a storage device managed by the abnormal controller, and the other controller scans the determined The data in the storage device obtains the metadata of the storage device, and uses the metadata to read the data stored in the determined storage device; if, in this solution, if one controller is abnormal, the other controller takes over the abnormality.
  • the controller provides external services and improves the stability of the data stored in the dual-control storage server.
  • the embodiment of the present application further provides a computer readable storage medium, where the computer readable storage medium stores a computer program, and when the computer program is executed by the processor, implements any one of the foregoing data processing methods.
  • the embodiment of the present application also provides an executable program code for being executed to execute any of the above data processing methods.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Quality & Reliability (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请实施例提供了一种数据处理方法、装置及分布式存储系统,该方法及装置应用于双控存储服务器中,双控存储服务器包含两个控制器,如果一个控制器出现异常,另一个控制器确定异常控制器管理下的存储设备,该另一个控制器扫描所确定的存储设备中的数据,得到存储设备的元数据,并利用该元数据读取所确定的存储设备中存储的数据;可见,本方案中,如果一个控制器出现异常,另一个控制器会接替异常控制器对外提供服务,提高了双控存储服务器存储数据的稳定性。

Description

一种数据处理方法、装置及分布式存储系统
本申请要求于2017年10月13日提交中国专利局、申请号为201710950977.3、发明名称为“一种数据处理方法、装置及分布式存储系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及分布式存储技术领域,特别是涉及一种数据处理方法、装置及分布式存储系统。
背景技术
目前,一些存储设备中包含两个控制器,这些存储设备也被称为双控存储设备。双控存储设备中的两个控制器共用存储资源及电源、HBA(Host Bus Adapter,主机总线适配器)等硬件资源。
在双控存储设备中,当一个控制器出现异常,比如网络异常、系统异常等情况时,另一个控制器仍能继续正常运行,这样,该双控存储设备仍能提供部分正常的存储服务。
但是,现有的双控存储设备中,一个控制器出现异常时,仍有部分存储服务异常,设备存储数据的稳定性较差。
发明内容
本申请实施例的目的在于提供一种数据处理方法、装置及分布式存储系统,以提高双控存储设备存储数据的稳定性。
为达到上述目的,本申请实施例提供一种数据处理方法,应用于分布式存储系统中的双控存储服务器,所述双控存储服务器包含两个控制器:第一控制器和第二控制器,所述方法包括:
第一控制器检测到第二控制器异常后,第一控制器确定所述第二控制器管理下的存储设备;
第一控制器扫描所确定的存储设备中的数据,得到所述存储设备的元数据;
在第一控制器接收到数据读取指令、且判定所述数据读取指令指向的待读取数据存储于所确定的存储设备中的情况下,第一控制器利用得到的元数 据,在所确定的存储设备中,读取所述数据读取指令指向的待读取数据。
可选的,在所述第一控制器确定所述第二控制器管理下的存储设备之后,所述方法还可以包括:
在第一控制器接收到数据存储指令、且判定所述数据存储指令对应的存储设备为所确定的存储设备的情况下,第一控制器在所确定的存储设备中,存储所述数据存储指令对应的待存储数据。
可选的,所述第一控制器检测到第二控制器异常,可以包括:
所述第一控制器定期向所述第二控制器发送探测信息,并判断是否在发送所述探测信息后的预设时间段内接收到所述第二控制器的反馈信息;如果未接收到,表示所述第二控制器异常。
可选的,在所述第一控制器扫描所确定的存储设备中的数据,得到所述存储设备的元数据之前,还可以包括:
所述第一控制器判断是否从所述第二控制器中获取到所述第二控制器中的元数据;如果未获取到,所述第一控制器执行所述扫描所确定的存储设备中的数据,得到所述存储设备的元数据的步骤。
可选的,所述第二控制器中存储有自身管理下的每个存储设备对应的校验信息;
在所述第一控制器扫描所确定的存储设备中的数据,得到所述存储设备的元数据之后,还可以包括:
所述第一控制器针对所确定的每个存储设备,生成一份该存储设备对应的校验信息,将该存储设备对应的校验信息存储至该存储设备,并在所述第一控制器中存储该存储设备对应的校验信息;
在所述第二控制器恢复后,所述方法还可以包括:
所述第二控制器针对所述第二控制器管理下的每个存储设备,读取该存储设备中的校验信息;判断该存储设备中的校验信息与所述第二控制器中存储的该存储设备信息对应的校验信息是否相同;如果不同,从所述第一控制器中获取该存储设备的元数据。
可选的,在所述第一控制器扫描所确定的存储设备中的数据,得到所述存储设备的元数据之后,还可以包括:
所述第一控制器检测到所述第二控制器恢复后,将得到的所述第二控制器管理下的存储设备的元数据发送至所述第二控制器;
所述第二控制器接收所述第一控制器发送的元数据;利用所接收到的元数据,对所述第二控制器中存储的元数据进行更新。
可选的,所述第一控制器检测到所述第二控制器恢复,包括:
所述第一控制器定期向所述第二控制器发送探测信息,并判断是否在发送所述探测信息后的预设时间段内接收到所述第二控制器的反馈信息;如果接收到,表示所述第二控制器恢复。
为达到上述目的,本申请实施例还提供一种数据处理装置,应用于分布式存储系统中的双控存储服务器,所述双控存储服务器包含两个控制器:第一控制器和第二控制器,所述装置包括应用于所述第一控制器的检测模块、确定模块、扫描模块和读取模块,其中,
所述检测模块,用于检测所述第二控制器是否异常,如果异常,触发所述确定模块;
所述确定模块,用于确定所述第二控制器管理下的存储设备;
所述扫描模块,用于扫描所述确定模块确定的存储设备中的数据,得到所述存储设备的元数据;
所述读取模块,用于在接收到数据读取指令、且判定所述数据读取指令指向的待读取数据存储于所述确定模块确定的存储设备中的情况下,利用所述扫描模块得到的元数据,在所确定的存储设备中,读取所述数据读取指令指向的待读取数据。
可选的,所述装置还包括应用于所述第一控制器的存储模块,
所述存储模块,用于在接收到数据存储指令、且判定所述数据存储指令对应的存储设备为所述确定模块确定的存储设备的情况下,在所确定的存储设备中,存储所述数据存储指令对应的待存储数据。
可选的,所述检测模块,具体可以用于:
定期向所述第二控制器发送探测信息,并判断是否在发送所述探测信息后的预设时间段内接收到所述第二控制器的反馈信息;如果未接收到,表示所述第二控制器异常。
可选的,所述装置还包括应用于所述第一控制器的判断模块,
所述判断模块,用于判断所述第一控制器是否从所述第二控制器中获取到所述第二控制器中的元数据;如果未获取到,触发所述扫描模块。
可选的,所述第二控制器中存储有自身管理下的每个存储设备对应的校验信息;
所述装置还包括应用于所述第一控制器的生成模块和存储模块,其中,
所述生成模块,用于针对所述确定模块确定的每个存储设备,生成一份该存储设备对应的校验信息;
所述存储模块,用于将所述生成模块生成的该存储设备对应的校验信息存储至该存储设备,并在所述第一控制器中存储该存储设备对应的校验信息;
所述装置还包括应用于所述第二控制器的读取模块、判断模块和获取模块,其中,
所述读取模块,用于在所述第二控制器恢复后,针对所述第二控制器管理下的每个存储设备,读取该存储设备中的校验信息;
所述判断模块,用于判断该存储设备中的校验信息与所述第二控制器中存储的该存储设备信息对应的校验信息是否相同;如果不同,触发所述获取模块;
所述获取模块,用于从所述第一控制器中获取该存储设备的元数据。
可选的,所述装置还包括应用于所述第一控制器的发送模块;
所述检测模块,还用于检测所述第二控制器是否恢复,如果恢复,触发所述发送模块;
所述发送模块,用于将所述扫描模块得到的所述第二控制器管理下的存储设备的元数据发送至所述第二控制器;
所述装置还包括应用于所述第二控制器的接收模块和更新模块,其中,
所述接收模块,用于接收所述发送模块发送的元数据;
所述更新模块,用于利用所述接收模块接收到的元数据,对所述第二控制器中存储的元数据进行更新。
可选的,所述检测模块,还可以用于:
定期向所述第二控制器发送探测信息,并判断是否在发送所述探测信息 后的预设时间段内接收到所述第二控制器的反馈信息;如果接收到,表示所述第二控制器恢复。
为达到上述目的,本申请实施例还提供一种分布式存储系统,包括:至少一台双控存储服务器,所述双控存储服务器包含两个控制器:第一控制器和第二控制器;其中,
所述第一控制器,用于检测到所述第二控制器异常后,确定所述第二控制器管理下的存储设备;扫描所确定的存储设备中的数据,得到所述存储设备的元数据,并对所述存储设备进行管理。
可选的,所述系统中包括:管理服务器和多台存储服务器,所述多台存储服务器中包含至少一台双控存储服务器;其中,
所述管理服务器,用于接收待存储数据;将所述待存储数据进行切分,得到多个数据块;判断所述系统中的存储服务器的数量是否小于所述数据块的数量;如果小于,在双控存储服务器中选择目标双控存储服务器,将每台目标双控存储服务器确定为两台存储服务器,将所述多个数据块分别存储至每台存储服务器中。
可选的,所述管理服务器,还可以用于:
在判定所述系统中的存储服务器的数量小于所述数据块的数量的情况下,计算所述存储服务器的数量与所述数据块的数量的差值;
在双控存储服务器中选择与所述差值数量相等的目标双控存储服务器。
可选的,所述双控存储服务器,还用于将所述两个控制器与存储设备的对应关系进行展示,所述对应关系包含所述第一控制器与其管理下的存储设备的对应关系、及所述第二控制器与其管理下的存储设备的对应关系;
所述管理服务器,还可以用于:
接收用户设备发送的数据存储指令,所述数据存储指令中携带有存储数据的目标存储设备信息,所述目标存储设备信息为所述用户设备根据所述双控存储服务器所展示的所述两个控制器与存储设备的对应关系确定的;
根据所述目标存储设备信息,为所述数据存储指令对应的待存储数据分配条带,并将所述条带发送给所述双控存储服务器;
所述双控存储服务器,还用于根据所述条带,对所述数据存储指令对应 的待存储数据进行存储。
为达到上述目的,本申请实施例还提供一种双控存储服务器,包括两个控制器:第一控制器和第二控制器;
所述第一控制器,用于检测到第二控制器异常后确定所述第二控制器管理下的存储设备;扫描所确定的存储设备中的数据,得到所述存储设备的元数据;在第一控制器接收到数据读取指令、且判定所述数据读取指令指向的待读取数据存储于所确定的存储设备中的情况下,第一控制器利用得到的元数据,在所确定的存储设备中,读取所述数据读取指令指向的待读取数据。
为达到上述目的,本申请实施例还公开了一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述任一种数据处理方法。
为达到上述目的,本申请实施例还公开了一种可执行程序代码,所述可执行程序代码用于被运行以执行上述任一种数据处理方法。
应用本申请实施例提供的方案进行数据处理时,在双控存储服务器中,如果一个控制器出现异常,另一个控制器确定异常控制器管理下的存储设备,该另一个控制器扫描所确定的存储设备中的数据,得到存储设备的元数据,并利用该元数据读取所确定的存储设备中存储的数据;可见,本申请实施例提供的方案中,如果一个控制器出现异常,另一个控制器会接替异常控制器对外提供服务,提高了双控存储服务器存储数据的稳定性。
附图说明
为了更清楚地说明本申请实施例和现有技术的技术方案,下面对实施例和现有技术中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例提供的一种双控存储服务器应用场景示意图;
图2为本申请实施例提供的一种数据处理方法的流程示意图;
图3为本申请实施例提供的一种数据处理装置的结构示意图;
图4为本申请实施例提供的一种分布式存储系统的结构示意图。
具体实施方式
为使本申请的目的、技术方案、及优点更加清楚明白,以下参照附图并举实施例,对本申请进一步详细说明。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
为了解决上述技术问题,本申请实施例提供了一种数据处理方法、装置及分布式存储系统。该方法及装置可以应用于分布式存储系统中的双控存储服务器,双控存储服务器可以如图1中所示,包含两个控制器,每个控制器对多个存储设备进行管理。为了方便描述,将其中一个控制器称为第一控制器,将另一个控制器称为第二控制器。
下面首先对本申请实施例提供的一种数据处理方法进行详细说明。
图2为本申请实施例提供的一种数据处理方法的流程示意图,包括:
S201:第一控制器检测到第二控制器异常后,第一控制器确定第二控制器管理下的存储设备。
S202:第一控制器扫描所确定的存储设备中的数据,得到该存储设备的元数据。
S203:在第一控制器接收到数据读取指令、且判定该数据读取指令指向的待读取数据存储于所确定的存储设备中的情况下,第一控制器利用得到的元数据,在所确定的存储设备中,读取该数据读取指令指向的待读取数据。
应用本申请图2实施例提供的方案进行数据处理时,在双控存储服务器中,如果一个控制器出现异常,另一个控制器确定异常控制器管理下的存储设备,该另一个控制器扫描所确定的存储设备中的数据,得到存储设备的元数据,并利用该元数据读取所确定的存储设备中存储的数据;可见,本方案中,如果一个控制器出现异常,另一个控制器会接替异常控制器对外提供服务,提高了双控存储服务器存储数据的稳定性。
下面对图2所示实施例进行详细说明:
S201:第一控制器检测到第二控制器异常后,第一控制器确定第二控制 器管理下的存储设备。
作为一种实施方式,第一控制器可以定期向第二控制器发送探测信息,并判断是否在发送探测信息后的预设时间段内接收到所述第二控制器的反馈信息;如果未接收到,表示所述第二控制器异常。
举例来说,第一控制器与第二控制器可以建立心跳连接,两个控制器可以定期向对方发送探测信息,如果在预设时间段内接收到对方的反馈信息,表示对方心跳正常,如果在预设时间段内接收到对方的反馈信息,表示对方出现异常。
在本实施例中,存在两个控制器:第一控制器和第二控制器,这两个控制器可以分别管理不同的存储设备,而且这两个控制器检测对方是否出现异常,本实施例中仅以第二控制器出现异常为例进行解释说明,可以理解,如果第一控制器出现异常,处理方式类似,不再赘述。
本实施例中的存储设备可以为磁盘、SSD(Solid State Drives,固态硬盘)、NAS(Network Attached Storage,网络附属存储)设备、iSCSI(Internet Small Computer System Interface,小型计算机系统接口)设备、FC SAN(FC:Fibre-Channel,光纤通道;SAN:Storage Area Network,存储区域网络)设备、等各种用于存储数据的设备,具体不做限定。
本领域技术人员可以理解,存储服务器可以对存储设备进行管理,这里的“管理”可以包括:存储服务器在存储设备中写入数据,并在存储服务器中存储所写入数据的元数据;存储服务器根据存储的元数据,读取存储设备中的数据;或者,还可以包括存储服务器定期对存储设备中的数据进行清理等等,具体不做限定。
作为一种实施方式,第一控制器可以管理奇数槽位的存储设备,第二控制器可以管理偶数槽位的存储设备。这种情况下,如果第一控制器检测到第二控制器异常,则第一控制器可以将偶数槽位的存储设备确定为第二控制器管理下的存储设备。或者,第一控制器与第二控制器也可以根据其他方式划分自身管理的存储设备,当第二控制器异常后,第一控制器可以根据该划分方式,确定第二控制器管理下的存储设备。
S202:第一控制器扫描所确定的存储设备中的数据,得到该存储设备的 元数据。
元数据,即为描述数据的数据(data about data),主要是描述数据属性的相关信息,用来支持如指示存储位置、历史数据、资源查找、文件记录等功能。对于利用纠删码策略存储的数据来说,通常需要记录该数据的条带信息,该条带信息即为该数据的元数据。
纠删码(erasure coding,EC)是一种数据保护方法,纠删码策略可以用n=k+m来表示,其中,k表示原始数据块份数,m表示冗余数据块份数,n表示总的数据块份数。具体的,可以将待存储数据分割成k个原始数据块,基于这k个原始数据块进行扩展、编码,得到m个冗余数据块;将这k个原始数据块和m个冗余数据块分别进行存储;这样,如果某个数据块丢失,则可以根据未丢失的数据块对丢失的数据块进行恢复。
举例来说,假设利用纠删码策略4+1对数据A进行存储,先分配条带:
{<OSD_1,wwn_1>,<OSD_2,wwn_2>,<OSD_3,wwn_3>,<OSD_4,wwn_4>,<OSD_5,wwn_5>},其中,OSD为存储服务器,OSD_1、OSD_2等为存储服务器标识,wwn为存储设备,wwn_1、wwn_2等可以为存储设备标识。
根据该纠删码策略4+1,对数据A进行切片及冗余处理,得到原始数据块及冗余数据块。条带中的每个数据块对应一个四元组<OSD,wwn,key,value>,其中,key表示数据块的键,value表示数据块的值或内容。
记录数据A对应的条带信息为:
{<OSD_1,wwn_1,key_1,value_1>,<OSD_2,wwn_2,key_2,value_2>,<OSD_3,wwn_3,key_3,value_3>,<OSD_4,wwn_4,key_4,value_4>,<OSD_5,wwn_5,key_5,value_5>}。
在一些实施方式中,记录的条带信息中可以不包括存储服务器标识,这种情况下,记录的条带信息也可以为:
{<wwn_1,key_1,value_1>,<wwn_2,key_2,value_2>,<wwn_3,key_3,value_3>,<wwn_4,key_4,value_4>,<wwn_5,key_5,value_5>}。
或者,元数据中除包含条带信息外,还可以包含完整数据信息,完整数据信息表示一份完整的数据对应了哪几份条带信息。比如,一份较大的数据B,将数据B分成了三份数据B1、B2和B3,B1、B2和B3分别对应一份条带信 息;这种情况下,可以针对数据B保存一份完整数据信息,该完整数据信息表示数据B对应了三份条带信息。
可以通过扫描存储设备中存储的数据,得到数据的元数据。可以理解,扫描存储设备中的数据后,可以获取存储设备标识、存储服务器标识、数据块的key、value,这样,便可以组合得到数据的条带信息,条带信息即为元数据。
或者,上述例子中,将一份数据B分成了三份数据B1、B2和B3,B1、B2和B3分别对应一份条带信息,存储这三份数据时,B1、B2和B3中均可以携带一数据标识,表示这三份数据属于同一份数据,这样,便可以组合得到该完整数据信息,完整数据信息也为元数据。
第一控制器确定出第二控制器管理下的存储设备后,可以通过扫描存储设备中的数据,得到存储设备中数据的元数据,或者简称为存储设备的元数据。
作为一种实施方式,第一控制器可以在执行S202之前,先判断是否从第二控制器中获取到所述第二控制器中的元数据;如果未获取到,第一控制器再执行S202。
第二控制器出现异常有多种情况,有的异常情况下,第一控制器并不能直接得到第二控制器中的元数据,有的异常情况下,第一控制器可以直接得到第二控制器中的元数据。因此,第一控制器可以先判断是否能够从第二控制器中得到元数据,如果能,则直接复制第二控制器中的元数据,如果不能,再扫描所确定的存储设备中的数据,得到元数据。
S203:在第一控制器接收到数据读取指令、且判定该数据读取指令指向的待读取数据存储于所确定的存储设备中的情况下,第一控制器利用得到的元数据,在所确定的存储设备中,读取该数据读取指令指向的待读取数据。
延续上述例子,将一份数据B分成了三份数据B1、B2和B3,B1、B2和B3分别存储在第一控制器确定出的存储设备中,第一控制器得到数据B的元数据包括:B1、B2和B3对应的三份条带信息,以及数据B的完整数据信息。
第一控制器接收到用户发送的读取数据B的指令,第一控制器确定数据 B所在的存储设备,利用上述数据B的元数据,分别读取得到B1、B2、B3,将读取到的B1、B2、B3组合成数据B反馈给用户。
在本实施例中,第一控制器确定第二控制器管理下的存储设备后,第一控制器可以接替第二控制器对所确定的存储设备进行管理。作为一种实施方式,这里的“管理”除S303中的读取数据外,还可以包括:
在第一控制器接收到数据存储指令、且判定所述数据存储指令对应的存储设备为所确定的存储设备的情况下,第一控制器在所确定的存储设备中,存储所述数据存储指令对应的待存储数据。
在本实施方式中,第一控制器在这些存储设备中写入数据后,可以在第一控制器中存储所写入数据的元数据;根据扫描得到的元数据或者新存储的元数据,读取这些存储设备中的数据。
另外,这里的“管理”还可以包括定期对存储设备中的数据进行清理等等,具体不做限定。
作为一种实施方式,每当控制器扫描一个存储设备中的数据得到该存储设备的元数据后,控制器可以针对该存储设备生成一份校验信息,控制器将该校验信息存储至该存储设备,并在自身控制器中存储该存储设备对应的校验信息;这样,每个控制器中存储有自身管理下的每个存储设备对应的校验信息。
举例来说,该校验信息可以为一个伪随机数,该伪随机数与该存储设备中存在的其他数值均不相同,控制器中可以对应存储该伪随机数及存储设备标识。
这种实施方式中,在S202之后,还可以包括:第一控制器针对所确定的每个存储设备,生成一份该存储设备对应的校验信息,将该存储设备对应的校验信息存储至该存储设备,并在所述第一控制器中存储该存储设备对应的校验信息。
这种实施方式中,如果第二控制器恢复正常,第二控制器可以针对自身管理下的每个存储设备,读取该存储设备中的校验信息;判断该存储设备中的校验信息与第二控制器中存储的该存储设备信息对应的校验信息是否相同;如果不同,从第一控制器中获取该存储设备的元数据。
可以理解,第二控制器出现异常后,第一控制器扫描第二控制器管理下的每个存储设备,生成每个存储设备的元数据,如果在扫描过程中,第二控制器恢复正常,则第一控制器只扫描了部分存储设备,只得到了部分存储设备的元数据,只生成了部分存储设备的校验信息,只有部分存储设备中的校验信息发生了变化。
这种情况下,第二控制器恢复正常后,第二控制器针对自身管理下的每个存储设备,读取该存储设备中的校验信息,判断该存储设备中的校验信息与第二控制器中存储的校验信息是否相同:如果相同,表示第一控制器并未得到该存储设备的元数据,或者说,并未得到该存储设备的完整元数据,并未生成该存储设备的校验信息;如果不同,表示第一控制器已经得到该存储设备的元数据,已经生成了该存储设备的校验信息。
在上述判断结果为相同的情况下,第二控制器可以直接接替第一控制器对该存储设备进行管理;在上述判断结果为不同的情况下,第二控制器可以从第一控制器中获取该存储设备的元数据,然后接替第一控制器对该存储设备进行管理。这样,第二控制器不需要扫描存储设备中的数据,不需要重新生成元数据,减少了恢复耗时,提高了恢复效率。
或者,作为另一种实施方式,第一控制器检测到第二控制器恢复后,可以将得到的第二控制器管理下的存储设备的元数据发送至第二控制器。
如上所述,两个控制器之间可以定期发送探测信息,第一控制器在检测到第二控制器异常后,仍可以定期向第二控制器发送探测信息,并判断是否在发送探测信息后的预设时间段内接收到第二控制器的反馈信息;如果接收到,表示第二控制器恢复。这种情况下,第一控制器将得到的第二控制器管理下的存储设备的元数据发送至第二控制器。
第二控制器接收到该元数据后,利用所接收到的元数据,对第二控制器中存储的元数据进行更新。具体的,该元数据中可以携带存储设备标识,第二控制器根据该存储设备标识,将接收到的元数据替换第二控制器中存储的元数据。
举例来说,假设第二控制器对wwn_1—wwn_10这10个存储设备进行管理,第二控制器异常后,第一控制器按照wwn_1—wwn_10的顺序依次对这些 存储设备进行扫描,当对第5个存储设备wwn_5扫描完成得到wwn_5的元数据后,检测到第二控制器恢复。第一控制器将扫描得到的5个存储设备的元数据发送至第二控制器。
第二控制器接收到的元数据携带的存储设备标识包括:wwn_1、wwn_2、wwn_3、wwn_4、wwn_5,表示该元数据为这5个存储设备的元数据。而第二控制器中存储有wwn_1—wwn_10这10个存储设备的元数据,这种情况下,第二控制器将接收到的5个存储设备的元数据替换自身存储的wwn_1—wwn_5这5个存储设备的元数据。
这样,第二控制器不需要扫描存储设备中的数据,不需要重新生成元数据,减少了恢复耗时,提高了恢复效率。
与上述方法实施例相对应,本申请实施例还提供了一种数据处理装置,如图3所示,应用于分布式存储系统中的双控存储服务器,所述双控存储服务器包含两个控制器:第一控制器100和第二控制器200,所述装置包括应用于第一控制器100的检测模块110、确定模块120、扫描模块130和读取模块140,其中,
检测模块110,用于检测所述第二控制器是否异常,如果异常,触发确定模块120;
确定模块120,用于确定所述第二控制器管理下的存储设备;
扫描模块130,用于扫描确定模块120确定的存储设备中的数据,得到所述存储设备的元数据;
读取模块140,用于在接收到数据读取指令、且判定所述数据读取指令指向的待读取数据存储于确定模块120确定的存储设备中的情况下,利用扫描模块130得到的元数据,在所确定的存储设备中,读取所述数据读取指令指向的待读取数据。
作为一种实施方式,所述装置还包括应用于所述第一控制器的存储模块(图中未示出),
所述存储模块,用于在接收到数据存储指令、且判定所述数据存储指令对应的存储设备为所述确定模块确定的存储设备的情况下,在所确定的存储设备中,存储所述数据存储指令对应的待存储数据。
作为一种实施方式,检测模块110,具体可以用于:
定期向所述第二控制器发送探测信息,并判断是否在发送所述探测信息后的预设时间段内接收到所述第二控制器的反馈信息;如果未接收到,表示所述第二控制器异常。
作为一种实施方式,所述装置还包括应用于所述第一控制器的判断模块(图中未示出),
所述判断模块,用于判断所述第一控制器是否从所述第二控制器中获取到所述第二控制器中的元数据;如果未获取到,触发扫描模块130。
作为一种实施方式,所述第二控制器中存储有自身管理下的每个存储设备对应的校验信息;
所述装置还包括应用于所述第一控制器的生成模块和存储模块(图中未示出),其中,
所述生成模块,用于针对所述确定模块确定的每个存储设备,生成一份该存储设备对应的校验信息;
所述存储模块,用于将所述生成模块生成的该存储设备对应的校验信息存储至该存储设备,并在所述第一控制器中存储该存储设备对应的校验信息;
所述装置还包括应用于所述第二控制器的读取模块、判断模块和获取模块(图中未示出),其中,
所述读取模块,用于在所述第二控制器恢复后,针对所述第二控制器管理下的每个存储设备,读取该存储设备中的校验信息;
所述判断模块,用于判断该存储设备中的校验信息与所述第二控制器中存储的该存储设备信息对应的校验信息是否相同;如果不同,触发所述获取模块;
所述获取模块,用于从所述第一控制器中获取该存储设备的元数据。
作为一种实施方式,所述装置还可以包括应用于所述第一控制器的发送模块(图中未示出);
检测模块110,还可以用于检测所述第二控制器是否恢复,如果恢复,触发所述发送模块;
所述发送模块,用于将所述扫描模块得到的所述第二控制器管理下的存 储设备的元数据发送至所述第二控制器;
所述装置还包括应用于所述第二控制器的接收模块和更新模块(图中未示出),其中,
所述接收模块,用于接收所述发送模块发送的元数据;
所述更新模块,用于利用所述接收模块接收到的元数据,对所述第二控制器中存储的元数据进行更新。
作为一种实施方式,检测模块110,还可以用于:
定期向所述第二控制器发送探测信息,并判断是否在发送所述探测信息后的预设时间段内接收到所述第二控制器的反馈信息;如果接收到,表示所述第二控制器恢复。
在本申请实施例提供的数据处理装置中,第一控制器100与第二控制器200中包含的模块可以是相同的,上述实施例中,仅以第二控制器出现异常为例进行说明,如果第一控制器出现异常,各模块执行的步骤类似,不再赘述。
本申请实施例还提供了一种分布式存储系统,包括:至少一台双控存储服务器,所述双控存储服务器包含两个控制器:第一控制器和第二控制器;其中,
所述第一控制器,用于检测到所述第二控制器异常后,确定所述第二控制器管理下的存储设备;扫描所确定的存储设备中的数据,得到所述存储设备的元数据,并对所述存储设备进行管理。
本实施例所示系统中的双控存储服务器可以执行上述任一种数据处理方法。
作为一种实施方式,分布式存储系统可以如图4所示,包括:管理服务器和多台存储服务器,所述多台存储服务器中包含至少一台双控存储服务器;其中,
所述管理服务器,用于接收待存储数据;将所述待存储数据进行切分,得到多个数据块;判断所述系统中的存储服务器的数量是否小于所述数据块的数量;如果小于,在双控存储服务器中选择目标双控存储服务器,将每台目标双控存储服务器确定为两台存储服务器,将所述多个数据块分别存储至 每台存储服务器中。
举例来说,如果利用纠删码策略存储数据,管理服务器对待存储数据进行切分及冗余处理。假设利用纠删码策略4+1对数据A进行存储,管理服务器将数据A进行切分及冗余处理,得到5个数据块。
假设分布式存储系统中包含8台存储服务器,存储服务器的数量不小于数据块的数量,这种情况下,管理服务器从这8台存储服务器中选择5台存储服务器,将这5个数据块发送至这5台存储服务器进行存储,每台存储服务器存储一个数据块。
假设分布式存储系统中包含4台存储服务器,存储服务器的数量小于数据块的数量,假设这4台存储服务器中包含一台双控存储服务器,这种情况下,管理服务器将这一台双控存储服务器确定为两台存储服务器,这样系统中存储服务器的数量变为5,管理服务器将这5个数据块发送至这5台存储服务器进行存储,每台存储服务器存储一个数据块。
作为一种实施方式,管理服务器在判定所述系统中的存储服务器的数量小于所述数据块的数量的情况下,计算所述存储服务器的数量与所述数据块的数量的差值;在双控存储服务器中选择与所述差值数量相等的目标双控存储服务器。
再举一例,假设分布式存储系统中包含4台存储服务器,存储服务器的数量小于数据块的数量,并且差值为1,假设这4台存储服务器中包含三台双控存储服务器,这种情况下,管理服务器在这三台双控存储服务器中选择一台目标双控存储服务器,将这一台目标双控存储服务器确定为两台存储服务器,这样系统中存储服务器的数量变为5,管理服务器将这5个数据块发送至这5台存储服务器进行存储,每台存储服务器存储一个数据块。
也就是说,如果系统中的存储服务器的数量大于等于数据块的数量,管理服务器将双控存储服务器作为一台存储服务器;如果系统中的存储服务器的数量小于数据块的数量,管理服务器将双控存储服务器作为两台存储服务器。另外,管理服务器可以根据系统中存储服务器的数量与数据块数量的差值,将部分双控存储服务器作为两台存储服务器。这样,可以均衡利用存储资源。
作为一种实施方式,所述双控存储服务器,还可以用于将所述两个控制器与存储设备的对应关系进行展示,所述对应关系包含所述第一控制器与其管理下的存储设备的对应关系、及所述第二控制器与其管理下的存储设备的对应关系;
所述管理服务器,还可以用于:
接收用户设备发送的数据存储指令,所述数据存储指令中携带有存储数据的目标存储设备信息,所述目标存储设备信息为所述用户设备根据所述双控存储服务器所展示的所述两个控制器与存储设备的对应关系确定的;
根据所述目标存储设备信息,为所述数据存储指令对应的待存储数据分配条带,并将所述条带发送给所述双控存储服务器;
所述双控存储服务器,还用于根据所述条带,对所述数据存储指令对应的待存储数据进行存储。
在本实施方式中,双控存储服务器将两个控制器与其管理下的存储设备对用户进行透明展示,用户可以根据展示的内容,选择存储数据的存储设备。可见,这种实施方式实现了信息的透明化,可以使用户根据自身需要,选择控制器管理下的存储设备。
本申请实施例还提供一种双控存储服务器,如图1中所示,包括两个控制器:第一控制器和第二控制器;
所述第一控制器,用于检测到第二控制器异常后确定所述第二控制器管理下的存储设备;扫描所确定的存储设备中的数据,得到所述存储设备的元数据;在第一控制器接收到数据读取指令、且判定所述数据读取指令指向的待读取数据存储于所确定的存储设备中的情况下,第一控制器利用得到的元数据,在所确定的存储设备中,读取所述数据读取指令指向的待读取数据。
本实施例中的双控存储服务器可以执行上述任一种数据处理方法。
应用本申请实施例提供的方案进行数据处理时,在双控存储服务器中,如果一个控制器出现异常,另一个控制器确定异常控制器管理下的存储设备,该另一个控制器扫描所确定的存储设备中的数据,得到存储设备的元数据,并利用该元数据读取所确定的存储设备中存储的数据;可见,本方案中,如 果一个控制器出现异常,另一个控制器会接替异常控制器对外提供服务,提高了双控存储服务器存储数据的稳定性。
本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述任一种数据处理方法。
本申请实施例还提供一种可执行程序代码,所述可执行程序代码用于被运行以执行上述任一种数据处理方法。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于数据处理装置实施例、分布式存储系统实施例、双控存储服务器实施例、上述计算机可读存储介质实施例、以及上述可执行程序代码实施例而言,由于其基本相似于数据处理方法实施例,所以描述的比较简单,相关之处参见数据处理方法实施例的部分说明即可。
以上所述仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。

Claims (21)

  1. 一种数据处理方法,其特征在于,应用于分布式存储系统中的双控存储服务器,所述双控存储服务器包含两个控制器:第一控制器和第二控制器,所述方法包括:
    第一控制器检测到第二控制器异常后,第一控制器确定所述第二控制器管理下的存储设备;
    第一控制器扫描所确定的存储设备中的数据,得到所述存储设备的元数据;
    在第一控制器接收到数据读取指令、且判定所述数据读取指令指向的待读取数据存储于所确定的存储设备中的情况下,第一控制器利用得到的元数据,在所确定的存储设备中,读取所述数据读取指令指向的待读取数据。
  2. 根据权利要求1所述的方法,其特征在于,在所述第一控制器确定所述第二控制器管理下的存储设备之后,所述方法还包括:
    在第一控制器接收到数据存储指令、且判定所述数据存储指令对应的存储设备为所确定的存储设备的情况下,第一控制器在所确定的存储设备中,存储所述数据存储指令对应的待存储数据。
  3. 根据权利要求1所述的方法,其特征在于,所述第一控制器检测到第二控制器异常,包括:
    所述第一控制器定期向所述第二控制器发送探测信息,并判断是否在发送所述探测信息后的预设时间段内接收到所述第二控制器的反馈信息;如果未接收到,表示所述第二控制器异常。
  4. 根据权利要求1所述的方法,其特征在于,在所述第一控制器扫描所确定的存储设备中的数据,得到所述存储设备的元数据之前,还包括:
    所述第一控制器判断是否从所述第二控制器中获取到所述第二控制器中的元数据;如果未获取到,所述第一控制器执行所述扫描所确定的存储设备中的数据,得到所述存储设备的元数据的步骤。
  5. 根据权利要求1所述的方法,其特征在于,所述第二控制器中存储有自身管理下的每个存储设备对应的校验信息;
    在所述第一控制器扫描所确定的存储设备中的数据,得到所述存储设备 的元数据之后,还包括:
    所述第一控制器针对所确定的每个存储设备,生成一份该存储设备对应的校验信息,将该存储设备对应的校验信息存储至该存储设备,并在所述第一控制器中存储该存储设备对应的校验信息;
    在所述第二控制器恢复后,所述方法还包括:
    所述第二控制器针对所述第二控制器管理下的每个存储设备,读取该存储设备中的校验信息;判断该存储设备中的校验信息与所述第二控制器中存储的该存储设备信息对应的校验信息是否相同;如果不同,从所述第一控制器中获取该存储设备的元数据。
  6. 根据权利要求1所述的方法,其特征在于,在所述第一控制器扫描所确定的存储设备中的数据,得到所述存储设备的元数据之后,还包括:
    所述第一控制器检测到所述第二控制器恢复后,将得到的所述第二控制器管理下的存储设备的元数据发送至所述第二控制器;
    所述第二控制器接收所述第一控制器发送的元数据;利用所接收到的元数据,对所述第二控制器中存储的元数据进行更新。
  7. 根据权利要求6所述的方法,其特征在于,所述第一控制器检测到所述第二控制器恢复,包括:
    所述第一控制器定期向所述第二控制器发送探测信息,并判断是否在发送所述探测信息后的预设时间段内接收到所述第二控制器的反馈信息;如果接收到,表示所述第二控制器恢复。
  8. 一种数据处理装置,其特征在于,应用于分布式存储系统中的双控存储服务器,所述双控存储服务器包含两个控制器:第一控制器和第二控制器,所述装置包括应用于所述第一控制器的检测模块、确定模块、扫描模块和读取模块,其中,
    所述检测模块,用于检测所述第二控制器是否异常,如果异常,触发所述确定模块;
    所述确定模块,用于确定所述第二控制器管理下的存储设备;
    所述扫描模块,用于扫描所述确定模块确定的存储设备中的数据,得到所述存储设备的元数据;
    所述读取模块,用于在接收到数据读取指令、且判定所述数据读取指令指向的待读取数据存储于所述确定模块确定的存储设备中的情况下,利用所述扫描模块得到的元数据,在所确定的存储设备中,读取所述数据读取指令指向的待读取数据。
  9. 根据权利要求8所述的装置,其特征在于,所述装置还包括应用于所述第一控制器的存储模块,
    所述存储模块,用于在接收到数据存储指令、且判定所述数据存储指令对应的存储设备为所述确定模块确定的存储设备的情况下,在所确定的存储设备中,存储所述数据存储指令对应的待存储数据。
  10. 根据权利要求8所述的装置,其特征在于,所述检测模块,具体用于:
    定期向所述第二控制器发送探测信息,并判断是否在发送所述探测信息后的预设时间段内接收到所述第二控制器的反馈信息;如果未接收到,表示所述第二控制器异常。
  11. 根据权利要求8所述的装置,其特征在于,所述装置还包括应用于所述第一控制器的判断模块,
    所述判断模块,用于判断所述第一控制器是否从所述第二控制器中获取到所述第二控制器中的元数据;如果未获取到,触发所述扫描模块。
  12. 根据权利要求8所述的装置,其特征在于,所述第二控制器中存储有自身管理下的每个存储设备对应的校验信息;
    所述装置还包括应用于所述第一控制器的生成模块和存储模块,其中,
    所述生成模块,用于针对所述确定模块确定的每个存储设备,生成一份该存储设备对应的校验信息;
    所述存储模块,用于将所述生成模块生成的该存储设备对应的校验信息存储至该存储设备,并在所述第一控制器中存储该存储设备对应的校验信息;
    所述装置还包括应用于所述第二控制器的读取模块、判断模块和获取模块,其中,
    所述读取模块,用于在所述第二控制器恢复后,针对所述第二控制器管理下的每个存储设备,读取该存储设备中的校验信息;
    所述判断模块,用于判断该存储设备中的校验信息与所述第二控制器中存储的该存储设备信息对应的校验信息是否相同;如果不同,触发所述获取模块;
    所述获取模块,用于从所述第一控制器中获取该存储设备的元数据。
  13. 根据权利要求8所述的装置,其特征在于,所述装置还包括应用于所述第一控制器的发送模块;
    所述检测模块,还用于检测所述第二控制器是否恢复,如果恢复,触发所述发送模块;
    所述发送模块,用于将所述扫描模块得到的所述第二控制器管理下的存储设备的元数据发送至所述第二控制器;
    所述装置还包括应用于所述第二控制器的接收模块和更新模块,其中,
    所述接收模块,用于接收所述发送模块发送的元数据;
    所述更新模块,用于利用所述接收模块接收到的元数据,对所述第二控制器中存储的元数据进行更新。
  14. 根据权利要求13所述的装置,其特征在于,所述检测模块,还用于:
    定期向所述第二控制器发送探测信息,并判断是否在发送所述探测信息后的预设时间段内接收到所述第二控制器的反馈信息;如果接收到,表示所述第二控制器恢复。
  15. 一种分布式存储系统,其特征在于,包括:至少一台双控存储服务器,所述双控存储服务器包含两个控制器:第一控制器和第二控制器;其中,
    所述第一控制器,用于检测到所述第二控制器异常后,确定所述第二控制器管理下的存储设备;扫描所确定的存储设备中的数据,得到所述存储设备的元数据,并对所述存储设备进行管理。
  16. 根据权利要求15所述的系统,其特征在于,所述系统中包括:管理服务器和多台存储服务器,所述多台存储服务器中包含至少一台双控存储服务器;其中,
    所述管理服务器,用于接收待存储数据;将所述待存储数据进行切分,得到多个数据块;判断所述系统中的存储服务器的数量是否小于所述数据块的数量;如果小于,在双控存储服务器中选择目标双控存储服务器,将每台 目标双控存储服务器确定为两台存储服务器,将所述多个数据块分别存储至每台存储服务器中。
  17. 根据权利要求16所述的系统,其特征在于,所述管理服务器,还用于:
    在判定所述系统中的存储服务器的数量小于所述数据块的数量的情况下,计算所述存储服务器的数量与所述数据块的数量的差值;
    在双控存储服务器中选择与所述差值数量相等的目标双控存储服务器。
  18. 根据权利要求16所述的系统,其特征在于,
    所述双控存储服务器,还用于将所述两个控制器与存储设备的对应关系进行展示,所述对应关系包含所述第一控制器与其管理下的存储设备的对应关系、及所述第二控制器与其管理下的存储设备的对应关系;
    所述管理服务器,还用于:
    接收用户设备发送的数据存储指令,所述数据存储指令中携带有存储数据的目标存储设备信息,所述目标存储设备信息为所述用户设备根据所述双控存储服务器所展示的所述两个控制器与存储设备的对应关系确定的;
    根据所述目标存储设备信息,为所述数据存储指令对应的待存储数据分配条带,并将所述条带发送给所述双控存储服务器;
    所述双控存储服务器,还用于根据所述条带,对所述数据存储指令对应的待存储数据进行存储。
  19. 一种双控存储服务器,其特征在于,包括两个控制器:第一控制器和第二控制器;
    所述第一控制器,用于检测到第二控制器异常后确定所述第二控制器管理下的存储设备;扫描所确定的存储设备中的数据,得到所述存储设备的元数据;在第一控制器接收到数据读取指令、且判定所述数据读取指令指向的待读取数据存储于所确定的存储设备中的情况下,第一控制器利用得到的元数据,在所确定的存储设备中,读取所述数据读取指令指向的待读取数据。
  20. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1-7任一所述的方法步骤。
  21. 一种可执行程序代码,其特征在于,所述可执行程序代码用于被运行以执行权利要求1-7任一所述的方法步骤。
PCT/CN2018/098655 2017-10-13 2018-08-03 一种数据处理方法、装置及分布式存储系统 WO2019072004A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP18866806.5A EP3697024B1 (en) 2017-10-13 2018-08-03 Data processing method, device and distributed storage system
US16/755,700 US11429313B2 (en) 2017-10-13 2018-08-03 Data processing method, device and distributed storage system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710950977.3 2017-10-13
CN201710950977.3A CN109672544B (zh) 2017-10-13 2017-10-13 一种数据处理方法、装置及分布式存储系统

Publications (1)

Publication Number Publication Date
WO2019072004A1 true WO2019072004A1 (zh) 2019-04-18

Family

ID=66101289

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/098655 WO2019072004A1 (zh) 2017-10-13 2018-08-03 一种数据处理方法、装置及分布式存储系统

Country Status (4)

Country Link
US (1) US11429313B2 (zh)
EP (1) EP3697024B1 (zh)
CN (1) CN109672544B (zh)
WO (1) WO2019072004A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112751693B (zh) * 2019-10-31 2022-09-06 北京金山云网络技术有限公司 分布式存储系统的数据处理方法、装置及电子设备
CN112181705B (zh) * 2020-10-12 2023-02-03 上海前瞻创新研究院有限公司 基于多控制器的管理存储控制方法及存储设备
JP7266067B2 (ja) * 2021-06-25 2023-04-27 株式会社日立製作所 ストレージシステム

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5774643A (en) * 1995-10-13 1998-06-30 Digital Equipment Corporation Enhanced raid write hole protection and recovery
CN104021009A (zh) * 2012-02-28 2014-09-03 托尼安软件开发系统公司 用于存储控制器的高效生命周期管理的方法和系统
US20140258608A1 (en) * 2013-03-05 2014-09-11 Dot Hill Systems Corporation Storage Controller Cache Synchronization Method and Apparatus
US20150052385A1 (en) * 2013-08-15 2015-02-19 International Business Machines Corporation Implementing enhanced data caching and takeover of non-owned storage devices in dual storage device controller configuration with data in write cache

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6510500B2 (en) * 2001-03-09 2003-01-21 International Business Machines Corporation System and method for minimizing message transactions for fault-tolerant snapshots in a dual-controller environment
CN101594383B (zh) * 2009-07-09 2012-05-23 浪潮电子信息产业股份有限公司 一种双控制器存储系统的服务和控制器状态监控方法
CN102081584A (zh) 2009-11-30 2011-06-01 英业达股份有限公司 双控制器存储系统的缓存镜像系统及方法
WO2013062522A1 (en) * 2011-10-25 2013-05-02 Hewlett-Packard Development Company, L.P. Device authentication
US8832372B2 (en) 2012-05-24 2014-09-09 Netapp, Inc. Network storage systems having clustered raids for improved redundancy and load balancing
WO2015100627A1 (zh) * 2013-12-31 2015-07-09 华为技术有限公司 一种分布式文件存储系统中的数据处理方法及设备
US9830757B2 (en) * 2015-09-30 2017-11-28 Faraday & Future Inc. System and method for operating vehicle using mobile device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5774643A (en) * 1995-10-13 1998-06-30 Digital Equipment Corporation Enhanced raid write hole protection and recovery
CN104021009A (zh) * 2012-02-28 2014-09-03 托尼安软件开发系统公司 用于存储控制器的高效生命周期管理的方法和系统
US20140258608A1 (en) * 2013-03-05 2014-09-11 Dot Hill Systems Corporation Storage Controller Cache Synchronization Method and Apparatus
US20150052385A1 (en) * 2013-08-15 2015-02-19 International Business Machines Corporation Implementing enhanced data caching and takeover of non-owned storage devices in dual storage device controller configuration with data in write cache

Non-Patent Citations (1)

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

Also Published As

Publication number Publication date
EP3697024A1 (en) 2020-08-19
EP3697024B1 (en) 2023-06-07
US11429313B2 (en) 2022-08-30
EP3697024A4 (en) 2020-12-16
US20200293229A1 (en) 2020-09-17
CN109672544B (zh) 2020-12-11
CN109672544A (zh) 2019-04-23

Similar Documents

Publication Publication Date Title
EP3109757B1 (en) Data storage method, data recovery method, related apparatus, and system
US9990256B1 (en) Storage management system and method
DK3179359T3 (en) PROCEDURE FOR SENDING DATA, PROCEDURE FOR RECEIVING DATA AND STORAGE UNIT
US10169167B2 (en) Reduced recovery time in disaster recovery/replication setup with multitier backend storage
US8738883B2 (en) Snapshot creation from block lists
US9535800B1 (en) Concurrent data recovery and input/output processing
US10002048B2 (en) Point-in-time snap copy management in a deduplication environment
US11099953B2 (en) Automatic data healing using a storage controller
CN110720088A (zh) 集成到大容量存储设备的可访问快速耐久存储
US20160026540A1 (en) Merging an out of synchronization indicator and a change recording indicator in response to a failure in consistency group formation
US11907410B2 (en) Method and device for managing storage system
KR20230097184A (ko) 비동기적 교차-영역 블록 볼륨 복제
US10255140B2 (en) Fully distributed intelligent rebuild
US9792181B2 (en) Pool of devices providing operating system redundancy
US20100070724A1 (en) Storage system and method for operating storage system
US20190317872A1 (en) Database cluster architecture based on dual port solid state disk
US10452502B2 (en) Handling node failure in multi-node data storage systems
WO2019072004A1 (zh) 一种数据处理方法、装置及分布式存储系统
BR112017001171B1 (pt) Método executado em um dispositivo de computação, dispositivo de computação e dispositivo de memória legível por computador para recuperar a operacionalidade de um serviço baseado em nuvem
US10778769B2 (en) Elastic cloud storage on multiple locations
US10503426B2 (en) Efficient space allocation in gathered-write backend change volumes
CN112748856A (zh) 管理盘的方法、电子设备和计算机程序产品
US20110197088A1 (en) Method and system to provide a compliance clock service suitable for cloud deployment
US9645897B2 (en) Using duplicated data to enhance data security in RAID environments
JP2017531892A (ja) ブロックレベル記憶デバイスのスナップショットを実行するための改善された装置および方法

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2018866806

Country of ref document: EP

Effective date: 20200513