[go: up one dir, main page]

WO2017143804A1 - Method and apparatus for dynamic access of storage device in cloud storage system - Google Patents

Method and apparatus for dynamic access of storage device in cloud storage system Download PDF

Info

Publication number
WO2017143804A1
WO2017143804A1 PCT/CN2016/105089 CN2016105089W WO2017143804A1 WO 2017143804 A1 WO2017143804 A1 WO 2017143804A1 CN 2016105089 W CN2016105089 W CN 2016105089W WO 2017143804 A1 WO2017143804 A1 WO 2017143804A1
Authority
WO
WIPO (PCT)
Prior art keywords
storage device
storage
type
cloud
standard interface
Prior art date
Legal status (The legal status 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 status listed.)
Ceased
Application number
PCT/CN2016/105089
Other languages
French (fr)
Chinese (zh)
Inventor
林鹏
叶敏
曾凡丽
林起芊
汪渭春
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology Co Ltd
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 Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Publication of WO2017143804A1 publication Critical patent/WO2017143804A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • 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 cloud storage technologies, and in particular, to a method and an apparatus for dynamically accessing a storage device in a cloud storage system.
  • Cloud storage is a new concept extended and developed in the concept of cloud computing. It is an emerging network storage technology that refers to functions such as cluster applications, network technologies or distributed file systems. A system in which a plurality of different types of storage devices work together through application software to jointly provide data storage and service access functions.
  • a storage server in a cloud storage system may be referred to as a storage node, and a storage device used to store data in each storage node is referred to as a storage device, such as a disk, a Raid, an iScsi device, an FC (Fibre Channel, Fibre Channel) device, or the like.
  • a storage device such as a disk, a Raid, an iScsi device, an FC (Fibre Channel, Fibre Channel) device, or the like.
  • the existing cloud storage expansion method is mainly implemented by adding a new storage node, but this method has high cost and poor applicability.
  • An embodiment of the present invention provides a method and an apparatus for dynamically accessing a storage device in a cloud storage system to implement dynamic access of a storage device in a storage node.
  • the specific technical solutions are as follows:
  • the embodiment of the present application provides a method for dynamically accessing a storage device in a cloud storage system, which is applied to a storage node in a cloud storage system, where the method includes:
  • the first storage device is connected to the cloud storage system according to the read online standard interface and the online operation mode.
  • the method further includes:
  • the method further includes:
  • the first storage device is formatted according to the formatted standard interface read and the formatted operation mode.
  • the method further includes:
  • the method further includes:
  • Determining whether the second storage device is formatted in the cloud storage system if yes, stopping all operations currently performed on the second storage device, deleting the second storage device saved in the storage node Indexing information and performing the step of removing the second storage device from the cloud storage system.
  • the method further includes:
  • the third storage device When it is determined that the third storage device has a data processing request to be processed, identifying a type of the third storage device, and searching for a third corresponding to the type of the third storage device according to the type of the third storage device Target storage device library;
  • the data processing request is processed according to the read data processing standard interface and the data processing operation mode.
  • the embodiment of the present application provides a device for dynamically accessing a storage device in a cloud storage system, which is applied to a storage node in a cloud storage system, where the device includes:
  • a first identifying module configured to identify a type of the first storage device when detecting that a new first storage device is connected
  • a first searching module configured to search, according to the type of the first storage device, a first target storage device library corresponding to the type of the first storage device;
  • a first reading module configured to read the saved online standard interface according to the first target storage device library, and an online operation mode corresponding to the type of the first storage device, where the first target storage
  • the device library stores an online standard interface, and an online operation mode corresponding to the type of each storage device
  • An access module configured to be used according to the online standard interface read by the first reading module In the online operation mode, the first storage device is connected to the cloud storage system.
  • the device further includes:
  • a first determining module configured to determine, according to the formatted identification information saved in the first storage device, the first storage device before the accessing the first storage device to the cloud storage system Whether the first storage device is formatted in the cloud storage system;
  • a creating module configured to: when the first determining module determines that the result is yes, create index information of the first storage device in the storage node;
  • an output module configured to output prompt information for formatting the first storage device when the first determining module determines that the result is negative.
  • the device further includes:
  • a second reading module configured to, after the output module outputs the prompt information for formatting the first storage device, when receiving an instruction input by the user to format the first storage device, a first target storage device library, reading the saved format standard interface, and a format operation mode corresponding to the type of the first storage device;
  • a formatting module configured to format the first storage device according to the formatted standard interface read and the formatted operation mode.
  • the device further includes:
  • a second identification module configured to identify a type of the second storage device when detecting that the second storage device is offline
  • a second search module configured to search, according to the type of the second storage device, a second target storage device library corresponding to the type of the second storage device;
  • a third reading module configured to read the saved offline standard interface according to the second target storage device library, and an offline operation mode corresponding to the type of the second storage device;
  • the removing module is configured to remove the second storage device from the cloud storage system according to the offline standard interface read by the third reading module and the offline operation mode.
  • the device further includes:
  • a second determining module configured to determine, before the removing module removes the second storage device from the cloud storage system, whether the second storage device is formatted in the cloud storage system ;
  • An execution module configured to: when the second determination module determines that the result is YES, stop all operations on the second storage device, delete index information of the second storage device saved in the storage node, and Trigger the removal module.
  • the device further includes:
  • a third identification module configured to identify a type of the third storage device when determining that the third storage device has a data processing request to be processed, and search for the third storage according to the type of the third storage device a third target storage device library corresponding to the type of the device;
  • a fourth reading module configured to read the saved data processing standard interface according to the third target storage device library, and a data processing operation manner corresponding to the type of the third storage device;
  • a processing module configured to process the data processing request according to the data processing standard interface read by the fourth reading module and the data processing operation mode.
  • the present application provides a storage medium, where the storage medium is used to store executable program code for performing dynamics in a cloud storage system described in the present application at runtime Method of accessing a storage device.
  • the application provides an application, where the application is configured to perform a method for dynamically accessing a storage device in a cloud storage system according to the present application at runtime.
  • the application provides a storage node device, including:
  • processor a memory, a communication interface, and a bus
  • the processor, the memory, and the communication interface are connected by the bus and complete communication with each other;
  • the memory stores executable program code
  • the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, for performing a cloud storage system in the present application.
  • a method of accessing a storage device is a method of accessing a storage device.
  • the embodiment of the present invention provides a method and an apparatus for dynamically accessing a storage device in a cloud storage system, which are applied to a storage node in a cloud storage system, and the method includes: when detecting a new first storage device, identifying Type of the first storage device; searching for a first target storage device library corresponding to the type of the first storage device according to the type of the first storage device; reading according to the first target storage device library a saved online standard interface, and an online operation mode corresponding to the type of the first storage device, wherein the first target storage device library stores an online standard interface, and an online corresponding to the type of each storage device
  • the first storage device is connected to the cloud storage system according to the read online standard interface and the online operation mode.
  • the saved online standard interface and the online operation mode corresponding to the type of the storage device can be obtained according to the type of the storage device, and according to the obtained
  • the on-line standard interface and the online operation mode connect the storage device to the cloud storage system to implement dynamic access of the storage device in the storage node.
  • FIG. 1 is a flowchart of a method for dynamically accessing a storage device in a cloud storage system according to an embodiment of the present disclosure
  • FIG. 2 is another flowchart of a method for dynamically accessing a storage device in a cloud storage system according to an embodiment of the present disclosure
  • FIG. 3 is a flowchart of a method for removing a storage device in a cloud storage system according to an embodiment of the present disclosure
  • FIG. 4 is another flowchart of a method for removing a storage device in a cloud storage system according to an embodiment of the present disclosure
  • FIG. 5 is a flowchart of a data processing method in a cloud storage system according to an embodiment of the present disclosure
  • FIG. 6 is a schematic structural diagram of an apparatus for dynamically accessing a storage device in a cloud storage system according to an embodiment of the present disclosure
  • FIG. 7 is another schematic structural diagram of an apparatus for dynamically accessing a storage device in a cloud storage system according to an embodiment of the present disclosure
  • FIG. 8 is another schematic structural diagram of an apparatus for dynamically accessing a storage device in a cloud storage system according to an embodiment of the present disclosure
  • FIG. 9 is another schematic structural diagram of an apparatus for dynamically accessing a storage device in a cloud storage system according to an embodiment of the present disclosure.
  • FIG. 10 is another schematic structural diagram of an apparatus for dynamically accessing a storage device in a cloud storage system according to an embodiment of the present disclosure.
  • the method for dynamically accessing a storage device in a cloud storage system is applied to a storage node in a cloud storage system, as shown in FIG. 1 .
  • the process includes the following steps:
  • storage nodes in a cloud storage device can be used to store data.
  • the storage node may use a storage device that has accessed the cloud storage system to store data, such as a disk, a Raid, an iScsi device, an FC device, and the like.
  • the storage device in the storage node When a storage node is added to a cloud storage system, the storage device in the storage node The type, capacity, etc. of the equipment have been determined. However, as the amount of data stored in the storage node increases, the capacity of the storage device in the storage node may reach its maximum load and cannot store more data.
  • the storage node can access a new storage device to store more data.
  • the storage node may detect whether a new first storage device is connected periodically (eg, 3 milliseconds, 5 milliseconds, 10 milliseconds, etc.) to access the first storage device into the cloud storage system.
  • a new first storage device is connected periodically (eg, 3 milliseconds, 5 milliseconds, 10 milliseconds, etc.) to access the first storage device into the cloud storage system.
  • the storage node can identify the type of the first storage device.
  • the types of the foregoing storage devices may include, for example, a disk, a Raid, an iScsi device, an FC device, and the like.
  • the storage node accesses the cloud storage system, and may need to use different access methods. If the access device is connected to the cloud storage system using an access method that does not correspond to the type of the storage device, the storage device may fail to access. Therefore, when the storage node detects the access to the new first storage device, the type of the first storage device may be first identified to access the first storage device to the cloud by using an access manner corresponding to the first storage device. Storage system to improve the success rate of access.
  • the new first storage device in this embodiment may be a relative concept, that is, the current storage device is just connected to the storage node.
  • the first storage device may not be connected to the storage node before, or the first storage device is connected to the storage node before, and the connection is interrupted due to poor connection or other reasons, and then the first The storage device is reconnected to the storage node.
  • the new first storage device may be a storage device that has not been used before, or the first storage device may also be a storage device used in other cloud storage systems, other storage nodes, or even other systems. . As long as the current storage device is connected to the current storage node, the storage node determines that the connection of the new first storage device is detected, and identifies the type of the first storage device to A storage device is connected to the cloud storage system.
  • the storage node since it is connected to the cloud storage system for different types of storage devices The access methods used by the system may be different. Therefore, in order to successfully connect different types of storage devices to the cloud storage system, the storage node may pre-build and save multiple storage device libraries.
  • the storage node can build its corresponding storage device library for each type of storage device. Moreover, for each type of storage device, a unified standard interface and an operation mode corresponding to the type can be saved in the corresponding storage device library.
  • the standard interface and the operation mode may include standard interfaces and operation modes corresponding to all types of operations performed on the storage device.
  • the method may include: an online standard interface and an operation mode, a formatted standard interface and an operation mode, and a downlink standard interface. And operation methods, etc.
  • identification information may be added for each storage device library.
  • its identification information may be set to the type identification of the storage device corresponding to the storage device library.
  • the storage node may search for the first storage device according to the type of the first storage device.
  • the target storage device library corresponding to the type, the first storage device is connected to the cloud storage system according to the online standard interface and the online operation mode in the target storage device library.
  • the storage node when the type identifier of each storage device is used as the identifier information of each storage device library, when the storage node searches for the target storage device library corresponding to the type of the first storage device, the storage node may identify the identification information of each storage device library. And determining, by the storage device library whose identification information is the type identifier of the first storage device, a target storage device library corresponding to the type of the first storage device.
  • the storage online device may be read, and the saved online standard interface and the online operation mode corresponding to the type of the first storage device may be read.
  • the first storage device is connected to the cloud storage system according to the online standard interface and the online operation mode.
  • the first storage device is connected to the cloud storage system according to the read online standard interface and the online operation mode.
  • the storage node After reading the online standard interface and the online operation mode, the storage node can be based on the online standard.
  • the first storage device is connected to the cloud storage system by using the interface and the online operation mode. After the first storage device is connected to the cloud storage system, the storage node can use the first storage device to store data.
  • the saved online standard interface and the online operation mode corresponding to the type of the storage device can be obtained according to the type of the storage device, and according to the obtained
  • the on-line standard interface and the online operation mode connect the storage device to the cloud storage system to implement dynamic access of the storage device in the storage node.
  • the method for dynamically accessing a storage device in a cloud storage system may further include:
  • Step S105 Determine, according to the formatted identification information saved in the first storage device, whether the first storage device is formatted in the cloud storage system; if yes, execute step S106; otherwise, execute Step S107.
  • the new first storage device of the connection detected by the storage node may not be connected to the storage node before, or the first storage device is previously connected to the storage node, and the connection is caused due to poor connection or other reasons. Interrupted, after which the first storage device is reconnected to the storage node.
  • the new first storage device may be a storage device that has not been used before, or the first storage device may also be a storage device used in other cloud storage systems, other storage nodes, or even other systems. .
  • data may or may not be stored in the new first storage device of the connection detected by the storage node. Moreover, when data is stored in the first storage device, the data may be data in the cloud storage system or may not be data in the cloud storage system.
  • the storage node accesses the storage device that has not accessed the cloud storage system before accessing the cloud storage system. You can format the storage device first. Moreover, only the storage device formatted in the cloud storage system can access the cloud storage system and perform data storage. The unformatted storage device in the cloud storage system does not access the cloud storage system, and therefore, the data in the cloud storage system is not stored.
  • each format identifier of the storage device can be saved in each storage device.
  • the formatted identification information may include information such as identification information, formatting time, and the like of the system in which it is formatted.
  • the storage node may determine, according to its own formatted identification information saved in the first storage device, whether the first storage device is The cloud storage system has been formatted. For example, in the formatted identification information of the first storage device, the identifier information of the cloud storage system where the storage node is located may be searched. If found, the first storage device may be formatted in the cloud storage system. If not found, it can be indicated that the first storage device is not formatted in the cloud storage system.
  • the first storage device may indicate that the first storage device has previously accessed the cloud storage system, and the current reconnection may be caused by a bad connection or the like. Reconnect after the line. Therefore, the data in the cloud storage system may be stored in the first storage device. In this case, step S106 may be performed to create index information of the first storage device in the storage node to reuse the first storage device. To store data.
  • the first storage device may indicate that the first storage device has not accessed the cloud storage system before, and the current access is the first time that the first storage device accesses the cloud storage system.
  • the prompting information for formatting the first storage device may be output to format the first storage device and further access the cloud storage system.
  • index information of the first storage device may be created in the storage node to reuse the first storage device to store data.
  • the above index information may be, for example, key information of data stored in the first storage device.
  • the prompt information for formatting the first storage device may be output to perform corresponding operations according to an instruction input by the user.
  • the prompt information for formatting the first storage device may be first output, so that the user confirms whether to format the first storage device, Avoid accidentally deleting data in the first storage device caused by direct formatting.
  • the storage node may read the saved format standard interface from the first target storage device library, and a format operation mode corresponding to the type of the first storage device to ensure that the first storage device is Successfully formatted.
  • the storage node After reading the formatted standard interface and the formatted operation mode, the storage node can format the first storage device according to the formatted standard interface and the formatted operation mode. After the first storage device is formatted, the storage node can access the first storage device to the cloud storage system.
  • the storage device before the storage device is connected to the cloud storage system, the storage device may be first formatted in the cloud storage system. If yes, after the index information of the storage device is created in the storage node, The storage device is connected to the cloud storage system; otherwise, the storage device is formatted and then connected to the cloud storage system to ensure that the data stored in the storage device is data in the cloud storage system.
  • the method of the present application further provides a method for removing a storage device in a corresponding cloud storage system, and is applied to a storage node in the cloud storage system, as shown in FIG. 3 .
  • the process includes the following steps:
  • the storage node can dynamically access the storage device, and therefore, the storage node can also remove the storage device accessed by the storage node. For example, when the storage device is not connected well to the storage node or When the user manually disconnects the storage device from the storage node, the storage node can remove the storage device.
  • the storage node may periodically detect (eg, 3 milliseconds, 5 milliseconds, 10 milliseconds, etc.) whether there is a second storage device offline to remove the second storage device from the cloud storage system.
  • the storage node can identify the type of the second storage device.
  • the types of the foregoing storage devices may include, for example, a disk, a Raid, an iScsi device, an FC device, and the like.
  • first storage device and the second storage device in the embodiment of the present application may be the same storage device or different storage devices.
  • the storage device may search for the type of the second storage device according to the type of the second storage device.
  • the target storage device library is configured to remove the second storage device from the cloud storage system according to the offline standard interface and the offline operation mode in the target storage device library.
  • the storage node when the type identifier of each storage device is used as the identifier information of each storage device library, when the storage node searches for the target storage device library corresponding to the type of the second storage device, the storage node may identify the identification information of each storage device library. And determining, by the storage device library whose identification information is the type identifier of the second storage device, a target storage device library corresponding to the type of the second storage device.
  • the storage node finds the target storage device library corresponding to the type of the second storage device
  • the saved offline standard interface and the offline line corresponding to the type of the second storage device may be read according to the target storage device library.
  • the operation mode is to remove the second storage device from the cloud storage system according to the offline standard interface and the offline operation mode.
  • the second storage device is removed from the cloud storage system according to the read offline standard interface and the offline operation mode.
  • the storage node can remove the second storage device from the cloud storage system according to the offline standard interface and the offline operation mode.
  • the saved offline standard interface and the offline operation mode corresponding to the type of the storage device can be obtained according to the type of the storage device, and obtained according to the obtained.
  • the offline standard interface and the offline operation mode remove the storage device from the cloud storage system, and implement dynamic removal of the storage device in the storage node.
  • the method for removing the storage device in the cloud storage system may further include:
  • S305 Determine whether the second storage device is formatted in the cloud storage system. If yes, stop all operations currently performed on the second storage device, and delete the second saved in the storage node. Storing index information of the device and performing the step of removing the second storage device from the cloud storage system.
  • the storage device can be used to process the data processing request. Therefore, in the embodiment, when the storage node removes the storage device from the cloud storage system, if the storage device exists unprocessed If the data processing request is removed, directly removing the storage device from the cloud storage system may cause the data processing request to fail, resulting in data loss and the like.
  • the storage device accesses the cloud storage system for the first time
  • only the storage device formatted in the cloud storage system can access the cloud storage system and process the data processing request.
  • the storage node may first determine whether the second storage device is formatted in the cloud storage system. If yes, it indicates that the second storage device has successfully accessed the cloud storage system, and the second storage device may have an unprocessed data processing request. In this case, the storage node may stop all operations on the second storage device, and delete the index information of the second storage device saved in the storage node, and then perform the second storage device from the cloud storage system. The steps to remove.
  • the storage device before the storage device is removed from the cloud storage system, it may be first determined whether the storage device is formatted in the cloud storage system, and if so, all operations currently performed on the storage device are stopped, and The step of deleting the index information of the storage device saved in the storage node and then removing the storage device from the cloud storage system ensures data security in the cloud storage system.
  • the embodiment of the present application further provides a data processing method in a corresponding cloud storage system, which is applied to a storage node in a cloud storage system, as shown in FIG. 5, where the process includes The following steps:
  • the management node when receiving a data processing request, such as a data read request or a data write request, the management node may allocate one or more storage devices for the data processing request to process the data processing request.
  • the management node allocates the storage device for the data processing request
  • any existing method may be used.
  • the storage device may be allocated for the data processing request according to the load balancing principle, which is not described in this application.
  • the storage devices in the storage node may be different types of storage devices, when processing data processing requests for different types of storage devices, different data processing methods may be required. If the data processing request to be processed by the storage device is processed by using a data processing manner that does not correspond to the type of the storage device, the data processing request processing may be failed.
  • the storage node may first identify the type of the third storage device, and according to the type of the third storage device, look up and A target storage device library corresponding to the type of the third storage device.
  • the types of the foregoing storage devices may include, for example, a disk, a Raid, an iScsi device, an FC device, and the like.
  • the storage node when the type identifier of each storage device is used as the identifier information of each storage device library, when the storage node searches for the target storage device library corresponding to the type of the third storage device, the storage node may identify the identification information of each storage device library. And determining, by the storage device library whose identification information is the type identifier of the third storage device, a target storage device library corresponding to the type of the third storage device.
  • first storage device, the second storage device, and the third storage device in the embodiment of the present application may be the same storage device or different storage devices.
  • the storage node finds the target storage device library corresponding to the type of the third storage device, the saved data processing standard interface and the data processing corresponding to the type of the third storage device may be read according to the target storage device library.
  • the operation mode is to process the data processing request to be processed according to the data processing standard interface and the data processing operation mode.
  • the storage node may process the data processing request to be processed according to the data processing standard interface and the data processing operation mode.
  • the above data processing standard interface may include opening an object block, reading the object block content, writing the object block content, and closing the object block.
  • the corresponding data processing operation mode may be: for a device without a file system, the operation for the object block may be mapped to the operation of specifying the location of the device; for the device with the file system, The operation of the object block is mapped to the operation of the specified file in the device.
  • the storage data processing standard interface and the data processing operation manner corresponding to the type of the storage device can be obtained according to the type of the storage device. And processing the to-be-processed data processing request according to the obtained data processing standard interface and the data processing operation manner, thereby improving the success rate of the data processing request processing in the cloud storage system.
  • the embodiment of the present application also provides a corresponding device embodiment.
  • FIG. 6 is a device for dynamically accessing a storage device in a cloud storage system according to an embodiment of the present disclosure, which is applied to a storage node in a cloud storage system, where the device includes:
  • the first identifying module 610 is configured to identify a type of the first storage device when detecting a new first storage device
  • the first searching module 620 is configured to search for the first one according to the type of the first storage device. a first target storage device library corresponding to the type of the storage device;
  • the first reading module 630 is configured to read the saved online standard interface according to the first target storage device library, and an online operation mode corresponding to the type of the first storage device, where the first target The storage device library stores an online standard interface, and an online operation mode corresponding to the type of each storage device;
  • the access module 640 is configured to access the first storage device to the cloud storage system according to the online standard interface read by the first reading module and the online operation mode.
  • the saved online standard interface and the online operation mode corresponding to the type of the storage device can be obtained according to the type of the storage device, and according to the obtained
  • the on-line standard interface and the online operation mode connect the storage device to the cloud storage system to implement dynamic access of the storage device in the storage node.
  • the apparatus for dynamically accessing a storage device in the cloud storage system provided by this embodiment further includes:
  • the first determining module 650 is configured to determine, according to the formatted identification information saved in the first storage device, before the accessing module 640 accesses the first storage device to the cloud storage system Whether the first storage device is formatted in the cloud storage system;
  • a creating module 660 configured to: when the first determining module 650 determines that the result is yes, create index information of the first storage device in the storage node;
  • the output module 670 is configured to output prompt information for formatting the first storage device when the first determining module 650 determines that the result is negative.
  • the device further includes:
  • a second reading module 680 configured to: after the output module 670 outputs the prompt information for formatting the first storage device, when receiving an instruction input by the user to format the first storage device, Reading, in the first target storage device library, a saved formatting standard interface, and a format operation mode corresponding to the type of the first storage device;
  • a formatting module 690 for formatting the standard interface according to the reading and the formatting operation In a manner, the first storage device is formatted.
  • the storage device before the storage device is connected to the cloud storage system, the storage device may be first formatted in the cloud storage system. If yes, after the index information of the storage device is created in the storage node, The storage device is connected to the cloud storage system; otherwise, the storage device is formatted and then connected to the cloud storage system to ensure that the data stored in the storage device is data in the cloud storage system.
  • the device for dynamically accessing the storage device in the cloud storage system further includes:
  • a second identification module 810 configured to identify a type of the second storage device when detecting that the second storage device is offline;
  • the second searching module 820 is configured to search, according to the type of the second storage device, a second target storage device library corresponding to the type of the second storage device;
  • the third reading module 830 is configured to read the saved offline standard interface according to the second target storage device library, and an offline operation mode corresponding to the type of the second storage device;
  • the removing module 840 is configured to remove the second storage device from the cloud storage system according to the offline standard interface read by the third reading module and the offline operation mode.
  • the saved offline standard interface and the offline operation mode corresponding to the type of the storage device can be obtained according to the type of the storage device, and obtained according to the obtained.
  • the offline standard interface and the offline operation mode remove the storage device from the cloud storage system, and implement dynamic removal of the storage device in the storage node.
  • the apparatus for dynamically accessing a storage device in the cloud storage system provided by this embodiment further includes:
  • a second determining module 850 configured to determine, before the removing module removes the second storage device from the cloud storage system, whether the second storage device is formatted in the cloud storage system Over
  • the execution module 860 is configured to: when the second determination module determines that the result is YES, stop all operations currently performed on the second storage device, and delete index information of the second storage device saved in the storage node, And triggering the removal module.
  • the storage device before the storage device is removed from the cloud storage system, it may be first determined whether the storage device is formatted in the cloud storage system, and if so, all operations currently performed on the storage device are stopped, and The step of deleting the index information of the storage device saved in the storage node and then removing the storage device from the cloud storage system ensures data security in the cloud storage system.
  • the apparatus for dynamically accessing a storage device in the cloud storage system provided by this embodiment further includes:
  • the third identification module 1010 is configured to identify a type of the third storage device when determining that the third storage device has a data processing request to be processed, and search for the third device according to the type of the third storage device. a third target storage device library corresponding to the type of the storage device;
  • the fourth reading module 1020 is configured to read the saved data processing standard interface according to the third target storage device library, and a data processing operation manner corresponding to the type of the third storage device;
  • the processing module 1030 is configured to process the data processing request according to the data processing standard interface read by the fourth reading module and the data processing operation mode.
  • the storage data processing standard interface and the data processing operation manner corresponding to the type of the storage device can be obtained according to the type of the storage device. And processing the to-be-processed data processing request according to the obtained data processing standard interface and the data processing operation manner, thereby improving the success rate of the data processing request processing in the cloud storage system.
  • the present application further provides a storage medium, where the storage medium is used to store executable program code for performing dynamics in a cloud storage system described in the present application at runtime Method of accessing a storage device.
  • a cloud storage system as described in the present application The method for dynamically accessing a storage device is applied to a storage node in a cloud storage system, and the method includes:
  • the first storage device is connected to the cloud storage system according to the read online standard interface and the online operation mode.
  • the saved online standard interface and the online operation mode corresponding to the type of the storage device can be obtained according to the type of the storage device, and according to the obtained
  • the on-line standard interface and the online operation mode connect the storage device to the cloud storage system to implement dynamic access of the storage device in the storage node.
  • the present application further provides an application, where the application is used to execute a method for dynamically accessing a storage device in a cloud storage system according to the present application at runtime.
  • the method for dynamically accessing a storage device in a cloud storage system is applied to a storage node in a cloud storage system, and the method includes:
  • the first storage device is connected to the cloud storage system according to the read online standard interface and the online operation mode.
  • the saved online standard interface and the online operation mode corresponding to the type of the storage device can be obtained according to the type of the storage device, and according to the obtained
  • the on-line standard interface and the online operation mode connect the storage device to the cloud storage system to implement dynamic access of the storage device in the storage node.
  • the present application further provides a storage node device, including:
  • processor a memory, a communication interface, and a bus
  • the processor, the memory, and the communication interface are connected by the bus and complete communication with each other;
  • the memory stores executable program code
  • the processor by reading the executable program code stored in the memory, to run a program corresponding to the executable program code, for performing a dynamic access storage device in a cloud storage system according to the present application.
  • Methods The method for dynamically accessing a storage device in a cloud storage system is applied to a storage node in a cloud storage system, and the method includes:
  • the first storage device is connected to the cloud storage system according to the read online standard interface and the online operation mode.
  • the saved online standard interface and the online operation mode corresponding to the type of the storage device can be obtained according to the type of the storage device, and according to the obtained
  • the on-line standard interface and the online operation mode connect the storage device to the cloud storage system to implement dynamic access of the storage device in the storage node.
  • the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Embodiments of the present application provide a method and an apparatus for dynamic access of a storage device in a cloud storage system, applied to a storage node in a cloud storage system. The method comprises: identifying, when it is detected that a new first storage device is connected, the type of the first storage device; searching, according to the type of the first storage device, for a first target storage device library corresponding to the type of the first storage device; reading, according to the first target storage device library, a stored online standard interface and an online operating mode which corresponds to the type of the first storage device, wherein online standard interfaces and respective online operating modes corresponding to types of storage devices are stored in the first target storage device library; and enabling, according to the read online standard interface and online operating mode, the first storage device to access the cloud storage system. The embodiment of the present application can implement dynamic access of a storage device in a storage node.

Description

一种云存储系统中动态接入存储设备的方法及装置Method and device for dynamically accessing storage device in cloud storage system

本申请要求于2016年2月25日提交中国专利局、申请号为201610104338.0发明名称为“一种云存储系统中动态接入存储设备的方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims the priority of the Chinese Patent Application entitled "A Method and Apparatus for Dynamically Accessing a Storage Device in a Cloud Storage System" by the Chinese Patent Office on February 25, 2016, and the application number is 201610104338.0. This is incorporated herein by reference.

技术领域Technical field

本申请涉及云存储技术领域,特别是涉及一种云存储系统中动态接入存储设备的方法及装置。The present application relates to the field of cloud storage technologies, and in particular, to a method and an apparatus for dynamically accessing a storage device in a cloud storage system.

背景技术Background technique

云存储是在云计算(cloud computing)概念上延伸和发展出来的一个新的概念,是一种新兴的网络存储技术,是指通过集群应用、网络技术或分布式文件系统等功能,将网络中各种不同类型的大量存储设备通过应用软件集合起来协同工作,共同对外提供数据存储和业务访问功能的一个系统。Cloud storage is a new concept extended and developed in the concept of cloud computing. It is an emerging network storage technology that refers to functions such as cluster applications, network technologies or distributed file systems. A system in which a plurality of different types of storage devices work together through application software to jointly provide data storage and service access functions.

云存储系统中的存储服务器可以称为存储节点,每个存储节点中用来存储数据的载体称为存储设备,如磁盘、Raid、iScsi设备、FC(Fibre Channel,光纤通道)设备等。随着云存储系统存储的数据量的增加,为了保证云存储系统能够提供正常的服务,云存储系统通常需要扩容,即云存储系统需要扩大其存储空间,以将需要存储的数据存储在云存储系统中。A storage server in a cloud storage system may be referred to as a storage node, and a storage device used to store data in each storage node is referred to as a storage device, such as a disk, a Raid, an iScsi device, an FC (Fibre Channel, Fibre Channel) device, or the like. As the amount of data stored in the cloud storage system increases, in order to ensure that the cloud storage system can provide normal services, the cloud storage system usually needs to be expanded, that is, the cloud storage system needs to expand its storage space to store the data that needs to be stored in the cloud storage. In the system.

现有的云存储扩容方法,主要是以加入新的存储节点来实现的,但是,这种方法成本较高,适用性差。The existing cloud storage expansion method is mainly implemented by adding a new storage node, but this method has high cost and poor applicability.

发明内容Summary of the invention

本申请实施例的目的在于提供一种云存储系统中动态接入存储设备的方法及装置,以实现存储节点中存储设备的动态接入。具体技术方案如下:An embodiment of the present invention provides a method and an apparatus for dynamically accessing a storage device in a cloud storage system to implement dynamic access of a storage device in a storage node. The specific technical solutions are as follows:

第一方面,本申请实施例提供了一种云存储系统中动态接入存储设备的方法,应用于云存储系统中的存储节点,所述方法包括:In a first aspect, the embodiment of the present application provides a method for dynamically accessing a storage device in a cloud storage system, which is applied to a storage node in a cloud storage system, where the method includes:

当检测到连接新的第一存储设备时,识别所述第一存储设备的类型; Identifying a type of the first storage device when detecting that a new first storage device is connected;

根据所述第一存储设备的类型,查找与所述第一存储设备的类型对应的第一目标存储设备库;Determining, according to the type of the first storage device, a first target storage device library corresponding to the type of the first storage device;

根据所述第一目标存储设备库,读取保存的上线标准接口,以及与所述第一存储设备的类型对应的上线操作方式,其中,所述第一目标存储设备库中保存有上线标准接口,以及针对每种存储设备的类型对应的上线操作方式;And downloading the saved online standard interface, and the online operation mode corresponding to the type of the first storage device, wherein the first target storage device library stores an online standard interface according to the first target storage device library. And an online operation mode corresponding to the type of each storage device;

根据读取的所述上线标准接口以及所述上线操作方式,将所述第一存储设备接入所述云存储系统。The first storage device is connected to the cloud storage system according to the read online standard interface and the online operation mode.

进一步地,所述将所述第一存储设备接入所述云存储系统之前,所述方法还包括:Further, before the accessing the first storage device to the cloud storage system, the method further includes:

根据所述第一存储设备中保存的其自身的格式化标识信息,判断所述第一存储设备是否在所述云存储系统中被格式化过;如果是,在所述存储节点中创建所述第一存储设备的索引信息;否则,输出对所述第一存储设备进行格式化的提示信息。Determining, according to the formatted identification information saved in the first storage device, whether the first storage device is formatted in the cloud storage system; if yes, creating the storage node in the storage node Index information of the first storage device; otherwise, outputting prompt information for formatting the first storage device.

进一步地,输出对所述第一存储设备进行格式化的提示信息后,所述方法还包括:Further, after outputting the prompt information for formatting the first storage device, the method further includes:

当接收到用户输入的格式化所述第一存储设备的指令时,从所述第一目标存储设备库中,读取保存的格式化标准接口,以及与所述第一存储设备的类型对应的格式化操作方式;When receiving an instruction input by the user to format the first storage device, reading the saved formatting standard interface from the first target storage device library, and corresponding to the type of the first storage device Formatting operation mode;

根据读取的所述格式化标准接口以及所述格式化操作方式,将所述第一存储设备格式化。The first storage device is formatted according to the formatted standard interface read and the formatted operation mode.

进一步地,所述方法还包括:Further, the method further includes:

当检测到第二存储设备下线时,识别所述第二存储设备的类型;Identifying a type of the second storage device when detecting that the second storage device is offline;

根据所述第二存储设备的类型,查找与所述第二存储设备的类型对应的第二目标存储设备库;Searching, according to the type of the second storage device, a second target storage device library corresponding to the type of the second storage device;

根据所述第二目标存储设备库,读取保存的下线标准接口,以及与所述第二存储设备的类型对应的下线操作方式; Reading the saved offline standard interface and the offline operation mode corresponding to the type of the second storage device according to the second target storage device library;

根据读取的所述下线标准接口以及所述下线操作方式,将所述第二存储设备从所述云存储系统中移除。And deleting the second storage device from the cloud storage system according to the read offline standard interface and the offline operation mode.

进一步地,所述将所述第二存储设备从所述云存储系统中移除之前,所述方法还包括:Further, before the removing the second storage device from the cloud storage system, the method further includes:

判断所述第二存储设备是否在所述云存储系统中被格式化过;如果是,停止当前对所述第二存储设备的所有操作,删除所述存储节点中保存的所述第二存储设备的索引信息,并进行将所述第二存储设备从所述云存储系统中移除的步骤。Determining whether the second storage device is formatted in the cloud storage system; if yes, stopping all operations currently performed on the second storage device, deleting the second storage device saved in the storage node Indexing information and performing the step of removing the second storage device from the cloud storage system.

进一步地,所述方法还包括:Further, the method further includes:

当确定第三存储设备存在待处理的数据处理请求时,识别所述第三存储设备的类型,并根据所述第三存储设备的类型,查找与所述第三存储设备的类型对应的第三目标存储设备库;When it is determined that the third storage device has a data processing request to be processed, identifying a type of the third storage device, and searching for a third corresponding to the type of the third storage device according to the type of the third storage device Target storage device library;

根据所述第三目标存储设备库,读取保存的数据处理标准接口,以及与所述第三存储设备的类型对应的数据处理操作方式;Reading, according to the third target storage device library, a saved data processing standard interface, and a data processing operation mode corresponding to the type of the third storage device;

根据读取的所述数据处理标准接口以及所述数据处理操作方式,对所述数据处理请求进行处理。The data processing request is processed according to the read data processing standard interface and the data processing operation mode.

第二方面,本申请实施例提供了一种云存储系统中动态接入存储设备的装置,应用于云存储系统中的存储节点,所述装置包括:In a second aspect, the embodiment of the present application provides a device for dynamically accessing a storage device in a cloud storage system, which is applied to a storage node in a cloud storage system, where the device includes:

第一识别模块,用于当检测到连接新的第一存储设备时,识别所述第一存储设备的类型;a first identifying module, configured to identify a type of the first storage device when detecting that a new first storage device is connected;

第一查找模块,用于根据所述第一存储设备的类型,查找与所述第一存储设备的类型对应的第一目标存储设备库;a first searching module, configured to search, according to the type of the first storage device, a first target storage device library corresponding to the type of the first storage device;

第一读取模块,用于根据所述第一目标存储设备库,读取保存的上线标准接口,以及与所述第一存储设备的类型对应的上线操作方式,其中,所述第一目标存储设备库中保存有上线标准接口,以及针对每种存储设备的类型对应的上线操作方式;a first reading module, configured to read the saved online standard interface according to the first target storage device library, and an online operation mode corresponding to the type of the first storage device, where the first target storage The device library stores an online standard interface, and an online operation mode corresponding to the type of each storage device;

接入模块,用于根据所述第一读取模块读取的所述上线标准接口以及所 述上线操作方式,将所述第一存储设备接入所述云存储系统。An access module, configured to be used according to the online standard interface read by the first reading module In the online operation mode, the first storage device is connected to the cloud storage system.

进一步地,所述装置还包括:Further, the device further includes:

第一判断模块,用于在所述接入模块将所述第一存储设备接入所述云存储系统之前,根据所述第一存储设备中保存的其自身的格式化标识信息,判断所述第一存储设备是否在所述云存储系统中被格式化过;a first determining module, configured to determine, according to the formatted identification information saved in the first storage device, the first storage device before the accessing the first storage device to the cloud storage system Whether the first storage device is formatted in the cloud storage system;

创建模块,用于当所述第一判断模块判断结果为是时,在所述存储节点中创建所述第一存储设备的索引信息;a creating module, configured to: when the first determining module determines that the result is yes, create index information of the first storage device in the storage node;

输出模块,用于当所述第一判断模块判断结果为否时,输出对所述第一存储设备进行格式化的提示信息。And an output module, configured to output prompt information for formatting the first storage device when the first determining module determines that the result is negative.

进一步地,所述装置还包括:Further, the device further includes:

第二读取模块,用于在所述输出模块输出对所述第一存储设备进行格式化的提示信息后,当接收到用户输入的格式化所述第一存储设备的指令时,从所述第一目标存储设备库中,读取保存的格式化标准接口,以及与所述第一存储设备的类型对应的格式化操作方式;a second reading module, configured to, after the output module outputs the prompt information for formatting the first storage device, when receiving an instruction input by the user to format the first storage device, a first target storage device library, reading the saved format standard interface, and a format operation mode corresponding to the type of the first storage device;

格式化模块,用于根据读取的所述格式化标准接口以及所述格式化操作方式,将所述第一存储设备格式化。And a formatting module, configured to format the first storage device according to the formatted standard interface read and the formatted operation mode.

进一步地,所述装置还包括:Further, the device further includes:

第二识别模块,用于当检测到第二存储设备下线时,识别所述第二存储设备的类型;a second identification module, configured to identify a type of the second storage device when detecting that the second storage device is offline;

第二查找模块,用于根据所述第二存储设备的类型,查找与所述第二存储设备的类型对应的第二目标存储设备库;a second search module, configured to search, according to the type of the second storage device, a second target storage device library corresponding to the type of the second storage device;

第三读取模块,用于根据所述第二目标存储设备库,读取保存的下线标准接口,以及与所述第二存储设备的类型对应的下线操作方式;a third reading module, configured to read the saved offline standard interface according to the second target storage device library, and an offline operation mode corresponding to the type of the second storage device;

移除模块,用于根据所述第三读取模块读取的所述下线标准接口以及所述下线操作方式,将所述第二存储设备从所述云存储系统中移除。The removing module is configured to remove the second storage device from the cloud storage system according to the offline standard interface read by the third reading module and the offline operation mode.

进一步地,所述装置还包括: Further, the device further includes:

第二判断模块,用于在所述移除模块将所述第二存储设备从所述云存储系统中移除之前,判断所述第二存储设备是否在所述云存储系统中被格式化过;a second determining module, configured to determine, before the removing module removes the second storage device from the cloud storage system, whether the second storage device is formatted in the cloud storage system ;

执行模块,用于当所述第二判断模块判断结果为是时,停止当前对所述第二存储设备的所有操作,删除所述存储节点中保存的所述第二存储设备的索引信息,并触发所述移除模块。An execution module, configured to: when the second determination module determines that the result is YES, stop all operations on the second storage device, delete index information of the second storage device saved in the storage node, and Trigger the removal module.

进一步地,所述装置还包括:Further, the device further includes:

第三识别模块,用于当确定第三存储设备存在待处理的数据处理请求时,识别所述第三存储设备的类型,并根据所述第三存储设备的类型,查找与所述第三存储设备的类型对应的第三目标存储设备库;a third identification module, configured to identify a type of the third storage device when determining that the third storage device has a data processing request to be processed, and search for the third storage according to the type of the third storage device a third target storage device library corresponding to the type of the device;

第四读取模块,用于根据所述第三目标存储设备库,读取保存的数据处理标准接口,以及与所述第三存储设备的类型对应的数据处理操作方式;a fourth reading module, configured to read the saved data processing standard interface according to the third target storage device library, and a data processing operation manner corresponding to the type of the third storage device;

处理模块,用于根据所述第四读取模块读取的所述数据处理标准接口以及所述数据处理操作方式,对所述数据处理请求进行处理。And a processing module, configured to process the data processing request according to the data processing standard interface read by the fourth reading module and the data processing operation mode.

第三方面,本申请提供了一种存储介质,其中,该存储介质用于存储可执行程序代码,所述可执行程序代码用于在运行时执行本申请所述的一种云存储系统中动态接入存储设备的方法。In a third aspect, the present application provides a storage medium, where the storage medium is used to store executable program code for performing dynamics in a cloud storage system described in the present application at runtime Method of accessing a storage device.

第四方面,本申请提供了一种应用程序,其中,该应用程序用于在运行时执行本申请所述的一种云存储系统中动态接入存储设备的方法。In a fourth aspect, the application provides an application, where the application is configured to perform a method for dynamically accessing a storage device in a cloud storage system according to the present application at runtime.

第五方面,本申请提供了一种存储节点设备,包括:In a fifth aspect, the application provides a storage node device, including:

处理器、存储器、通信接口和总线;a processor, a memory, a communication interface, and a bus;

所述处理器、所述存储器和所述通信接口通过所述总线连接并完成相互间的通信;The processor, the memory, and the communication interface are connected by the bus and complete communication with each other;

所述存储器存储可执行程序代码;The memory stores executable program code;

所述处理器通过读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于执行本申请所述的一种云存储系统中动 态接入存储设备的方法。The processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, for performing a cloud storage system in the present application. A method of accessing a storage device.

本申请实施例提供了一种云存储系统中动态接入存储设备的方法及装置,应用于云存储系统中的存储节点,所述方法包括:当检测到连接新的第一存储设备时,识别所述第一存储设备的类型;根据所述第一存储设备的类型,查找与所述第一存储设备的类型对应的第一目标存储设备库;根据所述第一目标存储设备库,读取保存的上线标准接口,以及与所述第一存储设备的类型对应的上线操作方式,其中,所述第一目标存储设备库中保存有上线标准接口,以及针对每种存储设备的类型对应的上线操作方式;根据读取的所述上线标准接口以及所述上线操作方式,将所述第一存储设备接入所述云存储系统。本申请实施例中,当存储节点检测到连接新的存储设备时,能够根据该存储设备的类型,获得保存的上线标准接口以及与该存储设备的类型对应的上线操作方式,并根据所获得的上线标准接口以及上线操作方式将该存储设备接入云存储系统,实现了存储节点中存储设备的动态接入。The embodiment of the present invention provides a method and an apparatus for dynamically accessing a storage device in a cloud storage system, which are applied to a storage node in a cloud storage system, and the method includes: when detecting a new first storage device, identifying Type of the first storage device; searching for a first target storage device library corresponding to the type of the first storage device according to the type of the first storage device; reading according to the first target storage device library a saved online standard interface, and an online operation mode corresponding to the type of the first storage device, wherein the first target storage device library stores an online standard interface, and an online corresponding to the type of each storage device The first storage device is connected to the cloud storage system according to the read online standard interface and the online operation mode. In the embodiment of the present application, when the storage node detects the connection of the new storage device, the saved online standard interface and the online operation mode corresponding to the type of the storage device can be obtained according to the type of the storage device, and according to the obtained The on-line standard interface and the online operation mode connect the storage device to the cloud storage system to implement dynamic access of the storage device in the storage node.

附图说明DRAWINGS

为了更清楚地说明本申请实施例和现有技术的技术方案,下面对实施例和现有技术中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application and the technical solutions of the prior art, the following description of the embodiments and the drawings used in the prior art will be briefly introduced. Obviously, the drawings in the following description are only Some embodiments of the application may also be used to obtain other figures from those of ordinary skill in the art without departing from the scope of the invention.

图1为本申请实施例提供的一种云存储系统中动态接入存储设备的方法的流程图;FIG. 1 is a flowchart of a method for dynamically accessing a storage device in a cloud storage system according to an embodiment of the present disclosure;

图2为本申请实施例提供的一种云存储系统中动态接入存储设备的方法的另一流程图;FIG. 2 is another flowchart of a method for dynamically accessing a storage device in a cloud storage system according to an embodiment of the present disclosure;

图3为本申请实施例提供的一种云存储系统中移除存储设备的方法的流程图;FIG. 3 is a flowchart of a method for removing a storage device in a cloud storage system according to an embodiment of the present disclosure;

图4为本申请实施例提供的一种云存储系统中移除存储设备的方法的另一流程图;FIG. 4 is another flowchart of a method for removing a storage device in a cloud storage system according to an embodiment of the present disclosure;

图5为本申请实施例提供的一种云存储系统中数据处理方法的流程图; FIG. 5 is a flowchart of a data processing method in a cloud storage system according to an embodiment of the present disclosure;

图6为本申请实施例提供的一种云存储系统中动态接入存储设备的装置的结构示意图;FIG. 6 is a schematic structural diagram of an apparatus for dynamically accessing a storage device in a cloud storage system according to an embodiment of the present disclosure;

图7为本申请实施例提供的一种云存储系统中动态接入存储设备的装置的另一结构示意图;FIG. 7 is another schematic structural diagram of an apparatus for dynamically accessing a storage device in a cloud storage system according to an embodiment of the present disclosure;

图8为本申请实施例提供的一种云存储系统中动态接入存储设备的装置的另一结构示意图;FIG. 8 is another schematic structural diagram of an apparatus for dynamically accessing a storage device in a cloud storage system according to an embodiment of the present disclosure;

图9为本申请实施例提供的一种云存储系统中动态接入存储设备的装置的另一结构示意图;FIG. 9 is another schematic structural diagram of an apparatus for dynamically accessing a storage device in a cloud storage system according to an embodiment of the present disclosure;

图10为本申请实施例提供的一种云存储系统中动态接入存储设备的装置的另一结构示意图。FIG. 10 is another schematic structural diagram of an apparatus for dynamically accessing a storage device in a cloud storage system according to an embodiment of the present disclosure.

具体实施方式detailed description

为了使本领域技术人员更好地理解本申请实施例中的技术方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application are clearly and completely described in the following, in which the technical solutions in the embodiments of the present application are clearly and completely described. The embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.

需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本申请。It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict. The present application will be described in detail below with reference to the accompanying drawings.

为了实现存储节点中存储设备的动态接入,本申请实施例提供了一种云存储系统中动态接入存储设备的方法过程,应用于云存储系统中的存储节点,如图1所示,该过程包括以下步骤:The method for dynamically accessing a storage device in a cloud storage system is applied to a storage node in a cloud storage system, as shown in FIG. 1 . The process includes the following steps:

S101,当检测到连接新的第一存储设备时,识别所述第一存储设备的类型。S101. Identify a type of the first storage device when detecting that a new first storage device is connected.

在实际应用中,云存储设备中的存储节点可以用来存储数据。具体地,存储节点可以利用已接入云存储系统的存储设备来存储数据,该存储设备例如可以是:磁盘、Raid、iScsi设备、FC设备等。In practical applications, storage nodes in a cloud storage device can be used to store data. Specifically, the storage node may use a storage device that has accessed the cloud storage system to store data, such as a disk, a Raid, an iScsi device, an FC device, and the like.

一般情况下,在云存储系统中加入存储节点时,该存储节点中的存储设 备的类型、容量等都已确定。但是,随着存储节点中存储的数据量的增加,该存储节点中存储设备的容量可能会达到其最大负载量,不能存储更多的数据。Generally, when a storage node is added to a cloud storage system, the storage device in the storage node The type, capacity, etc. of the equipment have been determined. However, as the amount of data stored in the storage node increases, the capacity of the storage device in the storage node may reach its maximum load and cannot store more data.

因此,在本申请实施例中,存储节点可以接入新的存储设备,以存储更多的数据。Therefore, in the embodiment of the present application, the storage node can access a new storage device to store more data.

具体地,存储节点可以周期性地(如3毫秒、5毫秒、10毫秒等)检测是否连接了新的第一存储设备,以将该第一存储设备接入云存储系统中。当检测到连接新的第一存储设备时,存储节点可以识别该第一存储设备的类型。上述存储设备的类型例如可以包括:磁盘、Raid、iScsi设备、FC设备等。Specifically, the storage node may detect whether a new first storage device is connected periodically (eg, 3 milliseconds, 5 milliseconds, 10 milliseconds, etc.) to access the first storage device into the cloud storage system. When detecting the connection of the new first storage device, the storage node can identify the type of the first storage device. The types of the foregoing storage devices may include, for example, a disk, a Raid, an iScsi device, an FC device, and the like.

可以理解,针对不同类型的存储设备,存储节点将其接入云存储系统中,可能需要使用不同的接入方式。如果使用与存储设备的类型不对应的接入方式将该存储设备接入云存储系统,可能会导致该存储设备接入失败。因此,当存储节点检测到接入新的第一存储设备时,可以首先识别该第一存储设备的类型,以使用与该第一存储设备对应的接入方式将该第一存储设备接入云存储系统,提高接入的成功率。It can be understood that for different types of storage devices, the storage node accesses the cloud storage system, and may need to use different access methods. If the access device is connected to the cloud storage system using an access method that does not correspond to the type of the storage device, the storage device may fail to access. Therefore, when the storage node detects the access to the new first storage device, the type of the first storage device may be first identified to access the first storage device to the cloud by using an access manner corresponding to the first storage device. Storage system to improve the success rate of access.

需要说明的是,本实施例中的新的第一存储设备可以是相对的概念,即当前时刻,该第一存储设备刚连接到存储节点。而实际情况下,该第一存储设备可能之前没连接到该存储节点过,或者,该第一存储设备之前与该存储节点连接,由于连接不好或其他原因导致连接中断了,之后该第一存储设备重新连接到了该存储节点。It should be noted that the new first storage device in this embodiment may be a relative concept, that is, the current storage device is just connected to the storage node. In actual circumstances, the first storage device may not be connected to the storage node before, or the first storage device is connected to the storage node before, and the connection is interrupted due to poor connection or other reasons, and then the first The storage device is reconnected to the storage node.

另外,该新的第一存储设备可以是之前没有使用过的存储设备,或者,该第一存储设备也可以是在其他云存储系统、其他存储节点、或甚至是其他系统中使用过的存储设备。只要对于当前存储节点来说,该第一存储设备是当前时刻刚连接的,存储节点就确定检测到连接新的第一存储设备了,就会识别该第一存储设备的类型,以将该第一存储设备接入云存储系统。In addition, the new first storage device may be a storage device that has not been used before, or the first storage device may also be a storage device used in other cloud storage systems, other storage nodes, or even other systems. . As long as the current storage device is connected to the current storage node, the storage node determines that the connection of the new first storage device is detected, and identifies the type of the first storage device to A storage device is connected to the cloud storage system.

S102,根据所述第一存储设备的类型,查找与所述第一存储设备的类型对应的第一目标存储设备库。S102. Search for a first target storage device library corresponding to the type of the first storage device according to the type of the first storage device.

在本申请实施例中,由于针对不同类型的存储设备,将其接入云存储系 统时使用的接入方式可能不同,因此,为了将不同类型的存储设备成功地接入云存储系统,存储节点可以预先构建并保存多个存储设备库。In the embodiment of the present application, since it is connected to the cloud storage system for different types of storage devices The access methods used by the system may be different. Therefore, in order to successfully connect different types of storage devices to the cloud storage system, the storage node may pre-build and save multiple storage device libraries.

具体地,存储节点可以针对每种类型的存储设备,构建其对应的存储设备库。并且,针对每种类型的存储设备,其对应的存储设备库中可以保存统一的标准接口,以及与该类型对应的操作方式。上述标准接口和操作方式可以包括需要对存储设备执行的所有类型的操作对应的标准接口和操作方式,例如,可以包括:上线标准接口和操作方式、格式化标准接口和操作方式、下线标准接口和操作方式等。Specifically, the storage node can build its corresponding storage device library for each type of storage device. Moreover, for each type of storage device, a unified standard interface and an operation mode corresponding to the type can be saved in the corresponding storage device library. The standard interface and the operation mode may include standard interfaces and operation modes corresponding to all types of operations performed on the storage device. For example, the method may include: an online standard interface and an operation mode, a formatted standard interface and an operation mode, and a downlink standard interface. And operation methods, etc.

可选地,为了将各存储设备库与各类型的存储设备相对应,可以为各存储设备库添加标识信息。例如,针对每个存储设备库,可以将其标识信息设置为该存储设备库对应的存储设备的类型标识。Optionally, in order to correspond each storage device library with each type of storage device, identification information may be added for each storage device library. For example, for each storage device library, its identification information may be set to the type identification of the storage device corresponding to the storage device library.

因此,在本申请实施例中,当存储节点检测到连接新的第一存储设备并识别该第一存储设备的类型后,可以根据该第一存储设备的类型,查找与该第一存储设备的类型对应的目标存储设备库,以根据该目标存储设备库中的上线标准接口和上线操作方式将该第一存储设备接入云存储系统。Therefore, in the embodiment of the present application, after the storage node detects the connection of the new first storage device and identifies the type of the first storage device, the storage node may search for the first storage device according to the type of the first storage device. The target storage device library corresponding to the type, the first storage device is connected to the cloud storage system according to the online standard interface and the online operation mode in the target storage device library.

具体地,当使用各存储设备的类型标识作为各存储设备库的标识信息时,存储节点在查找与第一存储设备的类型对应的目标存储设备库时,可以识别各存储设备库的标识信息,并将标识信息为该第一存储设备的类型标识的存储设备库确定为与该第一存储设备的类型对应的目标存储设备库。Specifically, when the type identifier of each storage device is used as the identifier information of each storage device library, when the storage node searches for the target storage device library corresponding to the type of the first storage device, the storage node may identify the identification information of each storage device library. And determining, by the storage device library whose identification information is the type identifier of the first storage device, a target storage device library corresponding to the type of the first storage device.

S103,根据所述第一目标存储设备库,读取保存的上线标准接口,以及与所述第一存储设备的类型对应的上线操作方式。S103. Read the saved online standard interface according to the first target storage device library, and an online operation mode corresponding to the type of the first storage device.

当存储节点查找到与第一存储设备的类型对应的目标存储设备库后,可以根据该目标存储设备库,读取保存的上线标准接口,以及与该第一存储设备的类型对应的上线操作方式,以根据该上线标准接口和上线操作方式将该第一存储设备接入云存储系统。After the storage node finds the target storage device library corresponding to the type of the first storage device, the storage online device may be read, and the saved online standard interface and the online operation mode corresponding to the type of the first storage device may be read. The first storage device is connected to the cloud storage system according to the online standard interface and the online operation mode.

S104,根据读取的所述上线标准接口以及所述上线操作方式,将所述第一存储设备接入所述云存储系统。S104. The first storage device is connected to the cloud storage system according to the read online standard interface and the online operation mode.

读取到上线标准接口和上线操作方式后,存储节点可以根据该上线标准 接口和上线操作方式,将该第一存储设备接入云存储系统。将第一存储设备接入云存储系统后,存储节点即可使用该第一存储设备来存储数据。After reading the online standard interface and the online operation mode, the storage node can be based on the online standard. The first storage device is connected to the cloud storage system by using the interface and the online operation mode. After the first storage device is connected to the cloud storage system, the storage node can use the first storage device to store data.

本申请实施例中,当存储节点检测到连接新的存储设备时,能够根据该存储设备的类型,获得保存的上线标准接口以及与该存储设备的类型对应的上线操作方式,并根据所获得的上线标准接口以及上线操作方式将该存储设备接入云存储系统,实现了存储节点中存储设备的动态接入。In the embodiment of the present application, when the storage node detects the connection of the new storage device, the saved online standard interface and the online operation mode corresponding to the type of the storage device can be obtained according to the type of the storage device, and according to the obtained The on-line standard interface and the online operation mode connect the storage device to the cloud storage system to implement dynamic access of the storage device in the storage node.

更进一步的,如图2所示,本申请实施例所提供的一种云存储系统中动态接入存储设备的方法,在步骤S104之前还可以包括:Further, as shown in FIG. 2, the method for dynamically accessing a storage device in a cloud storage system provided by the embodiment of the present application may further include:

S105,根据所述第一存储设备中保存的其自身的格式化标识信息,判断所述第一存储设备是否在所述云存储系统中被格式化过;如果是,执行步骤S106,否则,执行步骤S107。S105: Determine, according to the formatted identification information saved in the first storage device, whether the first storage device is formatted in the cloud storage system; if yes, execute step S106; otherwise, execute Step S107.

如上所述,存储节点检测到的连接的新的第一存储设备可以之前没连接到该存储节点过,或者,该第一存储设备之前与该存储节点连接,由于连接不好或其他原因导致连接中断了,之后该第一存储设备重新连接到了该存储节点。另外,该新的第一存储设备可以是之前没有使用过的存储设备,或者,该第一存储设备也可以是在其他云存储系统、其他存储节点、或甚至是其他系统中使用过的存储设备。As described above, the new first storage device of the connection detected by the storage node may not be connected to the storage node before, or the first storage device is previously connected to the storage node, and the connection is caused due to poor connection or other reasons. Interrupted, after which the first storage device is reconnected to the storage node. In addition, the new first storage device may be a storage device that has not been used before, or the first storage device may also be a storage device used in other cloud storage systems, other storage nodes, or even other systems. .

因此,存储节点检测到的连接的新的第一存储设备中可能已存储有数据,也可能没有存储数据。并且,当第一存储设备中存储有数据时,该数据可能是云存储系统中的数据,也可能不是云存储系统中的数据。Therefore, data may or may not be stored in the new first storage device of the connection detected by the storage node. Moreover, when data is stored in the first storage device, the data may be data in the cloud storage system or may not be data in the cloud storage system.

在本申请实施例中,为了保证存储节点中接入的存储设备中存储的数据均为云存储系统中的数据,存储节点在将未接入过云存储系统的存储设备接入云存储系统之前,可以首先将该存储设备格式化。并且,只有在该云存储系统中被格式化的存储设备才可以接入该云存储系统并进行数据存储。在该云存储系统中未被格式化的存储设备不会接入该云存储系统,因此,也就不会存储该云存储系统中的数据。In the embodiment of the present application, in order to ensure that the data stored in the storage device accessed by the storage node is the data in the cloud storage system, the storage node accesses the storage device that has not accessed the cloud storage system before accessing the cloud storage system. You can format the storage device first. Moreover, only the storage device formatted in the cloud storage system can access the cloud storage system and perform data storage. The unformatted storage device in the cloud storage system does not access the cloud storage system, and therefore, the data in the cloud storage system is not stored.

在本申请实施例中,在每个存储设备中可以保存有其自身的格式化标识 信息。具体地,针对每个存储设备,其格式化标识信息可以包括其被格式化时所在的系统的标识信息、格式化时间等信息。In the embodiment of the present application, each format identifier of the storage device can be saved in each storage device. information. Specifically, for each storage device, the formatted identification information may include information such as identification information, formatting time, and the like of the system in which it is formatted.

因此,在本申请实施例中,在将第一存储设备接入云存储系统之前,存储节点可以根据该第一存储设备中保存的其自身的格式化标识信息,判断该第一存储设备是否在该云存储系统中被格式化过。例如,可以在第一存储设备的格式化标识信息中,查找该存储节点所在云存储系统的标识信息,若查找到,则可以表明该第一存储设备在该云存储系统中被格式化过,若未查找到,则可以表明该第一存储设备在该云存储系统中未被格式化过。Therefore, in the embodiment of the present application, before the first storage device is connected to the cloud storage system, the storage node may determine, according to its own formatted identification information saved in the first storage device, whether the first storage device is The cloud storage system has been formatted. For example, in the formatted identification information of the first storage device, the identifier information of the cloud storage system where the storage node is located may be searched. If found, the first storage device may be formatted in the cloud storage system. If not found, it can be indicated that the first storage device is not formatted in the cloud storage system.

可以理解,若第一存储设备在该云存储系统中被格式化过,则可以表明该第一存储设备之前接入过该云存储系统,当前重新连接可能是因为连接不好等原因导致的掉线后重连。因此,该第一存储设备中可能存储有云存储系统中的数据,这种情况下,可以执行步骤S106,在存储节点中创建该第一存储设备的索引信息,以重新使用该第一存储设备来存储数据。It can be understood that if the first storage device is formatted in the cloud storage system, it may indicate that the first storage device has previously accessed the cloud storage system, and the current reconnection may be caused by a bad connection or the like. Reconnect after the line. Therefore, the data in the cloud storage system may be stored in the first storage device. In this case, step S106 may be performed to create index information of the first storage device in the storage node to reuse the first storage device. To store data.

若第一存储设备在该云存储系统中未被格式化过,则可以表明该第一存储设备之前未接入过该云存储系统,当前接入为该第一存储设备第一次接入该云存储系统,这种情况下,可以执行步骤S107,输出对该第一存储设备进行格式化的提示信息,以对该第一存储设备进行格式化,进一步地将其接入该云存储系统。If the first storage device is not formatted in the cloud storage system, it may indicate that the first storage device has not accessed the cloud storage system before, and the current access is the first time that the first storage device accesses the cloud storage system. In the case of the cloud storage system, in step S107, the prompting information for formatting the first storage device may be output to format the first storage device and further access the cloud storage system.

S106,在所述存储节点中创建所述第一存储设备的索引信息。S106. Create index information of the first storage device in the storage node.

若第一存储设备在该云存储系统中被格式化过,则可以在存储节点中创建该第一存储设备的索引信息,以重新使用该第一存储设备来存储数据。上述索引信息例如可以为第一存储设备中存储的数据的关键信息。If the first storage device is formatted in the cloud storage system, index information of the first storage device may be created in the storage node to reuse the first storage device to store data. The above index information may be, for example, key information of data stored in the first storage device.

需要说明的是,在本步骤中存储节点创建第一存储设备的索引信息时,可以采用现有技术已有的任一方法,本申请对此不作限定。It should be noted that, in this step, when the storage node creates the index information of the first storage device, any method existing in the prior art may be used, which is not limited in this application.

S107,输出对所述第一存储设备进行格式化的提示信息。S107. Output prompt information for formatting the first storage device.

若第一存储设备在该云存储系统中未被格式化过,则可以输出对该第一存储设备进行格式化的提示信息,以根据用户输入的指令进行相应的操作。 If the first storage device is not formatted in the cloud storage system, the prompt information for formatting the first storage device may be output to perform corresponding operations according to an instruction input by the user.

在本申请实施例中,对第一存储设备进行格式化时,可以首先输出对该第一存储设备进行格式化的提示信息,以由用户进行确认是否对该第一存储设备进行格式化,以避免直接格式化造成的误删除第一存储设备中的数据。In the embodiment of the present application, when the first storage device is formatted, the prompt information for formatting the first storage device may be first output, so that the user confirms whether to format the first storage device, Avoid accidentally deleting data in the first storage device caused by direct formatting.

S108,当接收到用户输入的格式化所述第一存储设备的指令时,从所述第一目标存储设备库中,读取保存的格式化标准接口,以及与所述第一存储设备的类型对应的格式化操作方式。S108, when receiving an instruction input by the user to format the first storage device, reading the saved formatting standard interface from the first target storage device library, and the type of the first storage device The corresponding format operation mode.

当接收到用户输入的格式化该第一存储设备的指令时,表明用户确认可以对该第一存储设备进行格式化。这种情况下,存储节点可以从第一目标存储设备库中,读取保存的格式化标准接口,以及与该第一存储设备的类型对应的格式化操作方式,以保证对该第一存储设备成功地进行格式化。When an instruction input by the user to format the first storage device is received, it indicates that the user confirms that the first storage device can be formatted. In this case, the storage node may read the saved format standard interface from the first target storage device library, and a format operation mode corresponding to the type of the first storage device to ensure that the first storage device is Successfully formatted.

S109,根据读取的所述格式化标准接口以及所述格式化操作方式,将所述第一存储设备格式化。S109. Format the first storage device according to the formatted standard interface read and the formatting operation mode.

读取到格式化标准接口和格式化操作方式后,存储节点可以根据该格式化标准接口和格式化操作方式,将该第一存储设备格式化。将第一存储设备格式化后,存储节点即可将该第一存储设备接入云存储系统。After reading the formatted standard interface and the formatted operation mode, the storage node can format the first storage device according to the formatted standard interface and the formatted operation mode. After the first storage device is formatted, the storage node can access the first storage device to the cloud storage system.

本方案中,在将存储设备接入云存储系统之前,可以首先判断该存储设备是否在该云存储系统中被格式化过,若是,则在存储节点中创建该存储设备的索引信息后,将该存储设备接入该云存储系统;否则,首先将该存储设备格式化,再将其接入云存储系统,能够保证在存储设备中存储的数据均为该云存储系统中的数据。In this solution, before the storage device is connected to the cloud storage system, the storage device may be first formatted in the cloud storage system. If yes, after the index information of the storage device is created in the storage node, The storage device is connected to the cloud storage system; otherwise, the storage device is formatted and then connected to the cloud storage system to ensure that the data stored in the storage device is data in the cloud storage system.

在本申请所提供的上述实施例的基础上,本申请实施例还提供了对应的云存储系统中移除存储设备的方法过程,应用于云存储系统中的存储节点,如图3所示,该过程包括以下步骤:On the basis of the foregoing embodiments provided by the present application, the method of the present application further provides a method for removing a storage device in a corresponding cloud storage system, and is applied to a storage node in the cloud storage system, as shown in FIG. 3 . The process includes the following steps:

S301,当检测到第二存储设备下线时,识别所述第二存储设备的类型。S301. Identify a type of the second storage device when detecting that the second storage device goes offline.

在本申请实施例中,存储节点可以动态接入存储设备,因此,存储节点也可以移除其接入的存储设备。例如,当存储设备与存储节点间连接不好或 用户手动将存储设备从存储节点中下线时,存储节点可以将该存储设备移除。In the embodiment of the present application, the storage node can dynamically access the storage device, and therefore, the storage node can also remove the storage device accessed by the storage node. For example, when the storage device is not connected well to the storage node or When the user manually disconnects the storage device from the storage node, the storage node can remove the storage device.

具体地,存储节点可以周期性地(如3毫秒、5毫秒、10毫秒等)检测是否存在第二存储设备下线,以将该第二存储设备从云存储系统中移除。当检测到存在第二存储设备下线时,存储节点可以识别该第二存储设备的类型。上述存储设备的类型例如可以包括:磁盘、Raid、iScsi设备、FC设备等。Specifically, the storage node may periodically detect (eg, 3 milliseconds, 5 milliseconds, 10 milliseconds, etc.) whether there is a second storage device offline to remove the second storage device from the cloud storage system. When it is detected that the second storage device is offline, the storage node can identify the type of the second storage device. The types of the foregoing storage devices may include, for example, a disk, a Raid, an iScsi device, an FC device, and the like.

需要说明的是,本申请实施例中的第一存储设备和第二存储设备可以是相同的存储设备,也可以是不同的存储设备。It should be noted that the first storage device and the second storage device in the embodiment of the present application may be the same storage device or different storage devices.

S302,根据所述第二存储设备的类型,查找与所述第二存储设备的类型对应的第二目标存储设备库。S302. Search for a second target storage device library corresponding to the type of the second storage device according to the type of the second storage device.

在本申请实施例中,当存储节点检测到存在第二存储设备下线并识别该第二存储设备的类型后,可以根据该第二存储设备的类型,查找与该第二存储设备的类型对应的目标存储设备库,以根据该目标存储设备库中的下线标准接口和下线操作方式将该第二存储设备从云存储系统中移除。In the embodiment of the present application, after the storage node detects that the second storage device is offline and identifies the type of the second storage device, the storage device may search for the type of the second storage device according to the type of the second storage device. The target storage device library is configured to remove the second storage device from the cloud storage system according to the offline standard interface and the offline operation mode in the target storage device library.

具体地,当使用各存储设备的类型标识作为各存储设备库的标识信息时,存储节点在查找与第二存储设备的类型对应的目标存储设备库时,可以识别各存储设备库的标识信息,并将标识信息为该第二存储设备的类型标识的存储设备库确定为与该第二存储设备的类型对应的目标存储设备库。Specifically, when the type identifier of each storage device is used as the identifier information of each storage device library, when the storage node searches for the target storage device library corresponding to the type of the second storage device, the storage node may identify the identification information of each storage device library. And determining, by the storage device library whose identification information is the type identifier of the second storage device, a target storage device library corresponding to the type of the second storage device.

S303,根据所述第二目标存储设备库,读取保存的下线标准接口,以及与所述第二存储设备的类型对应的下线操作方式。S303. Read the saved offline standard interface according to the second target storage device library, and the offline operation mode corresponding to the type of the second storage device.

当存储节点查找到与第二存储设备的类型对应的目标存储设备库后,可以根据该目标存储设备库,读取保存的下线标准接口,以及与该第二存储设备的类型对应的下线操作方式,以根据该下线标准接口和下线操作方式将该第二存储设备从云存储系统中移除。After the storage node finds the target storage device library corresponding to the type of the second storage device, the saved offline standard interface and the offline line corresponding to the type of the second storage device may be read according to the target storage device library. The operation mode is to remove the second storage device from the cloud storage system according to the offline standard interface and the offline operation mode.

S304,根据读取的所述下线标准接口以及所述下线操作方式,将所述第二存储设备从所述云存储系统中移除。S304. The second storage device is removed from the cloud storage system according to the read offline standard interface and the offline operation mode.

读取到下线标准接口和下线操作方式后,存储节点可以根据该下线标准接口和下线操作方式,将该第二存储设备从云存储系统中移除。 After the offline standard interface and the offline operation mode are read, the storage node can remove the second storage device from the cloud storage system according to the offline standard interface and the offline operation mode.

本申请实施例中,当存储节点检测到存储设备下线时,能够根据该存储设备的类型,获得保存的下线标准接口以及与该存储设备的类型对应的下线操作方式,并根据所获得的下线标准接口以及下线操作方式将该存储设备从云存储系统中移除,实现了存储节点中存储设备的动态移除。In the embodiment of the present application, when the storage node detects that the storage device is offline, the saved offline standard interface and the offline operation mode corresponding to the type of the storage device can be obtained according to the type of the storage device, and obtained according to the obtained The offline standard interface and the offline operation mode remove the storage device from the cloud storage system, and implement dynamic removal of the storage device in the storage node.

更进一步的,如图4所示,本申请实施例所提供的一种云存储系统中移除存储设备的方法,在步骤S304之前还可以包括:Further, as shown in FIG. 4, the method for removing the storage device in the cloud storage system provided by the embodiment of the present application may further include:

S305,判断所述第二存储设备是否在所述云存储系统中被格式化过;如果是,停止当前对所述第二存储设备的所有操作,删除所述存储节点中保存的所述第二存储设备的索引信息,并进行将所述第二存储设备从所述云存储系统中移除的步骤。S305. Determine whether the second storage device is formatted in the cloud storage system. If yes, stop all operations currently performed on the second storage device, and delete the second saved in the storage node. Storing index information of the device and performing the step of removing the second storage device from the cloud storage system.

在存储节点中接入的各个存储设备都可以用来处理数据处理请求,因此,在本实施例中,存储节点在将存储设备从云存储系统中移除时,如果该存储设备存在未处理完的数据处理请求,则直接将该存储设备从云存储系统中移除可能导致该数据处理请求失败,造成数据丢失等后果。The storage device can be used to process the data processing request. Therefore, in the embodiment, when the storage node removes the storage device from the cloud storage system, if the storage device exists unprocessed If the data processing request is removed, directly removing the storage device from the cloud storage system may cause the data processing request to fail, resulting in data loss and the like.

如上所述,存储设备在第一次接入云存储系统时,只有在该云存储系统中被格式化的存储设备才可以接入该云存储系统并处理数据处理请求。As described above, when the storage device accesses the cloud storage system for the first time, only the storage device formatted in the cloud storage system can access the cloud storage system and process the data processing request.

因此,在本申请实施例中,存储节点在将第二存储设备从云存储系统中移除之前,可以首先判断该第二存储设备是否在该云存储系统中被格式化过。如果是,则表明该第二存储设备已经成功接入了该云存储系统,该第二存储设备可能存在未处理完的数据处理请求。这种情况下,存储节点可以停止当前对该第二存储设备的所有操作,并删除存储节点中保存的该第二存储设备的索引信息,之后再进行将该第二存储设备从该云存储系统中移除的步骤。Therefore, in the embodiment of the present application, before the storage node removes the second storage device from the cloud storage system, the storage node may first determine whether the second storage device is formatted in the cloud storage system. If yes, it indicates that the second storage device has successfully accessed the cloud storage system, and the second storage device may have an unprocessed data processing request. In this case, the storage node may stop all operations on the second storage device, and delete the index information of the second storage device saved in the storage node, and then perform the second storage device from the cloud storage system. The steps to remove.

本方案中,在将存储设备从云存储系统中移除之前,可以首先判断该存储设备是否在该云存储系统中被格式化过,如果是,则停止当前对该存储设备的所有操作,并删除存储节点中保存的该存储设备的索引信息,之后再进行将该存储设备从该云存储系统中移除的步骤,能够保证云存储系统中的数据安全。 In this solution, before the storage device is removed from the cloud storage system, it may be first determined whether the storage device is formatted in the cloud storage system, and if so, all operations currently performed on the storage device are stopped, and The step of deleting the index information of the storage device saved in the storage node and then removing the storage device from the cloud storage system ensures data security in the cloud storage system.

在本申请所提供的上述实施例的基础上,本申请实施例还提供了对应的云存储系统中数据处理方法过程,应用于云存储系统中的存储节点,如图5所示,该过程包括以下步骤:On the basis of the foregoing embodiments provided by the present application, the embodiment of the present application further provides a data processing method in a corresponding cloud storage system, which is applied to a storage node in a cloud storage system, as shown in FIG. 5, where the process includes The following steps:

S501,当确定第三存储设备存在待处理的数据处理请求时,识别所述第三存储设备的类型,并根据所述第三存储设备的类型,查找与所述第三存储设备的类型对应的第三目标存储设备库。S501, when it is determined that the third storage device has a data processing request to be processed, identifying a type of the third storage device, and searching for a type corresponding to the type of the third storage device according to the type of the third storage device The third target storage device library.

在云存储系统中,当接收到数据处理请求,如数据读取请求、数据写入请求时,管理节点可以为该数据处理请求分配一个或多个存储设备,以对该数据处理请求进行处理。In the cloud storage system, when receiving a data processing request, such as a data read request or a data write request, the management node may allocate one or more storage devices for the data processing request to process the data processing request.

管理节点为数据处理请求分配存储设备时,可以采用现有的任一种方法,如,可以根据负载均衡原则为数据处理请求分配存储设备,本申请对此不再赘述。When the management node allocates the storage device for the data processing request, any existing method may be used. For example, the storage device may be allocated for the data processing request according to the load balancing principle, which is not described in this application.

在本申请实施例中,由于存储节点中的存储设备可以为不同类型的存储设备,而对于不同类型的存储设备,其处理数据处理请求时,可能需要不同的数据处理方式。如果使用与存储设备的类型不对应的数据处理方式对该存储设备待处理的数据处理请求进行处理,可能会导致该数据处理请求处理失败。In the embodiment of the present application, since the storage devices in the storage node may be different types of storage devices, when processing data processing requests for different types of storage devices, different data processing methods may be required. If the data processing request to be processed by the storage device is processed by using a data processing manner that does not correspond to the type of the storage device, the data processing request processing may be failed.

因此,在本申请实施例中,当确定第三存储设备存在待处理的数据处理请求时,存储节点可以首先识别该第三存储设备的类型,并根据该第三存储设备的类型,查找与该第三存储设备的类型对应的目标存储设备库。Therefore, in the embodiment of the present application, when it is determined that the third storage device has a data processing request to be processed, the storage node may first identify the type of the third storage device, and according to the type of the third storage device, look up and A target storage device library corresponding to the type of the third storage device.

上述存储设备的类型例如可以包括:磁盘、Raid、iScsi设备、FC设备等。具体地,当使用各存储设备的类型标识作为各存储设备库的标识信息时,存储节点在查找与第三存储设备的类型对应的目标存储设备库时,可以识别各存储设备库的标识信息,并将标识信息为该第三存储设备的类型标识的存储设备库确定为与该第三存储设备的类型对应的目标存储设备库。The types of the foregoing storage devices may include, for example, a disk, a Raid, an iScsi device, an FC device, and the like. Specifically, when the type identifier of each storage device is used as the identifier information of each storage device library, when the storage node searches for the target storage device library corresponding to the type of the third storage device, the storage node may identify the identification information of each storage device library. And determining, by the storage device library whose identification information is the type identifier of the third storage device, a target storage device library corresponding to the type of the third storage device.

需要说明的是,本申请实施例中的第一存储设备、第二存储设备和第三存储设备可以是相同的存储设备,也可以是不同的存储设备。 It should be noted that the first storage device, the second storage device, and the third storage device in the embodiment of the present application may be the same storage device or different storage devices.

S502,根据所述第三目标存储设备库,读取保存的数据处理标准接口,以及与所述第三存储设备的类型对应的数据处理操作方式。S502. Read the saved data processing standard interface according to the third target storage device library, and a data processing operation manner corresponding to the type of the third storage device.

当存储节点查找到与第三存储设备的类型对应的目标存储设备库后,可以根据该目标存储设备库,读取保存的数据处理标准接口,以及与该第三存储设备的类型对应的数据处理操作方式,以根据该数据处理标准接口和数据处理操作方式处理该待处理的数据处理请求。After the storage node finds the target storage device library corresponding to the type of the third storage device, the saved data processing standard interface and the data processing corresponding to the type of the third storage device may be read according to the target storage device library. The operation mode is to process the data processing request to be processed according to the data processing standard interface and the data processing operation mode.

S503,根据读取的所述数据处理标准接口以及所述数据处理操作方式,对所述数据处理请求进行处理。S503. Process the data processing request according to the read data processing standard interface and the data processing operation mode.

读取到数据处理标准接口和数据处理操作方式后,存储节点可以根据该数据处理标准接口和数据处理操作方式,处理该待处理的数据处理请求。After reading the data processing standard interface and the data processing operation mode, the storage node may process the data processing request to be processed according to the data processing standard interface and the data processing operation mode.

具体地,上述数据处理标准接口可以包括打开对象块、读对象块内容、写对象块内容以及关闭对象块。针对不同类型的存储设备,对应的数据处理操作方式可以为:对于无文件系统的祼设备,可以将针对对象块的操作映射成对该设备指定位置的操作;对于有文件系统的设备,可以将对对象块的操作映射成对该设备中指定文件的操作。Specifically, the above data processing standard interface may include opening an object block, reading the object block content, writing the object block content, and closing the object block. For a different type of storage device, the corresponding data processing operation mode may be: for a device without a file system, the operation for the object block may be mapped to the operation of specifying the location of the device; for the device with the file system, The operation of the object block is mapped to the operation of the specified file in the device.

本申请实施例中,当存储节点检测到存储设备存在待处理的数据处理请求时,能够根据该存储设备的类型,获得保存的数据处理标准接口以及与该存储设备的类型对应的数据处理操作方式,并根据所获得的数据处理标准接口以及数据处理操作方式处理该待处理的数据处理请求,提高了云存储系统中数据处理请求处理的成功率。In the embodiment of the present application, when the storage node detects that the storage device has a data processing request to be processed, the storage data processing standard interface and the data processing operation manner corresponding to the type of the storage device can be obtained according to the type of the storage device. And processing the to-be-processed data processing request according to the obtained data processing standard interface and the data processing operation manner, thereby improving the success rate of the data processing request processing in the cloud storage system.

相应于上面的方法实施例,本申请实施例还提供了相应的装置实施例。Corresponding to the above method embodiment, the embodiment of the present application also provides a corresponding device embodiment.

图6为本申请实施例提供的一种云存储系统中动态接入存储设备的装置,应用于云存储系统中的存储节点,所述装置包括:FIG. 6 is a device for dynamically accessing a storage device in a cloud storage system according to an embodiment of the present disclosure, which is applied to a storage node in a cloud storage system, where the device includes:

第一识别模块610,用于当检测到连接新的第一存储设备时,识别所述第一存储设备的类型;The first identifying module 610 is configured to identify a type of the first storage device when detecting a new first storage device;

第一查找模块620,用于根据所述第一存储设备的类型,查找与所述第一 存储设备的类型对应的第一目标存储设备库;The first searching module 620 is configured to search for the first one according to the type of the first storage device. a first target storage device library corresponding to the type of the storage device;

第一读取模块630,用于根据所述第一目标存储设备库,读取保存的上线标准接口,以及与所述第一存储设备的类型对应的上线操作方式,其中,所述第一目标存储设备库中保存有上线标准接口,以及针对每种存储设备的类型对应的上线操作方式;The first reading module 630 is configured to read the saved online standard interface according to the first target storage device library, and an online operation mode corresponding to the type of the first storage device, where the first target The storage device library stores an online standard interface, and an online operation mode corresponding to the type of each storage device;

接入模块640,用于根据所述第一读取模块读取的所述上线标准接口以及所述上线操作方式,将所述第一存储设备接入所述云存储系统。The access module 640 is configured to access the first storage device to the cloud storage system according to the online standard interface read by the first reading module and the online operation mode.

本申请实施例中,当存储节点检测到连接新的存储设备时,能够根据该存储设备的类型,获得保存的上线标准接口以及与该存储设备的类型对应的上线操作方式,并根据所获得的上线标准接口以及上线操作方式将该存储设备接入云存储系统,实现了存储节点中存储设备的动态接入。In the embodiment of the present application, when the storage node detects the connection of the new storage device, the saved online standard interface and the online operation mode corresponding to the type of the storage device can be obtained according to the type of the storage device, and according to the obtained The on-line standard interface and the online operation mode connect the storage device to the cloud storage system to implement dynamic access of the storage device in the storage node.

进一步地,如图7所示,本实施例提供的云存储系统中动态接入存储设备的装置还包括:Further, as shown in FIG. 7, the apparatus for dynamically accessing a storage device in the cloud storage system provided by this embodiment further includes:

第一判断模块650,用于在所述接入模块640将所述第一存储设备接入所述云存储系统之前,根据所述第一存储设备中保存的其自身的格式化标识信息,判断所述第一存储设备是否在所述云存储系统中被格式化过;The first determining module 650 is configured to determine, according to the formatted identification information saved in the first storage device, before the accessing module 640 accesses the first storage device to the cloud storage system Whether the first storage device is formatted in the cloud storage system;

创建模块660,用于当所述第一判断模块650判断结果为是时,在所述存储节点中创建所述第一存储设备的索引信息;a creating module 660, configured to: when the first determining module 650 determines that the result is yes, create index information of the first storage device in the storage node;

输出模块670,用于当所述第一判断模块650判断结果为否时,输出对所述第一存储设备进行格式化的提示信息。The output module 670 is configured to output prompt information for formatting the first storage device when the first determining module 650 determines that the result is negative.

进一步地,所述装置还包括:Further, the device further includes:

第二读取模块680,用于在所述输出模块670输出对所述第一存储设备进行格式化的提示信息后,当接收到用户输入的格式化所述第一存储设备的指令时,从所述第一目标存储设备库中,读取保存的格式化标准接口,以及与所述第一存储设备的类型对应的格式化操作方式;a second reading module 680, configured to: after the output module 670 outputs the prompt information for formatting the first storage device, when receiving an instruction input by the user to format the first storage device, Reading, in the first target storage device library, a saved formatting standard interface, and a format operation mode corresponding to the type of the first storage device;

格式化模块690,用于根据读取的所述格式化标准接口以及所述格式化操 作方式,将所述第一存储设备格式化。a formatting module 690 for formatting the standard interface according to the reading and the formatting operation In a manner, the first storage device is formatted.

本方案中,在将存储设备接入云存储系统之前,可以首先判断该存储设备是否在该云存储系统中被格式化过,若是,则在存储节点中创建该存储设备的索引信息后,将该存储设备接入该云存储系统;否则,首先将该存储设备格式化,再将其接入云存储系统,能够保证在存储设备中存储的数据均为该云存储系统中的数据。In this solution, before the storage device is connected to the cloud storage system, the storage device may be first formatted in the cloud storage system. If yes, after the index information of the storage device is created in the storage node, The storage device is connected to the cloud storage system; otherwise, the storage device is formatted and then connected to the cloud storage system to ensure that the data stored in the storage device is data in the cloud storage system.

进一步地,如图8所示,本实施例提供的云存储系统中动态接入存储设备的装置还包括:Further, as shown in FIG. 8, the device for dynamically accessing the storage device in the cloud storage system provided by the embodiment further includes:

第二识别模块810,用于当检测到第二存储设备下线时,识别所述第二存储设备的类型;a second identification module 810, configured to identify a type of the second storage device when detecting that the second storage device is offline;

第二查找模块820,用于根据所述第二存储设备的类型,查找与所述第二存储设备的类型对应的第二目标存储设备库;The second searching module 820 is configured to search, according to the type of the second storage device, a second target storage device library corresponding to the type of the second storage device;

第三读取模块830,用于根据所述第二目标存储设备库,读取保存的下线标准接口,以及与所述第二存储设备的类型对应的下线操作方式;The third reading module 830 is configured to read the saved offline standard interface according to the second target storage device library, and an offline operation mode corresponding to the type of the second storage device;

移除模块840,用于根据所述第三读取模块读取的所述下线标准接口以及所述下线操作方式,将所述第二存储设备从所述云存储系统中移除。The removing module 840 is configured to remove the second storage device from the cloud storage system according to the offline standard interface read by the third reading module and the offline operation mode.

本申请实施例中,当存储节点检测到存储设备下线时,能够根据该存储设备的类型,获得保存的下线标准接口以及与该存储设备的类型对应的下线操作方式,并根据所获得的下线标准接口以及下线操作方式将该存储设备从云存储系统中移除,实现了存储节点中存储设备的动态移除。In the embodiment of the present application, when the storage node detects that the storage device is offline, the saved offline standard interface and the offline operation mode corresponding to the type of the storage device can be obtained according to the type of the storage device, and obtained according to the obtained The offline standard interface and the offline operation mode remove the storage device from the cloud storage system, and implement dynamic removal of the storage device in the storage node.

进一步地,如图9所示,本实施例提供的云存储系统中动态接入存储设备的装置还包括:Further, as shown in FIG. 9, the apparatus for dynamically accessing a storage device in the cloud storage system provided by this embodiment further includes:

第二判断模块850,用于在所述移除模块将所述第二存储设备从所述云存储系统中移除之前,判断所述第二存储设备是否在所述云存储系统中被格式化过; a second determining module 850, configured to determine, before the removing module removes the second storage device from the cloud storage system, whether the second storage device is formatted in the cloud storage system Over

执行模块860,用于当所述第二判断模块判断结果为是时,停止当前对所述第二存储设备的所有操作,删除所述存储节点中保存的所述第二存储设备的索引信息,并触发所述移除模块。The execution module 860 is configured to: when the second determination module determines that the result is YES, stop all operations currently performed on the second storage device, and delete index information of the second storage device saved in the storage node, And triggering the removal module.

本方案中,在将存储设备从云存储系统中移除之前,可以首先判断该存储设备是否在该云存储系统中被格式化过,如果是,则停止当前对该存储设备的所有操作,并删除存储节点中保存的该存储设备的索引信息,之后再进行将该存储设备从该云存储系统中移除的步骤,能够保证云存储系统中的数据安全。In this solution, before the storage device is removed from the cloud storage system, it may be first determined whether the storage device is formatted in the cloud storage system, and if so, all operations currently performed on the storage device are stopped, and The step of deleting the index information of the storage device saved in the storage node and then removing the storage device from the cloud storage system ensures data security in the cloud storage system.

进一步地,如图10所示,本实施例提供的云存储系统中动态接入存储设备的装置还包括:Further, as shown in FIG. 10, the apparatus for dynamically accessing a storage device in the cloud storage system provided by this embodiment further includes:

第三识别模块1010,用于当确定第三存储设备存在待处理的数据处理请求时,识别所述第三存储设备的类型,并根据所述第三存储设备的类型,查找与所述第三存储设备的类型对应的第三目标存储设备库;The third identification module 1010 is configured to identify a type of the third storage device when determining that the third storage device has a data processing request to be processed, and search for the third device according to the type of the third storage device. a third target storage device library corresponding to the type of the storage device;

第四读取模块1020,用于根据所述第三目标存储设备库,读取保存的数据处理标准接口,以及与所述第三存储设备的类型对应的数据处理操作方式;The fourth reading module 1020 is configured to read the saved data processing standard interface according to the third target storage device library, and a data processing operation manner corresponding to the type of the third storage device;

处理模块1030,用于根据所述第四读取模块读取的所述数据处理标准接口以及所述数据处理操作方式,对所述数据处理请求进行处理。The processing module 1030 is configured to process the data processing request according to the data processing standard interface read by the fourth reading module and the data processing operation mode.

本申请实施例中,当存储节点检测到存储设备存在待处理的数据处理请求时,能够根据该存储设备的类型,获得保存的数据处理标准接口以及与该存储设备的类型对应的数据处理操作方式,并根据所获得的数据处理标准接口以及数据处理操作方式处理该待处理的数据处理请求,提高了云存储系统中数据处理请求处理的成功率。In the embodiment of the present application, when the storage node detects that the storage device has a data processing request to be processed, the storage data processing standard interface and the data processing operation manner corresponding to the type of the storage device can be obtained according to the type of the storage device. And processing the to-be-processed data processing request according to the obtained data processing standard interface and the data processing operation manner, thereby improving the success rate of the data processing request processing in the cloud storage system.

相应的,本申请还提供了一种存储介质,其中,该存储介质用于存储可执行程序代码,所述可执行程序代码用于在运行时执行本申请所述的一种云存储系统中动态接入存储设备的方法。其中,本申请所述的一种云存储系统 中动态接入存储设备的方法,应用于云存储系统中的存储节点,所述方法包括:Correspondingly, the present application further provides a storage medium, where the storage medium is used to store executable program code for performing dynamics in a cloud storage system described in the present application at runtime Method of accessing a storage device. A cloud storage system as described in the present application The method for dynamically accessing a storage device is applied to a storage node in a cloud storage system, and the method includes:

当检测到连接新的第一存储设备时,识别所述第一存储设备的类型;Identifying a type of the first storage device when detecting that a new first storage device is connected;

根据所述第一存储设备的类型,查找与所述第一存储设备的类型对应的第一目标存储设备库;Determining, according to the type of the first storage device, a first target storage device library corresponding to the type of the first storage device;

根据所述第一目标存储设备库,读取保存的上线标准接口,以及与所述第一存储设备的类型对应的上线操作方式,其中,所述第一目标存储设备库中保存有上线标准接口,以及针对每种存储设备的类型对应的上线操作方式;And downloading the saved online standard interface, and the online operation mode corresponding to the type of the first storage device, wherein the first target storage device library stores an online standard interface according to the first target storage device library. And an online operation mode corresponding to the type of each storage device;

根据读取的所述上线标准接口以及所述上线操作方式,将所述第一存储设备接入所述云存储系统。The first storage device is connected to the cloud storage system according to the read online standard interface and the online operation mode.

本申请实施例中,当存储节点检测到连接新的存储设备时,能够根据该存储设备的类型,获得保存的上线标准接口以及与该存储设备的类型对应的上线操作方式,并根据所获得的上线标准接口以及上线操作方式将该存储设备接入云存储系统,实现了存储节点中存储设备的动态接入。In the embodiment of the present application, when the storage node detects the connection of the new storage device, the saved online standard interface and the online operation mode corresponding to the type of the storage device can be obtained according to the type of the storage device, and according to the obtained The on-line standard interface and the online operation mode connect the storage device to the cloud storage system to implement dynamic access of the storage device in the storage node.

相应的,本申请还提供了一种应用程序,其中,该应用程序用于在运行时执行本申请所述的一种云存储系统中动态接入存储设备的方法。其中,本申请所述的一种云存储系统中动态接入存储设备的方法,应用于云存储系统中的存储节点,所述方法包括:Correspondingly, the present application further provides an application, where the application is used to execute a method for dynamically accessing a storage device in a cloud storage system according to the present application at runtime. The method for dynamically accessing a storage device in a cloud storage system is applied to a storage node in a cloud storage system, and the method includes:

当检测到连接新的第一存储设备时,识别所述第一存储设备的类型;Identifying a type of the first storage device when detecting that a new first storage device is connected;

根据所述第一存储设备的类型,查找与所述第一存储设备的类型对应的第一目标存储设备库;Determining, according to the type of the first storage device, a first target storage device library corresponding to the type of the first storage device;

根据所述第一目标存储设备库,读取保存的上线标准接口,以及与所述第一存储设备的类型对应的上线操作方式,其中,所述第一目标存储设备库中保存有上线标准接口,以及针对每种存储设备的类型对应的上线操作方式;And downloading the saved online standard interface, and the online operation mode corresponding to the type of the first storage device, wherein the first target storage device library stores an online standard interface according to the first target storage device library. And an online operation mode corresponding to the type of each storage device;

根据读取的所述上线标准接口以及所述上线操作方式,将所述第一存储设备接入所述云存储系统。 The first storage device is connected to the cloud storage system according to the read online standard interface and the online operation mode.

本申请实施例中,当存储节点检测到连接新的存储设备时,能够根据该存储设备的类型,获得保存的上线标准接口以及与该存储设备的类型对应的上线操作方式,并根据所获得的上线标准接口以及上线操作方式将该存储设备接入云存储系统,实现了存储节点中存储设备的动态接入。In the embodiment of the present application, when the storage node detects the connection of the new storage device, the saved online standard interface and the online operation mode corresponding to the type of the storage device can be obtained according to the type of the storage device, and according to the obtained The on-line standard interface and the online operation mode connect the storage device to the cloud storage system to implement dynamic access of the storage device in the storage node.

相应的,本申请还提供了一种存储节点设备,包括:Correspondingly, the present application further provides a storage node device, including:

处理器、存储器、通信接口和总线;a processor, a memory, a communication interface, and a bus;

所述处理器、所述存储器和所述通信接口通过所述总线连接并完成相互间的通信;The processor, the memory, and the communication interface are connected by the bus and complete communication with each other;

所述存储器存储可执行程序代码;The memory stores executable program code;

所述处理器通过读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于执行本申请所述的一种云存储系统中动态接入存储设备的方法。其中,本申请所述的一种云存储系统中动态接入存储设备的方法,应用于云存储系统中的存储节点,所述方法包括:The processor, by reading the executable program code stored in the memory, to run a program corresponding to the executable program code, for performing a dynamic access storage device in a cloud storage system according to the present application. Methods. The method for dynamically accessing a storage device in a cloud storage system is applied to a storage node in a cloud storage system, and the method includes:

当检测到连接新的第一存储设备时,识别所述第一存储设备的类型;Identifying a type of the first storage device when detecting that a new first storage device is connected;

根据所述第一存储设备的类型,查找与所述第一存储设备的类型对应的第一目标存储设备库;Determining, according to the type of the first storage device, a first target storage device library corresponding to the type of the first storage device;

根据所述第一目标存储设备库,读取保存的上线标准接口,以及与所述第一存储设备的类型对应的上线操作方式,其中,所述第一目标存储设备库中保存有上线标准接口,以及针对每种存储设备的类型对应的上线操作方式;And downloading the saved online standard interface, and the online operation mode corresponding to the type of the first storage device, wherein the first target storage device library stores an online standard interface according to the first target storage device library. And an online operation mode corresponding to the type of each storage device;

根据读取的所述上线标准接口以及所述上线操作方式,将所述第一存储设备接入所述云存储系统。The first storage device is connected to the cloud storage system according to the read online standard interface and the online operation mode.

本申请实施例中,当存储节点检测到连接新的存储设备时,能够根据该存储设备的类型,获得保存的上线标准接口以及与该存储设备的类型对应的上线操作方式,并根据所获得的上线标准接口以及上线操作方式将该存储设备接入云存储系统,实现了存储节点中存储设备的动态接入。 In the embodiment of the present application, when the storage node detects the connection of the new storage device, the saved online standard interface and the online operation mode corresponding to the type of the storage device can be obtained according to the type of the storage device, and according to the obtained The on-line standard interface and the online operation mode connect the storage device to the cloud storage system to implement dynamic access of the storage device in the storage node.

对于装置/存储介质/应用程序/存储节点设备实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。For the device/storage medium/application/storage node device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.

需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that, in this context, relational terms such as first and second are used merely to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply such entities or operations. There is any such actual relationship or order between them. Furthermore, the term "comprises" or "comprises" or "comprises" or any other variations thereof is intended to encompass a non-exclusive inclusion, such that a process, method, article, or device that comprises a plurality of elements includes not only those elements but also Other elements, or elements that are inherent to such a process, method, item, or device. An element that is defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in the process, method, item, or device that comprises the element.

本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。The various embodiments in the present specification are described in a related manner, and the same or similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.

本领域普通技术人员可以理解实现上述方法实施方式中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,所述的程序可以存储于计算机可读取存储介质中,这里所称得的存储介质,如:ROM/RAM、磁碟、光盘等。One of ordinary skill in the art can understand that all or part of the steps in implementing the above method embodiments can be completed by a program to instruct related hardware, and the program can be stored in a computer readable storage medium, which is referred to herein. Storage media such as ROM/RAM, disk, CD, etc.

以上所述仅为本申请的较佳实施例而已,并非用于限定本申请的保护范围。凡在本申请的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本申请的保护范围内。 The above description is only the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application are included in the scope of the present application.

Claims (15)

一种云存储系统中动态接入存储设备的方法,应用于云存储系统中的存储节点,其特征在于,所述方法包括:A method for dynamically accessing a storage device in a cloud storage system is applied to a storage node in a cloud storage system, and the method includes: 当检测到连接新的第一存储设备时,识别所述第一存储设备的类型;Identifying a type of the first storage device when detecting that a new first storage device is connected; 根据所述第一存储设备的类型,查找与所述第一存储设备的类型对应的第一目标存储设备库;Determining, according to the type of the first storage device, a first target storage device library corresponding to the type of the first storage device; 根据所述第一目标存储设备库,读取保存的上线标准接口,以及与所述第一存储设备的类型对应的上线操作方式,其中,所述第一目标存储设备库中保存有上线标准接口,以及针对每种存储设备的类型对应的上线操作方式;And downloading the saved online standard interface, and the online operation mode corresponding to the type of the first storage device, wherein the first target storage device library stores an online standard interface according to the first target storage device library. And an online operation mode corresponding to the type of each storage device; 根据读取的所述上线标准接口以及所述上线操作方式,将所述第一存储设备接入所述云存储系统。The first storage device is connected to the cloud storage system according to the read online standard interface and the online operation mode. 根据权利要求1所述的方法,其特征在于,所述将所述第一存储设备接入所述云存储系统之前,所述方法还包括:The method according to claim 1, wherein the method further comprises: before the accessing the first storage device to the cloud storage system, the method further comprises: 根据所述第一存储设备中保存的其自身的格式化标识信息,判断所述第一存储设备是否在所述云存储系统中被格式化过;如果是,在所述存储节点中创建所述第一存储设备的索引信息;否则,输出对所述第一存储设备进行格式化的提示信息。Determining, according to the formatted identification information saved in the first storage device, whether the first storage device is formatted in the cloud storage system; if yes, creating the storage node in the storage node Index information of the first storage device; otherwise, outputting prompt information for formatting the first storage device. 根据权利要求2所述的方法,其特征在于,输出对所述第一存储设备进行格式化的提示信息后,所述方法还包括:The method of claim 2, after the outputting the prompt information for formatting the first storage device, the method further includes: 当接收到用户输入的格式化所述第一存储设备的指令时,从所述第一目标存储设备库中,读取保存的格式化标准接口,以及与所述第一存储设备的类型对应的格式化操作方式;When receiving an instruction input by the user to format the first storage device, reading the saved formatting standard interface from the first target storage device library, and corresponding to the type of the first storage device Formatting operation mode; 根据读取的所述格式化标准接口以及所述格式化操作方式,将所述第一存储设备格式化。The first storage device is formatted according to the formatted standard interface read and the formatted operation mode. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1 further comprising: 当检测到第二存储设备下线时,识别所述第二存储设备的类型; Identifying a type of the second storage device when detecting that the second storage device is offline; 根据所述第二存储设备的类型,查找与所述第二存储设备的类型对应的第二目标存储设备库;Searching, according to the type of the second storage device, a second target storage device library corresponding to the type of the second storage device; 根据所述第二目标存储设备库,读取保存的下线标准接口,以及与所述第二存储设备的类型对应的下线操作方式;Reading the saved offline standard interface and the offline operation mode corresponding to the type of the second storage device according to the second target storage device library; 根据读取的所述下线标准接口以及所述下线操作方式,将所述第二存储设备从所述云存储系统中移除。And deleting the second storage device from the cloud storage system according to the read offline standard interface and the offline operation mode. 根据权利要求4所述的方法,其特征在于,所述将所述第二存储设备从所述云存储系统中移除之前,所述方法还包括:The method of claim 4, wherein before the removing the second storage device from the cloud storage system, the method further comprises: 判断所述第二存储设备是否在所述云存储系统中被格式化过;如果是,停止当前对所述第二存储设备的所有操作,删除所述存储节点中保存的所述第二存储设备的索引信息,并进行将所述第二存储设备从所述云存储系统中移除的步骤。Determining whether the second storage device is formatted in the cloud storage system; if yes, stopping all operations currently performed on the second storage device, deleting the second storage device saved in the storage node Indexing information and performing the step of removing the second storage device from the cloud storage system. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1 further comprising: 当确定第三存储设备存在待处理的数据处理请求时,识别所述第三存储设备的类型,并根据所述第三存储设备的类型,查找与所述第三存储设备的类型对应的第三目标存储设备库;When it is determined that the third storage device has a data processing request to be processed, identifying a type of the third storage device, and searching for a third corresponding to the type of the third storage device according to the type of the third storage device Target storage device library; 根据所述第三目标存储设备库,读取保存的数据处理标准接口,以及与所述第三存储设备的类型对应的数据处理操作方式;Reading, according to the third target storage device library, a saved data processing standard interface, and a data processing operation mode corresponding to the type of the third storage device; 根据读取的所述数据处理标准接口以及所述数据处理操作方式,对所述数据处理请求进行处理。The data processing request is processed according to the read data processing standard interface and the data processing operation mode. 一种云存储系统中动态接入存储设备的装置,应用于云存储系统中的存储节点,其特征在于,所述装置包括:An apparatus for dynamically accessing a storage device in a cloud storage system is applied to a storage node in a cloud storage system, and the device includes: 第一识别模块,用于当检测到连接新的第一存储设备时,识别所述第一存储设备的类型;a first identifying module, configured to identify a type of the first storage device when detecting that a new first storage device is connected; 第一查找模块,用于根据所述第一存储设备的类型,查找与所述第一存储设备的类型对应的第一目标存储设备库; a first searching module, configured to search, according to the type of the first storage device, a first target storage device library corresponding to the type of the first storage device; 第一读取模块,用于根据所述第一目标存储设备库,读取保存的上线标准接口,以及与所述第一存储设备的类型对应的上线操作方式,其中,所述第一目标存储设备库中保存有上线标准接口,以及针对每种存储设备的类型对应的上线操作方式;a first reading module, configured to read the saved online standard interface according to the first target storage device library, and an online operation mode corresponding to the type of the first storage device, where the first target storage The device library stores an online standard interface, and an online operation mode corresponding to the type of each storage device; 接入模块,用于根据所述第一读取模块读取的所述上线标准接口以及所述上线操作方式,将所述第一存储设备接入所述云存储系统。The access module is configured to access the first storage device to the cloud storage system according to the online standard interface that is read by the first reading module and the online operation mode. 根据权利要求7所述的装置,其特征在于,所述装置还包括:The device according to claim 7, wherein the device further comprises: 第一判断模块,用于在所述接入模块将所述第一存储设备接入所述云存储系统之前,根据所述第一存储设备中保存的其自身的格式化标识信息,判断所述第一存储设备是否在所述云存储系统中被格式化过;a first determining module, configured to determine, according to the formatted identification information saved in the first storage device, the first storage device before the accessing the first storage device to the cloud storage system Whether the first storage device is formatted in the cloud storage system; 创建模块,用于当所述第一判断模块判断结果为是时,在所述存储节点中创建所述第一存储设备的索引信息;a creating module, configured to: when the first determining module determines that the result is yes, create index information of the first storage device in the storage node; 输出模块,用于当所述第一判断模块判断结果为否时,输出对所述第一存储设备进行格式化的提示信息。And an output module, configured to output prompt information for formatting the first storage device when the first determining module determines that the result is negative. 根据权利要求8所述的装置,其特征在于,所述装置还包括:The device according to claim 8, wherein the device further comprises: 第二读取模块,用于在所述输出模块输出对所述第一存储设备进行格式化的提示信息后,当接收到用户输入的格式化所述第一存储设备的指令时,从所述第一目标存储设备库中,读取保存的格式化标准接口,以及与所述第一存储设备的类型对应的格式化操作方式;a second reading module, configured to, after the output module outputs the prompt information for formatting the first storage device, when receiving an instruction input by the user to format the first storage device, a first target storage device library, reading the saved format standard interface, and a format operation mode corresponding to the type of the first storage device; 格式化模块,用于根据读取的所述格式化标准接口以及所述格式化操作方式,将所述第一存储设备格式化。And a formatting module, configured to format the first storage device according to the formatted standard interface read and the formatted operation mode. 根据权利要求7所述的装置,其特征在于,所述装置还包括:The device according to claim 7, wherein the device further comprises: 第二识别模块,用于当检测到第二存储设备下线时,识别所述第二存储设备的类型;a second identification module, configured to identify a type of the second storage device when detecting that the second storage device is offline; 第二查找模块,用于根据所述第二存储设备的类型,查找与所述第二存储设备的类型对应的第二目标存储设备库; a second search module, configured to search, according to the type of the second storage device, a second target storage device library corresponding to the type of the second storage device; 第三读取模块,用于根据所述第二目标存储设备库,读取保存的下线标准接口,以及与所述第二存储设备的类型对应的下线操作方式;a third reading module, configured to read the saved offline standard interface according to the second target storage device library, and an offline operation mode corresponding to the type of the second storage device; 移除模块,用于根据所述第三读取模块读取的所述下线标准接口以及所述下线操作方式,将所述第二存储设备从所述云存储系统中移除。The removing module is configured to remove the second storage device from the cloud storage system according to the offline standard interface read by the third reading module and the offline operation mode. 根据权利要求10所述的装置,其特征在于,所述装置还包括:The device according to claim 10, wherein the device further comprises: 第二判断模块,用于在所述移除模块将所述第二存储设备从所述云存储系统中移除之前,判断所述第二存储设备是否在所述云存储系统中被格式化过;a second determining module, configured to determine, before the removing module removes the second storage device from the cloud storage system, whether the second storage device is formatted in the cloud storage system ; 执行模块,用于当所述第二判断模块判断结果为是时,停止当前对所述第二存储设备的所有操作,删除所述存储节点中保存的所述第二存储设备的索引信息,并触发所述移除模块。An execution module, configured to: when the second determination module determines that the result is YES, stop all operations on the second storage device, delete index information of the second storage device saved in the storage node, and Trigger the removal module. 根据权利要求7所述的装置,其特征在于,所述装置还包括:The device according to claim 7, wherein the device further comprises: 第三识别模块,用于当确定第三存储设备存在待处理的数据处理请求时,识别所述第三存储设备的类型,并根据所述第三存储设备的类型,查找与所述第三存储设备的类型对应的第三目标存储设备库;a third identification module, configured to identify a type of the third storage device when determining that the third storage device has a data processing request to be processed, and search for the third storage according to the type of the third storage device a third target storage device library corresponding to the type of the device; 第四读取模块,用于根据所述第三目标存储设备库,读取保存的数据处理标准接口,以及与所述第三存储设备的类型对应的数据处理操作方式;a fourth reading module, configured to read the saved data processing standard interface according to the third target storage device library, and a data processing operation manner corresponding to the type of the third storage device; 处理模块,用于根据所述第四读取模块读取的所述数据处理标准接口以及所述数据处理操作方式,对所述数据处理请求进行处理。And a processing module, configured to process the data processing request according to the data processing standard interface read by the fourth reading module and the data processing operation mode. 一种存储介质,其特征在于,所述存储介质用于存储可执行程序代码,所述可执行程序代码用于在运行时执行如权利要求1-6任一项所述的一种云存储系统中动态接入存储设备的方法。A storage medium for storing executable program code for performing a cloud storage system according to any one of claims 1-6 at runtime A method of dynamically accessing a storage device. 一种应用程序,其特征在于,所述应用程序用于在运行时执行如权利要求1-6任一项所述的一种云存储系统中动态接入存储设备的方法。An application, wherein the application is configured to perform a method of dynamically accessing a storage device in a cloud storage system according to any one of claims 1-6 at runtime. 一种存储节点设备,包括:A storage node device includes: 处理器、存储器、通信接口和总线; a processor, a memory, a communication interface, and a bus; 所述处理器、所述存储器和所述通信接口通过所述总线连接并完成相互间的通信;The processor, the memory, and the communication interface are connected by the bus and complete communication with each other; 所述存储器存储可执行程序代码;The memory stores executable program code; 所述处理器通过读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于执行如权利要求1-6任一项所述的一种云存储系统中动态接入存储设备的方法。 The processor executes a program corresponding to the executable program code by reading executable program code stored in the memory for performing a cloud storage according to any one of claims 1-6 A method of dynamically accessing a storage device in a system.
PCT/CN2016/105089 2016-02-25 2016-11-08 Method and apparatus for dynamic access of storage device in cloud storage system Ceased WO2017143804A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610104338.0A CN107124438B (en) 2016-02-25 2016-02-25 Method and device for dynamically accessing storage equipment in cloud storage system
CN201610104338.0 2016-02-25

Publications (1)

Publication Number Publication Date
WO2017143804A1 true WO2017143804A1 (en) 2017-08-31

Family

ID=59685845

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/105089 Ceased WO2017143804A1 (en) 2016-02-25 2016-11-08 Method and apparatus for dynamic access of storage device in cloud storage system

Country Status (2)

Country Link
CN (1) CN107124438B (en)
WO (1) WO2017143804A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113470726A (en) * 2021-07-28 2021-10-01 浙江大华技术股份有限公司 Hard disk online detection method and device
CN115794806A (en) * 2021-09-09 2023-03-14 上海牛掌网络技术有限公司 Financial data grid processing system, method, device, and computing equipment

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112328363B (en) * 2020-11-05 2022-12-20 北京金山云网络技术有限公司 Cloud hard disk mounting method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102096678A (en) * 2009-12-09 2011-06-15 中国工商银行股份有限公司 Method for establishing large-capacity network file system memory
CN102333103A (en) * 2010-07-12 2012-01-25 戴元顺 Cloud storage system
CN103024068A (en) * 2012-12-26 2013-04-03 天津网世达通信技术有限公司 Cloud storage system
CN103248719A (en) * 2012-02-10 2013-08-14 中兴通讯股份有限公司 Network equipment and network system supporting hard disk array
US8751725B1 (en) * 2012-01-27 2014-06-10 Netapp, Inc. Hybrid storage aggregate
CN104077083A (en) * 2014-07-01 2014-10-01 浪潮(北京)电子信息产业有限公司 New added storage method, device and system
CN104378410A (en) * 2014-09-30 2015-02-25 东莞市联讯系统科技有限公司 A micro-private cloud storage and transmission system and method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012032569A1 (en) * 2010-09-06 2012-03-15 Hitachi, Ltd. Cluster type storage system and method of controlling the same
CN103166984B (en) * 2011-12-09 2016-09-07 中国航天科工集团第二研究院七0六所 System that Network Video Surveillance equipment control is controlled and automatically updates, method
CN102682088B (en) * 2012-04-23 2016-11-09 Tcl集团股份有限公司 The hanging method of a kind of storage device, system and TV
CN104778222B (en) * 2015-03-23 2017-12-05 四川长虹电器股份有限公司 Media library based on USB storage device is established and update method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102096678A (en) * 2009-12-09 2011-06-15 中国工商银行股份有限公司 Method for establishing large-capacity network file system memory
CN102333103A (en) * 2010-07-12 2012-01-25 戴元顺 Cloud storage system
US8751725B1 (en) * 2012-01-27 2014-06-10 Netapp, Inc. Hybrid storage aggregate
CN103248719A (en) * 2012-02-10 2013-08-14 中兴通讯股份有限公司 Network equipment and network system supporting hard disk array
CN103024068A (en) * 2012-12-26 2013-04-03 天津网世达通信技术有限公司 Cloud storage system
CN104077083A (en) * 2014-07-01 2014-10-01 浪潮(北京)电子信息产业有限公司 New added storage method, device and system
CN104378410A (en) * 2014-09-30 2015-02-25 东莞市联讯系统科技有限公司 A micro-private cloud storage and transmission system and method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113470726A (en) * 2021-07-28 2021-10-01 浙江大华技术股份有限公司 Hard disk online detection method and device
CN115794806A (en) * 2021-09-09 2023-03-14 上海牛掌网络技术有限公司 Financial data grid processing system, method, device, and computing equipment

Also Published As

Publication number Publication date
CN107124438B (en) 2020-02-28
CN107124438A (en) 2017-09-01

Similar Documents

Publication Publication Date Title
CN106843749B (en) Write request processing method, device and device
EP2695083B1 (en) Cluster unique identifier
CN108460045B (en) Snapshot processing method and distributed block storage system
CN108696581B (en) Distributed information caching method and device, computer equipment and storage medium
EP3786802A1 (en) Method and device for failover in hbase system
WO2018233630A1 (en) DISCOVERY OF FAILURE
CN103559101A (en) Data backup and recovery method of operating system, storage device and terminal
WO2017084348A1 (en) Management method and apparatus for ip hard disk
US20180364948A1 (en) Data Processing Method, Related Device, and Storage System
WO2019174608A1 (en) Data processing method and related device therefor
EP3633519A1 (en) Method for storing objects, and object store gateway
WO2017143804A1 (en) Method and apparatus for dynamic access of storage device in cloud storage system
CN106021566A (en) Method, device and system for improving concurrent processing capacity of single database
CN104035728A (en) Hard disk hot plug handling method, device and node
CN108845772B (en) A kind of hard disk failure processing method, system, device and computer storage medium
CN112825098A (en) Data protection method and device, computing equipment and storage medium
WO2019072088A1 (en) File management method, file management device, electronic equipment and storage medium
KR20150139546A (en) Removable storage device identity and configuration information
US20220083645A1 (en) Information processing apparatus, information processing method, and computer program
CN112989294B (en) Authentication method, device, server and storage medium
US20170139779A1 (en) Controller, storage system, and non-transitory computer-readable storage medium having control program stored therein
WO2021254214A1 (en) Migration method and apparatus for android application program
CN112286869A (en) Snapshot creating method and device
CN105511952B (en) Resource self-migration method and system based on cloud computing platform
CN106453544A (en) Cloud environment, and monitoring method and system thereof

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

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

Ref document number: 16891252

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 13/02/2019)

122 Ep: pct application non-entry in european phase

Ref document number: 16891252

Country of ref document: EP

Kind code of ref document: A1