WO2017107886A1 - 一种ip硬盘之间传输数据的方法和装置 - Google Patents

一种ip硬盘之间传输数据的方法和装置 Download PDF

Info

Publication number
WO2017107886A1
WO2017107886A1 PCT/CN2016/110794 CN2016110794W WO2017107886A1 WO 2017107886 A1 WO2017107886 A1 WO 2017107886A1 CN 2016110794 W CN2016110794 W CN 2016110794W WO 2017107886 A1 WO2017107886 A1 WO 2017107886A1
Authority
WO
WIPO (PCT)
Prior art keywords
hard disk
data
target
source
controller
Prior art date
Application number
PCT/CN2016/110794
Other languages
English (en)
French (fr)
Inventor
张雷
罗庆超
程华
曹立勋
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2017107886A1 publication Critical patent/WO2017107886A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Definitions

  • the present invention relates to the field of data transmission, and in particular, to a method and apparatus for transmitting data between IP hard disks.
  • IP hard disk is a hard disk that provides an IP protocol interface. It is an emerging form of storage hardware that uses the TCP/IP protocol to directly communicate with the upper layer and provide object storage services. Since the IP hard disk can directly communicate with the host through the IP protocol, not only does the IP hard disk and the host have no distance limitation, but also can support massive parallel access and greatly increase the speed of data access.
  • IP hard disk When an IP hard disk is in use, data transmission between IP hard disks is required in some cases. For example, when data migration is performed, data needs to be migrated from one IP hard disk to another.
  • data transmission is mainly transmitted through the controller.
  • the data stream is transmitted from one IP hard disk to the other IP hard disk after passing through the controller.
  • the way in which the existing IP hard disk transmits data causes the data to flow to the controller first, and then the controller sends the migration to the target IP hard disk, consuming the network resources of the controller.
  • Embodiments of the present invention provide a method and an apparatus for transmitting data between IP hard disks, which can achieve the purpose of saving controller resources.
  • an embodiment of the present application provides a method for transmitting data between IP hard disks, the method comprising receiving a data migration request according to an identifier of data to be migrated included in a data migration request.
  • the source IP hard disk where the data is located is determined according to the identifier of the data to be migrated, and the target IP hard disk to which the data to be migrated is to be migrated is determined by an algorithm.
  • the source IP hard disk and the target IP hard disk are connected to each other, thereby enabling the source IP hard disk and the target IP hard disk.
  • the data is transmitted according to the established connection.
  • the data is transmitted through the established connection without sending data to the control node, and then the data is sent to the target IP hard disk through the control node. Thereby saving the resources of the control node and improving the use efficiency of the device.
  • sending an instruction to the source IP hard disk and the target IP hard disk means sending the identification information of the target IP hard disk and the identification information of the data to be migrated to the source IP hard disk. Sends the identification information of the source IP hard disk and the identification information of the data to be migrated to the target IP hard disk.
  • the source IP hard disk and the target IP hard disk establish a connection by obtaining the identification information of the other party. Establish the connection with the IP hard disk of the other party by obtaining the identification information of the IP hard disk of the other party. Data transmission can be made faster and system performance can be improved by establishing separate data channels.
  • the identification information of the target IP hard disk sent to the source IP hard disk is the IP address of the target IP hard disk sent to the source IP hard disk.
  • the identification information of the source IP hard disk sent to the target IP hard disk is the IP address of the source IP hard disk that is sent to the target IP hard disk.
  • the TCP/IP protocol is used to establish the network based on the obtained IP address of the other party without additional devices, so that the connection between the IP disks is more convenient.
  • inventions of the present application provide a controller.
  • the controller includes a processor, a communication interface, and a bus. Wherein the processor and the communication interface communicate via the bus.
  • the communication interface is used to communicate with multiple IP hard disks.
  • the processor is operative to perform the above method while the device is running.
  • an embodiment of the present application provides a data transmission device.
  • the apparatus includes any one of the embodiments included for performing the method in one aspect.
  • the present invention provides a method and device for data transmission between an IP hard disk.
  • a connection is established between the source IP hard disk and the target IP hard disk, thereby avoiding the need for data resource transmission.
  • the controller thus realizes the saving of the controller resources and improves the use efficiency of the device.
  • FIG. 1 is a hardware structural diagram of a data resource storage system according to an embodiment of the present invention
  • FIG. 2 is a hardware structural diagram of a data resource storage system in which an IP hard disk and a controller are disposed in the same device according to an embodiment of the present invention
  • FIG. 3 is a structural diagram of a hardware of a controller according to an embodiment of the present invention.
  • FIG. 4 is a structural diagram of an IP hard disk hardware according to an embodiment of the present invention.
  • FIG. 5 is a flowchart of a method for data transmission between IP hard disks according to an embodiment of the present invention
  • FIG. 6 is a flowchart of data migration between IP hard disks according to an embodiment of the present invention.
  • FIG. 7 is a flowchart of data migration between IP hard disks according to an embodiment of the present invention.
  • FIG. 8 is a flow chart of instructions when data is transmitted between IP hard disks according to an embodiment of the present invention.
  • FIG. 9 is a flow chart of instructions when another data transmission between IP hard disks is provided according to an embodiment of the present invention.
  • FIG. 10 is a data list included in a controller according to an embodiment of the present invention.
  • FIG. 11 is a schematic diagram of a controller for data migration according to an embodiment of the present invention.
  • FIG. 12 is a structural diagram of a hardware of a controller according to an embodiment of the present invention.
  • Embodiments of the present invention provide a method and apparatus for transmitting data between IP hard disks.
  • the device comprises at least a plurality of IP hard disks and at least one controller.
  • the controller After receiving the request sent by the user and the identification (ID) of the data to be migrated, the controller determines the fragmentation information formed by the data ID to be migrated and the source IP hard disk and the fragmentation data where the fragmentation data is located.
  • the controller will send commands to the source IP hard drive and/or the target IP hard drive.
  • the source IP hard disk and the target IP hard disk send the fragmented data to be migrated from the source IP hard disk to the target IP hard disk according to the instruction.
  • the problem that the data needs to pass through the controller in the prior art is avoided, and the unnecessary consumption of the controller resources is avoided.
  • FIG. 1 is a hardware structural diagram of a data resource storage system according to an embodiment of the present invention.
  • the resource storage system includes a controller and a plurality of IP hard disks.
  • Figure 1 shows the first IP Hard disk, second IP hard disk and third IP hard disk.
  • the controller is usually set up in the network, configured with a network communication interface and address, such as an Ethernet interface, and configured with TCP/IP protocol and IP address.
  • the user or other device addresses the controller by IP address and requests the controller to handle the data storage.
  • the IP hard disk is a storage hardware form. It is equipped with an Ethernet interface and uses the TCP/IP protocol to directly communicate with the controller and provide object storage services.
  • a plurality of IP hard disks may have the same internal structure or different internal structures, and will not be described herein.
  • the IP hard disk includes a memory and a storage controller, and the storage controllers of the respective IP disks can be connected.
  • the connection can be connected through a network protocol, or can be connected through other protocols.
  • the connection is obtained by obtaining the identification information of the IP hard disk to be connected.
  • the identifier information of the IP hard disk is an IP address of the IP hard disk.
  • the controller and IP hard drive are set up in different network locations.
  • the resource storage system controller and the IP hard disk may also be disposed in the same device.
  • 2 is a hardware structural diagram of a data resource storage system in which an IP hard disk and a controller are disposed in the same device according to an embodiment of the present invention. As shown in Figure 2, multiple IP hard disks can be set in the same hardware structure. Each IP hard disk is connected to the controller through the network through the Ethernet interface, and multiple IP hard disks are combined into one resource storage system.
  • IP hard disks Under the control of the controller, different IP hard disks can directly initiate data transmission between each other without having to perform data transmission through the controller.
  • two IP hard disks are taken as an example, and the IP hard disk where the resource to be migrated is the source IP hard disk, and the IP hard disk to which the resource is to be moved is the target IP hard disk.
  • Those skilled in the art understand that such data transmission is not limited to between two IP hard disks, and can be extended to be applied between any plurality of IP hard disks.
  • FIG. 3 is a schematic structural diagram of a controller according to an embodiment of the present invention.
  • the controller further includes a processor, a memory, and a memory.
  • the data list is stored in the memory, and the data list includes a data ID, a fragment identifier of the fragment corresponding to the data ID, and an IP hard disk identifier of the IP hard disk stored in the fragment.
  • a list of instructions is stored in the memory, and includes, for example, a receiving module, a processing module, and a transmitting module.
  • the processor reads the instruction list and the data list into the memory, executes the instruction list, and receives, processes, and transmits the data according to the data list.
  • the user sends an object to the controller that needs to be stored.
  • the processor stores the object in an IP hard disk by calling a processing module. Fragmentation is performed by fragmentation rules and redundancy rules and will not be discussed in detail here.
  • the processor also writes the information after the data fragmentation into the data list, and the information written to the data list includes the identification information of the fragment formed by the data after fragmentation, the ID of the stored data, and the IP hard disk stored in the fragment. logo.
  • the user sends a data read request to the controller, and the processor receives the request by executing the receiving module.
  • the request includes the ID of the data that needs to be read.
  • the processor obtains the fragment corresponding to the data ID from the data list by executing the instruction of the processing module, and obtains the fragment identifier of the fragment and the IP disk identifier of the IP hard disk where each fragment is located.
  • the processor sends an instruction to the IP hard disk corresponding to each fragment by executing an instruction of the sending module, where the instruction includes a fragment identifier of the fragment to be migrated in each IP hard disk, and the IP hard disk sends the fragment to the processor by using the fragment identifier.
  • the processor receives the fragment data returned by each IP hard disk, aggregates the fragment data into an object, and sends the fragment data to the user.
  • the user sends a data migration request to the controller, and the processor receives the request by executing the receiving module.
  • the ID of the data that needs to be migrated is included in the request.
  • the processor obtains the fragment identifier corresponding to the data ID and the IP disk identifier of the IP hard disk where the fragment is located from the data list by executing an instruction of the processing module.
  • the processor determines, by executing the processing module, which IP hard disk the slice corresponding to the data is to be migrated to.
  • the processor sends an instruction to the source IP hard disk and/or the migrated target IP hard disk where the fragment is located by executing the sending module, where the instruction includes the fragment identifier of the fragment to be migrated, and the source IP hard disk and/or the target IP hard disk. Identification information.
  • the source IP hard disk and/or the target IP hard disk establish a connection and perform data migration by obtaining the IP disk hard disk identification information of the other party.
  • the storage device includes a storage controller and a storage controller.
  • the storage controller includes a disk controller and independent memory.
  • the storage medium is used to store the received data, and the storage medium also includes storage of the control information.
  • the control information includes fragmentation information and control instructions.
  • the control instructions include, for example, a receiving module, a processing module, and a transmitting module, and the like, for calling the disk controller to perform related operations.
  • the fragmentation information includes the fragmentation identifier of each fragment and the physical address of the fragment in the storage medium.
  • the fragmentation information and control instructions are usually transferred to memory during the work process to facilitate the call of the disk controller.
  • the disk controller reads the control instruction and the fragmentation information into the memory, executes the control instruction, and receives, processes, and transmits the fragmentation data according to the fragmentation information.
  • the IP hard disk receives the slice store instruction sent by the controller and the slice data that needs to be stored.
  • the controller stores the fragment data in the storage medium of the IP hard disk by executing the processing module.
  • the controller also writes the identification information of the fragments of the respective fragment data and the physical address of the fragment on the storage medium into the fragmentation information.
  • the controller then returns an operation completion command to the controller.
  • the IP hard disk (via the Ethernet interface and the receiving module) receives a slice fetch instruction sent by the controller, the instruction including a slice identifier of the slice to be fetched.
  • the controller determines the physical address of the fragment to be fetched on the storage medium by executing the processing module and calling the fragmentation information.
  • the data stored on the physical address is read and sent to the controller through the sending module and the Ethernet interface.
  • the IP hard disk receives a slice escaping command sent by the controller, and the shard escaping command migrates the shards to different IP hard disks under the same controller.
  • the migrating command includes the shard ID of the shard that needs to be migrated and the IP hard disk ID of the target IP hard disk to be moved in.
  • the controller establishes a connection with the target IP hard disk through the IP hard disk identifier of the target IP hard disk.
  • the controller also executes the processing module and invokes the fragmentation information to determine the physical address of the fragment to be fetched on the storage medium. The data stored on the physical address is read, and the fragment to be migrated is sent to the target IP hard disk through a connection established with the migration target IP hard disk.
  • FIG. 5 is a flowchart of a method for data transmission between IP hard disks according to an embodiment of the present invention. Place The method is applied to a storage system that includes a plurality of IP hard disks and controllers. The main body of execution of this method is the controller. As shown in FIG. 6, the method includes:
  • the controller receives a data migration request, where the data migration request includes an identifier of the data to be migrated.
  • the controller receives the migration message of the data sent by the user through the classmate interface, thereby performing data migration according to the request message of the user.
  • the controller further receives a message sent by the user through a communication interface, and the controller is directly connected to the user (eg, connected through a network).
  • the controller determines, according to the identifier of the data to be migrated and a preset correspondence, a source IP hard disk and a target IP hard disk where the data to be migrated is located.
  • the correspondence includes the identifier of the data to be migrated, the identifier of the source IP hard disk, and the identifier of the target IP hard disk.
  • the data that needs to be stored is fragmented. Therefore, before the migration, you need to know the fragmentation of the migrated data in the IP hard disk. Determine the IP hard disk where the migrated fragment is located based on the fragment included in the data.
  • the identifier of the data to be migrated and the preset correspondence are stored in the memory, and the source IP hard disk and the target IP hard disk where the data to be migrated are located are determined.
  • the correspondence includes the identifier of the data to be migrated, the identifier of the source IP hard disk, and the identifier of the target IP hard disk.
  • the migration command is sent to the source IP address of the data to be migrated.
  • the disk controller After the IP hard disk obtains the fragment data sent by the controller, the disk controller automatically stores the fragment data in the IP hard disk, and stores the fragment information in the IP hard disk.
  • the controller When the controller obtains the data migration request sent by the user, the request message is analyzed to determine the data to be migrated. The controller will also query the fragmentation of the data and determine which IP hard disk the fragment is in by the corresponding relationship stored in the memory. The controller will be based on the request information as well as on the disk The saved algorithm determines the migration target location of the object.
  • the controller sends an identifier of the target IP hard disk to the source IP hard disk, and the controller sends the identifier of the source IP hard disk to the target IP hard disk for the source IP hard disk and the target.
  • the IP hard disk establishes a connection.
  • the data migration instruction is sent to the original IP hard disk, and the data migration instruction includes the identification information of the target IP hard disk.
  • the data migration command includes the identification information of the source IP hard disk.
  • the data migration command sent to the source IP hard disk includes the identification information of the target IP hard disk, and the data migration command sent to the target IP hard disk includes the identification information of the source IP hard disk.
  • the command sent to the target IP hard disk includes the identification information of the source IP hard disk.
  • the IP hard disk and/or the migration target IP disk of the object After the IP hard disk and/or the migration target IP disk of the object obtain the IP disk ID of the IP disk of the other device, the IP disk ID is used to establish a connection.
  • the controller After the source IP hard disk and the migration target disk where the data resides are connected, the controller returns to the controller through the disk controller. After receiving the information about the successful connection establishment, the controller sends the transmission to the source IP hard disk and the target IP hard disk respectively. command.
  • the controller After establishing a connection between the source IP hard disk and the target IP hard disk, the controller sends a data migration instruction to the source IP hard disk, where the instruction includes an identifier of the data to be migrated.
  • the controller After the target IP hard disk is connected to the source IP hard disk, the controller also sends instructions to the source IP hard disk and the target IP hard disk.
  • the command is sent to the target IP hard disk to indicate the target IP hard disk, and according to the connection established with the source IP hard disk, the data of the corresponding fragment sent by the source IP hard disk is read and stored.
  • the source IP hard disk reads the data to be migrated according to the identifier of the data to be migrated, and sends the data to be sent to the target IP hard disk.
  • the source IP hard disk reads the corresponding data according to the stored fragment identifier.
  • the source IP hard disk sends corresponding data to the target IP hard disk according to the connection established with the target IP hard disk.
  • Target IP hard disk according to source ID of the ID of the IP hard disk.
  • the data to be migrated sent by the source IP hard disk is read. After the migration is completed, the source IP hard disk and the target IP hard disk are respectively returned to the controller. The controller then returns to the user a successful data migration operation.
  • FIG. 6 is a flowchart of data migration between IP hard disks according to an embodiment of the present invention.
  • the execution body of the method is a source IP hard disk where data resources to be migrated are located. As shown in FIG. 6, the method includes:
  • the operation to be performed is determined according to the instruction.
  • the operation to be performed is data migration.
  • the storage location of the source IP hard disk on which the fragment data corresponding to the fragmentation information is located is determined by the fragmentation information related to the data ID.
  • S602. Determine, by using the acquired target IP hard disk identification information, a target disk of data to be migrated.
  • the identification information of the target IP hard disk is the IP address of the target IP hard disk.
  • the source IP hard disk determines the target IP hard disk to which the object will be moved by obtaining the IP address of the target IP hard disk. Since the source IP hard disk and the target IP hard disk are connected, the target IP hard disk communicates directly with the source IP hard disk.
  • S603 Send the fragment data to the target IP hard disk by using the connection established between the source IP hard disk and the target IP hard disk.
  • a connection is established between the source IP hard disk and the target IP hard disk. After the migration of the target IP hard disk is determined, the information is sent to the target IP hard disk, and the information includes the fragment data to be migrated.
  • the IP hard disk receives the slice move in command sent by the controller, and the slice move in command moves the slice from different IP hard disks under the same controller.
  • the migration command includes the fragmentation identifier of the fragment and the IP hard disk identifier of the source IP hard disk where the fragment is located.
  • the controller establishes a connection with the source IP hard disk through the IP hard disk ID of the source IP hard disk.
  • the controller also utilizes the original IP by executing the sending module
  • the connection established by the hard disk sends the fragment to be migrated to the source IP hard disk.
  • the controller obtains the fragment data sent by the source IP hard disk by executing the receiving module, and stores the data into the storage medium.
  • the disk controller also writes the fragmentation identifier of the received fragment and the physical address of the fragment in the storage medium into the fragmentation information, and returns the processing to the controller.
  • FIG. 7 is a flowchart of data migration between IP hard disks according to an embodiment of the present invention.
  • the execution main diagram of the method may be a target IP hard disk. As shown in FIG. 7, the method includes:
  • S701 receives a data migration instruction, where the instruction includes fragmentation information related to the data ID to be migrated and identification information of the source IP hard disk where the fragmentation data is located.
  • the operation to be performed is determined according to the instruction.
  • the operation to be performed is the migration of data.
  • the fragmentation data to be acquired is determined by the fragmentation information related to the data ID. Send information to the target IP hard disk through the target IP hard disk identification information. The information includes fragment information of the fragment data to be acquired, and the source IP hard disk sends the fragment data to the target IP hard disk.
  • S702 determines, by using the obtained source IP hard disk identification information, that the disk that needs to be migrated is a target IP hard disk.
  • the identifier information of the source IP hard disk is the IP address of the source IP hard disk.
  • the target IP hard disk determines the IP hard disk where the object is located by obtaining the IP address of the source IP hard disk. Since the source IP hard disk and the target IP hard disk are connected, the target IP hard disk communicates directly with the source IP hard disk.
  • the S703 receives the fragment data sent by the source IP hard disk through the connection established between the target IP hard disk and the source IP hard disk.
  • a connection is established between the source IP hard disk and the target IP hard disk, and after determining that the disk of the object is the source IP hard disk, sending information to the target IP hard disk, so that the source IP hard disk needs to send the migrated fragment data.
  • the target IP hard disk will receive and store the data sent by the source IP hard disk.
  • the embodiment of the invention includes a controller, a source IP disk, and a target IP disk.
  • the controller is used for the entire capital
  • the IP hard disk in the source storage system is controlled, and the externally obtained data is fragmented and sent to each IP hard disk for storage.
  • the controller also connects to an external user through an interface (such as an Ethernet interface) to obtain data to be stored and accept the request, and send the stored read and write to the user.
  • the controller will determine the shard that the data contains in the storage system and determine which IP hard disk the shard is stored in. After determining the storage location of the data to be migrated, the controller will also determine which IP hard disk the resource to be migrated will be moved to. Determining the migration target disk can be selected by the selection rules set in the controller. In one example, the migration rule is an IP hard disk with the largest remaining storage space. Of course, any other rules may be used. The determination of the migration target disk is not limited to the scope of the embodiments of the present invention. In an embodiment of the invention, the migration target disk is determined to be a second IP hard disk.
  • the controller After determining that the migration data is stored in the source IP hard disk and the migration target IP hard disk, the controller will send instructions to the source IP hard disk and the target IP hard disk respectively.
  • the instructions sent to the source IP hard disk include the fragmentation information that needs to be migrated, and the identification information of the migration target disk.
  • the instructions sent by the controller to the target IP hard disk include the fragmentation information that needs to be migrated, and the IP hard disk where the object is located.
  • the disk controller of the source IP hard disk and the disk controller of the target IP hard disk will establish a connection through their respective disk controllers.
  • the connection between the source IP hard disk and the target IP hard disk includes verifying by using the identifier of the received IP hard disk of the other party. And sharding each other to send data that needs to be migrated to determine the data that needs to be migrated.
  • the controller After the source IP hard disk and the target IP hard disk are connected, the controller returns to the controller through the disk controller. After receiving the information about successfully establishing the connection, the controller sends a command to start transmission to the source IP disk and the target IP disk. After the data migration is completed, the source IP hard disk and the target IP hard disk are respectively returned to the controller. The controller then returns to the user a successful data migration operation.
  • FIG. 8 is a flow chart of an instruction when IP hard disk data is transmitted according to an embodiment of the present invention.
  • the source IP hard disk is the IP hard disk where the data to be migrated is located
  • the target IP hard disk is the target of data migration.
  • the controller directly sends the command to the target IP hard disk to establish a connection between the source IP hard disk and the target IP hard disk, thereby directly transferring the resource from the source IP hard disk to the target IP hard disk. Achieve the purpose of making data transmission more efficient by not occupying the computing and network resources of the controller.
  • FIG. 9 is a flow chart of an instruction for another IP hard disk data transmission according to an embodiment of the present invention.
  • the source IP hard disk is an IP hard disk where the resource to be migrated is located
  • the target IP hard disk is a resource migration required to be migrated.
  • Target address IP hard disk The controller directly sends the command to the source IP hard disk to establish a connection between the target IP hard disk and the source IP hard disk, thereby directly transferring resources from the source IP hard disk to the target IP hard disk.
  • FIG. 10 is a data list included in a controller according to an embodiment of the present invention. As shown in FIG. 10, the data list includes three items: an object ID, a fragment identifier, and an IP disk identifier.
  • the object ID “Movie” that needs to be migrated in the embodiment of the present invention includes five fragments.
  • the fragmentation identifiers of the five fragments are “001”, “002”, “003”, “004”, and “005”, and the five fragments are stored in the IP disk identification information as “192.168.1.1”.
  • the IP disk identification information is an IP address of the IP disk. Therefore, the controller obtains the fragment identifiers of the fragments included in the data to be migrated as “001”, “002”, “003”, “004”, “005”.
  • the source disk is a disk with an IP address of 192.168.1.1. In the embodiment of the present invention, it is conveniently identified as a source IP hard disk for the sake of expression.
  • the migration target disk is selected according to an algorithm. In the embodiment of the present invention, an IP hard disk whose IP disk identification information is “192.168.1.2” is selected, and is represented as a target IP hard disk.
  • the controller sends a data migration instruction to the source IP hard disk.
  • the fragment identifiers included in the command are “001”, “002”, “003”, “004”, and “005”, and the target disk IP address is “192.168. 1.2”.
  • the controller sends a data migration instruction to the target IP hard disk.
  • the fragment identifiers included in the command are "001", “002”, “003”, “004", and "005", and the source disk IP address included is "192.168.” 1.1".
  • the source IP hard disk and the target IP hard disk are built with the other party's IP address and TCP/IP protocol. Stand up.
  • the source IP hard disk obtains the fragment stored in the corresponding physical address in the storage medium by using the fragment identifier, and sends the fragment to the target IP hard disk through the connection established with the target IP hard disk.
  • the target IP hard disk stores the fragments whose identification information is "001", "002", “003", "004", and "005" according to the fragmentation identifier to the storage medium of the target IP hard disk.
  • the source IP hard disk and the target IP hard disk will also return a message to the controller after the transmission and reception are completed.
  • the controller modifies the data list according to the returned message, and changes the IP disk identifier corresponding to the data "Movie" to "192.168.1.2", and then Return processing to the user is complete.
  • the processing unit 1101 includes a processing unit 1101, a sending unit 1102, and a receiving unit 1103.
  • the receiving unit 1103 is configured to receive, by the controller, a data migration request, where the data migration request includes an identifier of the data to be migrated.
  • the processing unit 1101 is configured to determine, according to the identifier of the data to be migrated and a preset correspondence, a source IP hard disk and a target IP hard disk where the data to be migrated is located.
  • the correspondence includes the identifier of the data to be migrated, the identifier of the source IP hard disk, and the identifier of the target IP hard disk.
  • the sending unit 1102 is configured to send the identifier of the target IP hard disk to the source IP hard disk, and the controller sends the identifier of the source IP hard disk to the target IP hard disk for the source IP hard disk and the The target IP hard disk establishes a connection.
  • the source IP hard disk has been read according to the identifier of the data to be migrated, and is sent to the target IP hard disk.
  • controllers of the embodiment of the present invention in combination with other parts will be described by way of an example.
  • the following examples also include other structures connected to the processor, including the user who sends the request to the controller, and the source and destination memories that receive the control operations.
  • the controller is connected to the user through an interface, thereby accepting the request sent by the user, and completing instructions such as migration or copying of the data.
  • the connection between the controller and the user can be in any form or method, and in an embodiment of the invention, the connection is made through an Ethernet interface.
  • the data is sent to the receiving unit of the controller.
  • the controller is connected to each IP hard disk through a network.
  • a connection is also made between each IP hard disk, and the connection may be through a network protocol, or may be connected through other protocols. Therefore, data transmission can be performed between each IP hard disk.
  • the receiving unit acquires an instruction for data migration sent by the user through a network connection, and the receiving unit transmits the received instruction to the processing unit, and performs parsing by the processing unit.
  • the processing unit parsing the instruction includes obtaining data that needs to be migrated included in the information.
  • the processing unit determines which IP hard disk the data is stored in. In one example of the invention, the data that needs to be migrated is stored in the source IP hard disk.
  • the processing unit After determining the storage location of the data to be migrated, the processing unit will also determine which target IP hard disk to move the resource to according to the resource to be migrated and the IP address of the resource. In the embodiment of the present invention, since there are only two IP hard disks, in one example of the present invention, the data to be migrated is migrated to the target IP hard disk.
  • the algorithm for determining the migration target IP hard disk can be selected by the rules set in the controller. The determination of the migration target IP hard disk is not limited to the scope of the embodiments of the present invention.
  • the processing unit After determining the source IP hard disk and the migrated target IP hard disk stored in the migration resource, the processing unit sends a data migration instruction and a message for migrating the identification information of the target disk, and the sending unit sends the message to the source IP hard disk where the resource is located. .
  • the controller will also issue a data migration instruction and identification information of the source IP hard disk where the resource is located, and the sending unit will send the message to the migration target IP hard disk.
  • the source IP address of the resource and the migration target IP hard disk will establish a connection through the above identification information.
  • the migration target IP hard disk will also establish the corresponding storage space.
  • the connection between the source IP hard disk and the target IP hard disk includes verification by the identifier sent by the processing unit.
  • the source IP hard disk and the target IP hard disk respectively return information for successfully establishing the connection to the processing unit.
  • the processing unit successfully established the connection
  • an instruction to start transmitting data is sent to the source IP hard disk and the target IP hard disk respectively.
  • the source IP hard disk sends the resources to be migrated to the target IP hard disk according to the instructions.
  • the target IP hard disk stores the received resources into the newly created storage space.
  • the instructions for successfully performing data migration are returned to the processing unit through the sending unit.
  • the processing unit After receiving the instructions of the source IP hard disk and the target IP hard disk, the processing unit returns the processing result to the user.
  • FIG. 8 is a schematic diagram of a resource balancing device according to an embodiment of the present invention.
  • the device includes a processor 1201, a memory 1202, a communication interface 1203, and a bus 1204.
  • the processor 1201, the memory 1202, and the communication interface 1203 implement a communication connection with each other through the bus 1204.
  • the processor 1201 may be a general-purpose central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), or one or more integrated circuits for executing related programs.
  • CPU central processing unit
  • ASIC application specific integrated circuit
  • the memory 1202 may be a read only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM).
  • the memory 1202 can store an operating system and other applications.
  • the program code for implementing any optional technical solution provided by the foregoing method embodiment of the present invention is saved in the memory 1202 and executed by the processor 1201. .
  • Communication interface 1203 is used to communicate with other switches or control servers.
  • Bus 1204 can include a path for communicating information between various components of the device, such as processor 1201, memory 1202, and communication interface 1203.
  • the steps of a method or algorithm described in connection with the embodiments disclosed herein can be implemented in hardware, a software module executed by a processor, or a combination of both.
  • the software module can be placed in random access memory (RAM), memory, read only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or technical field. Any other form of storage medium known.

Landscapes

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

Abstract

一种IP硬盘之间传输数据的方法和装置。在方法中,包括接收数据迁移请求,该请求包括需要迁移的数据的ID。根据需要迁移的数据的ID,确定数据ID有关的分片数据所在的源IP硬盘和迁移目标IP硬盘。向源IP硬盘发送指令,包括目标IP硬盘中的标识信息,向目标IP硬盘发送指令,包括源IP硬盘的标识信息。源IP硬盘和目标IP硬盘通过所述标识信息建立连接,进而实现分片数据的迁移。通过采用将源IP硬盘和目标IP硬盘根据指令建立连接,通过所建立的连接将需要迁移的分片数据从源IP硬盘发送到目标IP硬盘。避免了现有技术中数据需要经过控制器的问题,提高了控制器的资源利用率。

Description

一种IP硬盘之间传输数据的方法和装置 技术领域
本发明涉及数据传输领域,尤其涉及一种IP硬盘之间传输数据的方法和装置。
背景技术
网络互联协议(Internet Protocol,IP)硬盘为提供IP协议接口的硬盘。它是一种新兴的存储硬件形态,采用TCP/IP协议直接与上层进行网络通讯并提供对象存储服务。由于IP硬盘能够通过IP协议直接与主机进行通信,不仅使得IP硬盘与主机间没有了距离限制,而且能够支持大规模并行访问,大幅提高数据访问的速度。
IP硬盘在使用时,一些情况下需要在IP硬盘之间进行数据传输,比如在做数据迁移时,数据需要从一个IP硬盘迁移到另一个IP硬盘。
现有技术中数据传输主要经过控制器传出。数据流从一个IP硬盘经过控制器后,传输到别一个IP硬盘。现有的IP硬盘传输数据的方式,会导致数据先流向控制器,再由控制器发往迁移目标IP硬盘,消耗了控制器的网络资源。
发明内容
本发明实施例提供了一种IP硬盘之间传输数据的方法和装置,可以实现节约控制器资源的目的。
一方面,本申请的实施例提供了一种IP硬盘之间传输数据的方法,该方法包括接收数据迁移请求,根据数据迁移请求中包括的待迁移数据的标识。根据待迁移数据的标识,确定该数据所在的源IP硬盘,以及,通过算法确定待迁移数据将要迁往的目标IP硬盘。通过向源IP硬盘和目标IP硬盘发送指令,使源IP硬盘和目标IP硬盘建立连接,从而使源IP硬盘和目标IP硬盘 根据建立的连接进行数据的传输。通过建立的连接进行数据传输,而不用向控制节点发送数据,再通过控制节点向目标IP硬盘发送数据。从而节约了控制节点的资源,提高了设备的使用效率。
在一个可能的设计中,向源IP硬盘和目标IP硬盘发送指令是指,向源IP硬盘发送目标IP硬盘的标识信息和需要迁移的数据的标识信息。向目标IP硬盘发送源IP硬盘的标识信息和需要迁移的数据的标识信息。源IP硬盘和目标IP硬盘通过获取的对方的标识信息建立连接。通过获取对方IP硬盘的标识信息,从而与对方IP硬盘建立连接。通过建立单独的数据通道也能使数据的传输更加快捷,系统性能更高。
在一个可能的设计中,向源IP硬盘发送目标IP硬盘的标识信息是向源IP硬盘发送目标IP硬盘的IP地址。向目标IP硬盘发送源IP硬盘的标识信息是向目标IP硬盘发送源IP硬盘的IP地址。在IP硬盘中,通过TCP/IP协议,根据获取的对方的IP地址,从而通过网络进行建立,而不用额外增加其它设备,使IP盘之间的连接更加便捷。
另一方面,本申请的实施例提供一种控制器。控制器包括处理器,通信接口和总线。其中,处理器和通信接口通过总线通信。通信接口用于与多个IP硬盘通信。当装置运行时,处理器用于执行上述方法。
再一方面,本申请的实施例提供一种数据传输装置。该装置包括用于执行在一方面的方法中包括的任意一种实施方式。
本申请提供一种IP硬盘之间数据传输的方法和装置,通过向源IP硬盘和目标IP硬盘发送指令,使源IP硬盘和目标IP硬盘之间建立连接,从而避免了数据资源传输使需要经过控制器,由此实现了控制器资源的节约,以及提高了设备的使用效率。
附图说明
图1为本发明实施例提供的一种数据资源存储系统的硬件结构图;
图2为本发明实施例提供的一种IP硬盘和控制器设置在同一设备中的数据资源存储系统硬件结构图;
图3为本发明实施例提供的控制器硬件结构图;
图4为本发明实施例提供的IP硬盘硬件结构图;
图5为本发明实施例提供的一种IP硬盘之间数据传输的方法流程图;
图6为本发明实施例提供的一种IP硬盘之间数据迁移流程图;
图7为本发明实施例提供的一种IP硬盘之间数据迁移流程图;
图8为本发明实施例提供的一种IP硬盘之间传输数据时指令流向图;
图9为本发明实施例提供的另一种IP硬盘之间传输数据时指令流向图;
图10为本发明实施例提供的一种控制器中包括的数据列表;
图11为本发明实施例提供的一种用于数据迁移的控制器;
图12为本发明实施例提供的一种控制器硬件结构图。
具体实施方式
下面通过附图和实施例,对本发明实施例的技术方案做进一步的详细描述。
本发明实施例提供一种IP硬盘之间传输数据的方法和装置。在本发明实施例中,装置至少包括多个IP硬盘和至少一个控制器。所述控制器在接收用户发送的请求及需要迁移的数据的标识(identification,ID)后,确定需要迁移的数据ID所形成的分片信息以及分片数据所在的源IP硬盘和分片数据将要迁移的目标IP硬盘。控制器将对源IP硬盘和/或目标IP硬盘发送指令。源IP硬盘和目标IP硬盘根据指令,将需要迁移的分片数据从源IP硬盘发送到目标IP硬盘。解决了现有技术中数据需要经过控制器,避免了控制器的资源不必要的消耗的问题。
图1为本发明实施例提供的一种数据资源存储系统的硬件结构图。如图1所示,资源存储系统中包括控制器和多个IP硬盘。图1示意给出了第一IP 硬盘、第二IP硬盘和第三IP硬盘。
控制器通常设置在网络中,配置有网络通信接口和地址,例如以太网接口,并配置有TCP/IP协议和IP地址。用户或其它设备通过IP地址寻址到控制器,请求控制器处理数据存储事宜。
IP硬盘是一种存储硬件形态,它配置有以太网接口,采用TCP/IP协议直接和控制器进行网络通信并提供对象存储服务。除此以外,多个IP硬盘可以具有相同的内部结构,也可以具有不同的内部结构,在此不复赘述。
IP硬盘包括存储器和存储控制器,各个IP盘的存储控制器之间可以进行连接,该连接可以是通过网络协议进行连接,也可以是通过其他协议进行连接。通过网络连接时,是通过获取需要连接的IP硬盘的标识信息进行连接。在本发明实施例中,IP硬盘的标识信息为该IP硬盘的IP地址。
在图1中,控制器和IP硬盘设置在不同的网络位置。但是,在本发明的实施例中,资源存储系统控制器和IP硬盘也可以设置在同一设备中。图2为本发明实施例提供的一种IP硬盘和控制器设置在同一设备中的数据资源存储系统硬件结构图。如图2所示,多个IP硬盘可以设置在同一硬件结构中,每个IP硬盘由以太网接口通过网络连接到控制器,将多个IP硬盘组成一个资源存储系统。
在控制器的控制下,不同IP硬盘可以直接发起彼此之间的数据传输,而不必经过控制器进行数据传输。为了表述的方便,在本发明的具体实施例中以两个IP硬盘为例,需要迁移的资源所在的IP硬盘为源IP硬盘,资源将要迁往的IP硬盘为目标IP硬盘。本领域的技术人员理解,这样的数据传输不限于两个IP硬盘之间,也可以扩展适用于任意的多个IP硬盘之间。
图3为本发明实施例提供的控制器硬件结构图,如图3所示,控制器中还包括处理器、存储器和内存。存储器中存储了数据列表,数据列表包括数据ID、数据ID所对应的分片的分片标识和分片所存储的IP硬盘的IP硬盘标识。存储器中存储了指令列表,例如包括接收模块、处理模块和发送模块。 处理器通过将指令列表和数据列表读取到内存中,执行指令列表,根据数据列表进行数据的接收、处理和发送。
在一个例子中,用户向控制器发送一个需要存储的对象。处理器通过调用处理模块将对象存储至IP硬盘中。分片是以分片规则和冗余规则进行,在此不作详细讨论。处理器还将数据分片后的信息写入数据列表中,向数据列表写入的信息包括数据进行分片后所形成的分片的标识信息,存储数据的ID以及分片所存储的IP硬盘的标识。
在另一个例子中,用户向控制器发送了一个数据读取请求,处理器通过执行接收模块对该请求进行接收。该请求中包括了需要读取的数据的ID。处理器通过执行处理模块的指令从数据列表中获取该数据ID所对应的分片,获取分片的分片标识以及各个分片所在的IP硬盘的IP盘标识。处理器通过执行发送模块的指令,向各个分片所对应的IP硬盘发送指令,该指令包括各IP硬盘中需要迁移的分片的分片标识,IP硬盘通过分片标识向处理器发送分片。处理器接收各个IP硬盘返回的分片数据,将分片数据聚合成对象后发送给用户。
在又一个例子中,用户向控制器发送了一个数据迁移请求,处理器通过执行接收模块对该请求进行接收。该请求中包括了需要迁移的数据的ID。处理器通过执行处理模块的指令从数据列表中获取该数据ID所对应的分片标识以及该分片所在IP硬盘的IP盘标识。同时,处理器通过执行处理模块确定该数据所对应的分片将被迁移至哪个IP硬盘。处理器通过执行发送模块向分片所在的源IP硬盘和/或迁移的目标IP硬盘发送指令,所述指令包括需要迁移的分片的分片标识,以及源IP硬盘和/或目标IP硬盘的标识信息。源IP硬盘和/或目标IP硬盘通过获取对方的IP硬盘标识信息建立连接并进行数据迁移。
需要说明的是,这里的硬件架构仅属举例,本发明同样适用于其它类型的控制器架构。
图4为本发明实施例提供的IP硬盘硬件结构图,如图4所示,包括存储介质和存储控制器,存储控制器中包括磁盘控制器和独立的内存。存储介质用于对接收的数据进行存储,同时,存储介质中还包括控制信息的存储。控制信息包括分片信息和控制指令。控制指令例如包括接收模块、处理模块和发送模块等,用于磁盘控制器的调用,从而进行相关操作。分片信息中包括各个分片的分片标识,以及分片在存储介质中的物理地址。分片信息及控制指令在工作过程中通常被调入内存,以方便磁盘控制器的调用。磁盘控制器通过将控制指令和分片信息读取到内存中,执行控制指令,根据分片信息进行分片数据的接收、处理和发送。
在一个例子中,IP硬盘接收控制器发送的分片存入指令以及需要存储的分片数据。控制器通过执行处理模块将分片数据存入IP硬盘的存储介质中。同时,控制器还将各个分片数据的分片的标识信息和分片在存储介质上的物理地址写入分片信息。控制器再向控制器返回操作完成指令。
在另一个例子中,IP硬盘(通过以太网接口和接收模块)接收控制器发送的分片取出指令,该指令包括需要取出的分片的分片标识。控制器通过执行处理模块以及调用分片信息确定需要取出的分片在存储介质上的物理地址。读取物理地址上存储的数据,并将数据通过发送模块和以太网接口发送给控制器。
在又一个例子中,IP硬盘接收控制器发送的分片迁出指令,所述分片迁出指令是将分片迁移至同一控制器下的不同IP硬盘中。迁出指令包括需要迁移的分片的分片标识以及将迁入的目标IP硬盘的IP硬盘标识。控制器通过目标IP硬盘的IP硬盘标识与目标IP硬盘建立连接。控制器还执行处理模块以及调用分片信息确定需要取出的分片在存储介质上的物理地址。读取物理地址上存储的数据,通过与迁移目标IP硬盘建立的连接,将需要迁移的分片发送至目标IP硬盘。
图5为本发明实施例提供的一种IP硬盘之间数据传输的方法流程图。所 述方法应用于存储系统中,所述存储系统包括多个IP硬盘和控制器。该方法的执行主体是控制器。如图6所示,该方法包括:
S501,控制器接收数据迁移请求,所述数据迁移请求包括待迁移数据的标识。
控制器通过通过同学接口接收用户发送的数据的迁移消息,从而根据用户的请求消息进行数据的迁移。在本发明的实施例中,控制器还通过通信接口来接收用户发送的消息,控制器与用户直接连接(例如:通过网络进行连接)。
S502,所述控制器根据所述待迁移数据的标识以及预先设定的对应关系确定所述待迁移数据所在的源IP硬盘以及目标IP硬盘。所述对应关系包括所述待迁移数据的标识、所述源IP硬盘的标识和所述目标IP硬盘的标识之间的对应关系。
在数据存储至IP硬盘前,对需要存储的数据进行分片。因此,在进行迁移前,需要知道迁移的数据在IP硬盘中所包括的分片。根据数据所包括的分片,确定迁移的分片所在的IP硬盘。
存储器中存储有待迁移数据的标识以及预先设定的对应关系,确定所述待迁移数据所在的源IP硬盘以及目标IP硬盘。对应关系包括所述待迁移数据的标识、所述源IP硬盘的标识和所述目标IP硬盘的标识之间的对应关系。
根据对应关系确定源IP硬盘和目标IP硬盘后,对需要迁移的数据所在的源IP硬盘发出迁移指令,使迁移目标IP硬盘获取需要迁移的对象。
IP硬盘获取控制器发送的分片数据后,磁盘控制器将自动把分片数据存储在IP硬盘中,并在该IP硬盘中存储分片的信息。
当控制器获取用户发送的数据迁移请求时,将对该请求消息进行分析,确定需要迁移的数据。控制器还将查询该数据的分片,并通过存储器中存储的对应关系确定该分片在哪个IP硬盘中。控制器将根据请求信息以及磁盘中 保存的算法,确定该对象的迁移目标位置。
S503,控制器向所述源IP硬盘发送所述目标IP硬盘的标识,所述控制器向所述目标IP硬盘发送所述源IP硬盘的标识,以用于所述源IP硬盘和所述目标IP硬盘建立连接。
在本发明的实施例中,包括三种发送方式。分别为向原IP硬盘发送数据迁移指令,数据迁移指令包括目标IP硬盘的标识信息。向目标IP硬盘发送数据迁移指令,数据迁移指令包括源IP硬盘的标识信息。向源IP硬盘发送的数据迁移指令包括目标IP硬盘的标识信息,向目标IP硬盘发送的数据迁移指令包括源IP硬盘的标识信息。向目标IP硬盘发送的指令包括源IP硬盘的标识信息。
对象所在IP硬盘和/或迁移目标IP硬盘在获取对方IP硬盘的IP硬盘标识后,通过获取的IP硬盘标识建立连接。当数据所在的源IP硬盘和迁移目标盘建立连接后还分别通过磁盘控制器向控制器进行返回,控制器收到成功建立连接的信息后再分别向源IP硬盘和目标IP硬盘发送开始传输的命令。
S504,在所述源IP硬盘和所述目标IP硬盘建立连接之后,所述控制器向所述源IP硬盘发送数据迁移指令,所述指令包括所述待迁移数据的标识。
当目标IP硬盘和源IP硬盘建立连接后,控制器还分别向源IP硬盘和目标IP硬盘发送指令。所述向源IP硬盘发送指令,用于指示源IP硬盘,读取相应数据,根据与目标IP硬盘建立的连接向目标IP硬盘发送数据。所述向目标IP硬盘发送指令,用于指示目标IP硬盘,根据与源IP硬盘建立的连接,读取源IP硬盘发送的相应分片的数据并进行存储。
S505,所述源IP硬盘根据所述待迁移数据的标识读取所述待迁移数据,并发送给所述目标IP硬盘。
源IP硬盘根据存储的分片标识,读取相应的数据。源IP硬盘根据与目标IP硬盘建立的连接,向目标IP硬盘发送相应的数据。目标IP硬盘根据源 IP硬盘的标识的标识,对源IP硬盘发送的需要迁移的数据进行读取。当迁移完成后,源IP硬盘和目标IP硬盘分别向控制器进行返回。控制器再向用户返回成功进行了数据迁移的操作。
图6为本发明实施例提供的一种IP硬盘之间数据迁移的流程图,该方法的执行主体是需要迁移的数据资源所在的源IP硬盘。如图6所示,该方法包括:
S601,接收数据迁移指令,所述指令包括需要迁移的数据ID有关的分片信息和迁移目标地IP硬盘标识信息。
根据指令确定将要进行的操作,在本发明实施例中,所要进行的操作为数据迁移。通过数据ID有关的分片信息,确定该分片信息所对应的分片数据在的源IP硬盘的存储位置。通过目标IP硬盘标识信息,向目标IP硬盘发送信息。
S602,通过获取的目标IP硬盘标识信息确定需要迁移的数据的目标盘。
在本发明的实施例中,目标IP硬盘的标识信息为目标IP硬盘的IP地址。源IP硬盘通过获得目标IP硬盘的IP地址从而确定对象将要迁往的目标IP硬盘。由于源IP硬盘和目标IP硬盘已建立连接,从而目标IP硬盘与源IP硬盘直接进行通信。
S603,通过源IP硬盘和目标IP硬盘建立的连接,向目标IP硬盘发送分片数据。
在本发明实施例中,源IP硬盘和目标IP硬盘之间已建立连接,在确定迁移目标IP硬盘后,向目标IP硬盘发送信息,该信息包括需要迁移的分片数据。
在再一个例子中,IP硬盘接收控制器发送的分片迁入指令,分片迁入指令是将分片从同一控制器下的不同IP硬盘迁入。迁入指令包括分片的分片标识以及该分片所在的源IP硬盘的IP硬盘标识。控制器通过源IP硬盘的IP硬盘标识与源IP硬盘建立连接。控制器还通过执行发送模块,利用与原IP 硬盘建立的连接,向源IP硬盘发送需要迁移的分片。控制器通过执行接收模块获取源IP硬盘发送的分片数据,并存储至存储介质中。磁盘控制器还将接收的分片的分片标识以及分片在存储介质中的物理地址写入到分片信息中,再向控制器返回处理完成。
图7为本发明实施例提供的一种IP硬盘之间数据迁移流程图,该方法的执行主图可以是目标IP硬盘。如图7所示,该方法包括:
S701接收数据迁移指令,所述指令包括需要迁移的数据ID有关的分片信息和分片数据所在的源IP硬盘的标识信息。
根据指令确定将要进行的操作,在本发明实施例中,所要进行的操作为数据的迁移。通过数据ID有关的分片信息,确定需要获取的分片数据。通过目标IP硬盘标识信息,向目标IP硬盘发送信息。所述信息包括需要获取的分片数据的分片信息,使源IP硬盘向目标IP硬盘发送该分片数据。
S702通过获取的所述源IP硬盘标识信息确定需要迁移的数据所在盘为目标IP硬盘。
在本发明的实施例中,源IP硬盘的标识信息为源IP硬盘的IP地址。目标IP硬盘通过获得源IP硬盘的IP地址从而确定对象所在的IP硬盘。由于源IP硬盘和目标IP硬盘已建立连接,从而目标IP硬盘与源IP硬盘直接进行通信。
S703通过目标IP硬盘和源IP硬盘建立的连接,接收源IP硬盘发送的分片数据。
在本发明实施例中,源IP硬盘和目标IP硬盘之间已建立连接,在确定对象所在盘为源IP硬盘后,向目标IP硬盘发送信息,使源IP硬盘将需要迁移的分片数据发送至目标IP硬盘。目标IP硬盘将对源IP硬盘发送的数据进行接收和存储。
下面,通过一个例子对本发明具体实施例的数据迁移作出更完整的说明。本发明的实施例中包括控制器、源IP盘、目标IP盘。控制器用于对整个资 源存储系统中的IP硬盘进行控制,将外部获得的数据进行分片后发送到各个IP硬盘进行存储。控制器还通过接口(例如以太网接口)连接到外部的用户,从而获取需要存储的数据以及接受请求,将存储的读写发送至用户。
控制器将确定该数据在存储系统中包含的分片,以及确定该分片被存储在哪个IP硬盘中。在确定了需要迁移的数据的存储位置后,控制器还将确定需要迁移的资源将被迁入哪个IP硬盘中。确定迁移目标盘可以通过设置在控制器中的选取规则进行选取。在一个例子中,所述迁移规则为剩余存储空间最大的IP硬盘,当然也可以是其它任何规则,迁移目标盘的确定不作为本发明实施例范围的限定。在本发明的实施例中,将迁移目标盘确定为第二IP硬盘。
在确定迁移数据存储在源IP硬盘和迁移目标IP硬盘后,控制器将分别向源IP硬盘和目标IP硬盘发送指令。发送至源IP硬盘的指令包括需要迁移的分片信息,以及迁移目标盘的标识信息。控制器发送至目标IP硬盘的指令包括需要迁移的分片信息,以及对象所在的IP硬盘。源IP硬盘的磁盘控制器和目标IP硬盘的磁盘控制器在接收上述信息后,将通过各自的磁盘控制器建立连接。源IP硬盘和目标IP硬盘建立连接包括利用接收的对方IP硬盘的标识进行进行验证。以及相互发送需要迁移的数据的分片,以确定需要迁移的数据。
当源IP硬盘和目标IP硬盘建立连接后还分别通过磁盘控制器向控制器进行返回,控制器收到成功建立连接的信息后再分别向源IP硬盘和目标IP硬盘发送开始传输的命令。当数据迁移完成后,源IP硬盘和目标IP硬盘分别向控制器进行返回。控制器再向用户返回成功进行了数据迁移的操作。
在本发明的实施例中,还包括一种源IP硬盘和目标IP硬盘已完成连接的情况。此时,仅需向其中一个IP硬盘(例如目标IP硬盘)发送指令。图8为本发明实施例提供的一种IP硬盘数据传输时指令流向图。如图8所示,若源IP硬盘为需要迁移的数据所在的IP硬盘,目标IP硬盘为数据迁移的目标 地址IP硬盘。本发明的实施例通过控制器直接发送指令至目标IP硬盘,使源IP硬盘和目标IP硬盘建立连接,从而直接将资源从源IP硬盘传输至目标IP硬盘。达到不占用控制器的计算和网络资源,使数据传输更高效的目的。
图8所示的数据流向只是本发明实施中的一种具体实施方式。在本发明实施例中,还包括一种与图8相反的数据流向的关系图。图9为本发明实施例提供的另一种IP硬盘数据传输时指令流向图,如图9所示,源IP硬盘为需要迁移的资源所在的IP硬盘,目标IP硬盘为需要迁移的资源迁移的目标地址IP硬盘。控制器直接发送指令至源IP硬盘,使目标IP硬盘和源IP硬盘建立连接,从而直接将资源从源IP硬盘传输至目标IP硬盘。
下面,通过一个具体的例子对本发明实施例的数据迁移作解释。用户向资源存储系统发出一个对象迁移请求。该请求的数据ID为“Movie”,在数据在存储时候通过分片分为五个分片。图10为本发明实施例提供的一种控制器中包括的数据列表,如图10所示,数据列表包括对象ID、分片标识和IP盘标识三项信息。其中,本发明实施例需要迁移的对象ID“Movie”包括5个分片。五个分片的分片标识分别为“001”、“002”、“003”、“004”、“005”,五个分片都存储在IP盘标识信息为“192.168.1.1”中,本发明实施例中IP盘标识信息为该IP盘的IP地址。由此,控制器获取需要迁移的数据包括的分片的分片标识为“001”、“002”、“003”、“004”、“005”。源盘为IP地址为“192.168.1.1”的盘,在本发明实施例中,为了表述方便标识为源IP硬盘。迁移目标盘根据算法进行选择,在本发明实施例中,选择IP盘标识信息为“192.168.1.2”的IP硬盘,表示为目标IP硬盘。
控制器向源IP硬盘发送数据迁出指令,指令中包括的分片标识为“001”、“002”、“003”、“004”、“005”,包括的目标盘IP地址为“192.168.1.2”。控制器向目标IP硬盘发送数据迁入指令,指令中包括的分片标识为“001”、“002”、“003”、“004”、“005”,包括的源盘IP地址为“192.168.1.1”。
源IP硬盘和目标IP硬盘通过对方的IP地址及TCP/IP协议与对方盘建 立连接。源IP硬盘通过分片标识获取存储介质中对应的物理地址中存储的分片,将该分片通过与目标IP硬盘建立的连接发送至目标IP硬盘。目标IP硬盘根据分片标识将标识信息为“001”、“002”、“003”、“004”、“005”的分片存储至目标IP硬盘的存储介质中。源IP硬盘和目标IP硬盘在发送和接收完成后还将向控制器返回消息,控制器根据返回的消息修改数据列表,将数据“Movie”对应的IP盘标识修改为“192.168.1.2”,再向用户返回处理完成。
图11为本发明实施例提供的一种用于数据迁移的控制器,如图11所示,包括处理单元1101、发送单元1102和接收单元1103。
接收单元1103,用于控制器接收数据迁移请求,所述数据迁移请求包括待迁移数据的标识。
处理单元1101,用于根据所述待迁移数据的标识以及预先设定的对应关系确定所述待迁移数据所在的源IP硬盘以及目标IP硬盘。所述对应关系包括所述待迁移数据的标识、所述源IP硬盘的标识和所述目标IP硬盘的标识之间的对应关系。
发送单元1102,用于向所述源IP硬盘发送所述目标IP硬盘的标识,所述控制器向所述目标IP硬盘发送所述源IP硬盘的标识,以用于所述源IP硬盘和所述目标IP硬盘建立连接。
以及,用于在所述源IP硬盘和所述目标IP硬盘建立连接之后,向所述源IP硬盘发送数据迁移指令,所述指令包括所述待迁移数据的标识。
已达到所述源IP硬盘根据所述待迁移数据的标识读取所述待迁移数据,并发送给所述目标IP硬盘。
下面,通过一个例子对本发明实施例控制器结合其它部分的操作流程进行说明。为了控制器的说明更加的清晰,下述例子中还包括了与处理器相连接的其它结构,包括向控制器发送请求的用户,以及接收控制操作的源存储器和目标存储器。
控制器通过接口连接到用户,从而接受用户发送的请求,完成对数据的迁移或复制等指令。控制器与用户之间的连接可以是任何形式或方法,在本发明的实施例中,通过以太网接口进行连接。用户与控制器后,将数据发送至控制器的接收单元。控制器与各个IP硬盘之间通过网络连接。各个IP硬盘之间还进行连接,该连接可以是通过网络协议进行连接,也可以是通过其他协议进行连接。从而使各个IP硬盘之间可以进行数据的传输。
接收单元通过网络连接获取到用户发送的数据迁移的指令,接收单元将接收的指令传输至处理单元,通过处理单元进行解析。处理单元对指令进行解析包括获取该信息中包含的需要迁移的数据。处理单元确定该数据被存储在哪个IP硬盘中。在本发明的一个例子中,需要迁移的数据被存储在源IP硬盘中。
在确定了需要迁移的数据的存储位置后,处理单元还将根据需要迁移的资源以及该资源所在的IP硬确定将资源迁入哪个目标IP硬盘中。在本发明的实施例中,由于只有两个IP硬盘,因此在本发明的一个例子中,需要迁移的数据被迁移至目标IP硬盘。确定迁移目标IP硬盘的算法可以通过设置在控制器中的规则进行选取,迁移目标IP硬盘的确定不作为本发明实施例范围的限定。
在确定迁移资源所存储的源IP硬盘和迁移的目标IP硬盘后,处理单元将发出数据的迁移指令和迁移目标盘的标识信息的消息,发送单元将把该消息发送至资源所在的源IP硬盘。同时,控制器还将发出数据迁移指令以及资源所在源IP硬盘的标识信息,发送单元将把该消息发送至迁移目标IP硬盘中。资源所在的源IP硬和迁移目标IP硬盘在接收上述信息后,将通过上述的标识信息建立连接。迁移目标IP硬盘还将建立相应的存储空间。源IP硬盘和目标IP硬盘建立连接包括通过处理单元发送的标识进行进行验证。
当源IP硬盘和目标IP硬盘之间建立连接后,源IP硬盘和目标IP硬盘还分别向处理单元返回成功建立连接的信息。处理单元在接收到成功建立连 接的信息后,分别向源IP硬盘和目标IP硬盘发送开始传输数据的指令。源IP硬盘根据指令向目标IP硬盘发送需要迁移的资源。目标IP硬盘将接收的资源存储至新建立的存储空间中。当源IP硬盘和目标IP硬盘发送和接收完成后,还分别通过发送单元向处理单元返回成功进行数据迁移的指令。处理单元在接收源IP硬盘和目标IP硬盘的指令后,将向用户返回处理结果。
图8为本发明实施例提供的一种资源均衡设备示意图。
如图12所示,所述设备包括:处理器1201、存储器1202、通信接口1203和总线1204。其中,处理器1201、存储器1202和通信接口1203通过总线1204实现彼此之间的通信连接。
处理器1201可以采用通用的中央处理器(Central Processing Unit,CPU),微处理器,应用专用集成电路(Application Specific Integrated Circui t,ASIC),或者一个或多个集成电路,用于执行相关程序,以实现前述本发明方法实施例所提供的技术方案。
存储器1202可以是只读存储器(Read Only Memory,ROM),静态存储设备,动态存储设备或者随机存取存储器(Random Access Memory,RAM)。存储器1202可以存储操作系统和其他应用程序。在通过软件或者固件来实现本发明实施例提供的技术方案时,用于实现本发明前述方法实施例提供的任一可选技术方案的程序代码保存在存储器1202中,并由处理器1201来执行。通信接口1203用以与其他交换机或控制服务器通信。
总线1204可包括一通路,在设备各个部件(例如处理器1201、存储器1202和通信接口1203)之间传送信息。
专业人员应该还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每 个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。
结合本文中所公开的实施例描述的方法或算法的步骤可以用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。
以上所述的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本发明的具体实施方式而已,并不用于限定本发明的保护范围,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。

Claims (5)

  1. 一种IP硬盘之间传输数据的方法,其特征在于,所述方法应用于存储系统中,所述存储系统包括多个IP硬盘和控制器,方法包括:
    所述控制器接收数据迁移请求,所述数据迁移请求包括待迁移数据的标识;
    所述控制器根据所述待迁移数据的标识以及预先设定的对应关系确定所述待迁移数据所在的源IP硬盘以及目标IP硬盘,所述对应关系包括所述待迁移数据的标识、所述源IP硬盘的标识和所述目标IP硬盘的标识之间的对应关系;
    所述控制器向所述源IP硬盘发送所述目标IP硬盘的标识,所述控制器向所述目标IP硬盘发送所述源IP硬盘的标识,以用于所述源IP硬盘和所述目标IP硬盘建立连接;
    在所述源IP硬盘和所述目标IP硬盘建立连接之后,所述控制器向所述源IP硬盘发送数据迁移指令,所述指令包括所述待迁移数据的标识;
    所述源IP硬盘根据所述待迁移数据的标识读取所述待迁移数据,并发送给所述目标IP硬盘。
  2. 根据权利要求1所述的方法,其特征在于,所述第一IP硬盘的标识信息为第一IP硬盘的IP地址;所述第二IP硬盘的标识信息为第二IP硬盘的IP地址。
  3. 一种控制器,所述控制器应用于存储系统中,所述存储系统包括多个IP硬盘和控制器,其特征在于,所述控制器包括:处理器和通信接口;
    所述通信接口用于与多个IP硬盘通信;
    所述装置运行时,处理器用于执行权利要求1至2任一项所述的方法。
  4. 一种数据传输装置,所述装置应用于存储系统,所述存储系统包括多个IP硬盘和控制器,其特征在于,所述控制器包括:
    接收单元,用于控制器接收数据迁移请求,所述数据迁移请求包括待 迁移数据的标识;
    处理单元,用于根据所述待迁移数据的标识以及预先设定的对应关系确定所述待迁移数据所在的源IP硬盘以及目标IP硬盘。所述对应关系包括所述待迁移数据的标识、所述源IP硬盘的标识和所述目标IP硬盘的标识之间的对应关系;
    发送单元,用于向所述源IP硬盘发送所述目标IP硬盘的标识,所述控制器向所述目标IP硬盘发送所述源IP硬盘的标识,以用于所述源IP硬盘和所述目标IP硬盘建立连接;以及,用于在所述源IP硬盘和所述目标IP硬盘建立连接之后,向所述源IP硬盘发送数据迁移指令,所述指令包括所述待迁移数据的标识;以使所述源IP硬盘根据所述待迁移数据的标识读取所述待迁移数据,并发送给所述目标IP硬盘。
  5. 根据权利要求4所述的装置,其特征在于,所述第一IP硬盘的标识信息为第一IP硬盘的IP地址;所述第二IP硬盘的标识信息为第二IP硬盘的IP地址。
PCT/CN2016/110794 2015-12-23 2016-12-19 一种ip硬盘之间传输数据的方法和装置 WO2017107886A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510981553.4A CN105700823A (zh) 2015-12-23 2015-12-23 一种ip硬盘之间传输数据的方法和装置
CN201510981553.4 2015-12-23

Publications (1)

Publication Number Publication Date
WO2017107886A1 true WO2017107886A1 (zh) 2017-06-29

Family

ID=56228300

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/110794 WO2017107886A1 (zh) 2015-12-23 2016-12-19 一种ip硬盘之间传输数据的方法和装置

Country Status (2)

Country Link
CN (1) CN105700823A (zh)
WO (1) WO2017107886A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105700823A (zh) * 2015-12-23 2016-06-22 华为技术有限公司 一种ip硬盘之间传输数据的方法和装置
CN109901786B (zh) * 2017-12-08 2021-07-16 腾讯科技(深圳)有限公司 数据迁移方法、系统、装置及计算机可读存储介质
CN109246198B (zh) * 2018-08-16 2022-01-07 杭州数梦工场科技有限公司 一种基于分布式存储集群的云主机启动控制方法和系统
CN113468140B (zh) * 2021-06-30 2023-04-07 上海掌门科技有限公司 数据迁移处理方法、电子设备及计算机可读存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102215268A (zh) * 2011-07-14 2011-10-12 北京飞杰信息技术有限公司 一种迁移文件数据的方法和装置
CN103516755A (zh) * 2012-06-27 2014-01-15 华为技术有限公司 虚拟存储方法及设备
CN104077239A (zh) * 2014-06-24 2014-10-01 华为技术有限公司 Ip硬盘与存储系统,及其数据操作方法
CN105700823A (zh) * 2015-12-23 2016-06-22 华为技术有限公司 一种ip硬盘之间传输数据的方法和装置

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5953744A (en) * 1997-01-02 1999-09-14 Exabyte Corporation Replication of contents of hard disk to hard disk of greater storage capacity through adjustment of address fields in sectors
CN100337224C (zh) * 2003-12-03 2007-09-12 华为技术有限公司 一种本地数据迁移的方法
CN103995745B (zh) * 2014-05-22 2017-09-05 华为技术有限公司 一种ip硬盘任务执行方法以及ip硬盘

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102215268A (zh) * 2011-07-14 2011-10-12 北京飞杰信息技术有限公司 一种迁移文件数据的方法和装置
CN103516755A (zh) * 2012-06-27 2014-01-15 华为技术有限公司 虚拟存储方法及设备
CN104077239A (zh) * 2014-06-24 2014-10-01 华为技术有限公司 Ip硬盘与存储系统,及其数据操作方法
CN105700823A (zh) * 2015-12-23 2016-06-22 华为技术有限公司 一种ip硬盘之间传输数据的方法和装置

Also Published As

Publication number Publication date
CN105700823A (zh) 2016-06-22

Similar Documents

Publication Publication Date Title
JP6621838B2 (ja) 仮想デスクトップ・インフラストラクチャにおける複数のプロトコルの使用
US10664301B2 (en) Methods and systems for establishing connections associated with virtual machine migrations
US9912560B2 (en) Method and device for checking health of link
WO2021051880A1 (zh) 资源数据获取的方法、装置、计算机设备和存储介质
US10416996B1 (en) System and method for translating affliction programming interfaces for cloud platforms
WO2017107886A1 (zh) 一种ip硬盘之间传输数据的方法和装置
US11611545B2 (en) RDP proxy support in presence of RDP server farm with session directory or broker
US20140317336A1 (en) Local direct storage class memory access
US11442928B2 (en) Multi-tenant provider network database connection management and governance
CN113196237A (zh) 计算系统中的容器迁移
JP2019528489A (ja) マルチテナント・データベース環境においてテナントの動的再配置を提供するためのシステムおよび方法
US9948568B2 (en) Packet size control using maximum transmission units for facilitating packet transmission
WO2018001023A1 (zh) 一种云终端登录虚拟桌面方法及装置
US20170054765A1 (en) Systems and methods for establishing a control channel between a virtualization server and a client device
US11076027B1 (en) Network communications protocol selection based on network topology or performance
WO2016095644A1 (zh) 数据库的高可用解决方法和装置
US10523741B2 (en) System and method for avoiding proxy connection latency
US11341104B1 (en) In place resize of a distributed database
US11881996B2 (en) Input and output for target device communication
US10977069B2 (en) Systems and methods for performing virtual machine updates without rebuild of distributed databases thereon
US10110683B2 (en) Systems and methods for maintaining ownership of and avoiding orphaning of communication sessions
WO2019006696A1 (zh) 集群服务器的虚拟机迁移方法、装置、服务器及存储介质
WO2016123744A1 (zh) 网络文件系统中处理i/o请求的方法及设备
WO2015117380A1 (zh) 一种远程桌面协议网关进行路由交换的方法、设备及系统
US9454413B1 (en) Systems and methods for handling communications between network applications

Legal Events

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

Ref document number: 16877696

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16877696

Country of ref document: EP

Kind code of ref document: A1