CN108509155B - Method and device for remotely accessing disk - Google Patents

Method and device for remotely accessing disk Download PDF

Info

Publication number
CN108509155B
CN108509155B CN201810279161.7A CN201810279161A CN108509155B CN 108509155 B CN108509155 B CN 108509155B CN 201810279161 A CN201810279161 A CN 201810279161A CN 108509155 B CN108509155 B CN 108509155B
Authority
CN
China
Prior art keywords
hard disk
terminal
agent
network
disk
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.)
Active
Application number
CN201810279161.7A
Other languages
Chinese (zh)
Other versions
CN108509155A (en
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.)
Shenzhen Union Memory Information System Co Ltd
Original Assignee
Shenzhen Union Memory Information System 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 Shenzhen Union Memory Information System Co Ltd filed Critical Shenzhen Union Memory Information System Co Ltd
Priority to CN201810279161.7A priority Critical patent/CN108509155B/en
Publication of CN108509155A publication Critical patent/CN108509155A/en
Application granted granted Critical
Publication of CN108509155B publication Critical patent/CN108509155B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/0604Improving or facilitating administration, e.g. storage management
    • G06F3/0607Improving or facilitating administration, e.g. storage management by facilitating the process of upgrading existing storage systems, e.g. for improving compatibility between host and storage device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0659Command handling arrangements, e.g. command buffers, queues, command scheduling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

Abstract

The invention provides a method and a device for remotely accessing a disk, wherein a write command is obtained through a first terminal; sending the write command to a hard disk agent; after the hard disk agent obtains the write command, the hard disk agent encapsulates the write command and write data into a network message and sends the network message to a second hard disk entity; the second hard disk entity executes the write command, obtains a first operation result, and sends the first operation result to the hard disk agent through a network; and sending a completion command according to the first operation result to the first terminal, and completing the write command. The problem that a user host cannot be directly executed for an application program on a remote disk in the prior art is solved; or the user host needs to run a special program to access the remote disk, so that the file system can seamlessly use the remote disk as if the local disk is used; the technical effects of the OS and the upper application program do not need to be additionally modified or special programs need to be operated.

Description

Method and device for remotely accessing disk
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for remotely accessing a disk.
Background
The host shares the remote hard disk through the network, which is a common usage scenario. There are two types of solutions currently on the market: (1) embedded equipment of a hard disk carried. The device is provided with a network interface (Ethernet or WLAN interface), and a network application program (such as FTP and DLNA Upnp) runs on the device. And running a network application program on the host of other users to access the remote hard disk. (2) The server is a special storage server, and the server carries a hard disk, runs a Network File System (NFS) server, or runs a special network application program (samba or UPNP, DLNA, ftp and the like), and the client host also runs an NFS client or a special network program to access the remote hard disk.
However, in the process of implementing the technical solution of the invention in the embodiments of the present application, the inventors of the present application find that the above-mentioned technology has at least the following technical problems:
in the prior art, for an application program on a remote disk, a user host cannot be directly executed, but needs to be copied to the local for execution; or the user host needs to run a special program (especially in the case of the remote device running a private network protocol) to access the remote disk.
Disclosure of Invention
The embodiment of the invention provides a method and a device for remotely accessing a disk, which solve the problems that in the prior art, a user host cannot be directly executed but needs to be copied to the local for execution for an application program on a remote disk; or the user host needs to run a special program to access the remote disk, so that the file system can seamlessly use the remote disk as if the local disk is used; the block device is ensured to be unchanged, and the difference of a physical transmission layer is completely shielded from a user host; the technical effects of no extra modification or special program operation for the difference of local disk access and remote disk access are needed by OS (operating system) and upper application program.
In view of the foregoing, embodiments of the present application are proposed to provide a method and apparatus for remotely accessing a disk.
In a first aspect, the present invention provides a method for remotely accessing a disk, which is applied to a first terminal and a second terminal, wherein the first terminal has a hard disk agent, and the second terminal remotely accesses the hard disk agent through a network, and is characterized in that the hard disk agent has the same host interface function as a common hard disk, and the hard disk agent itself does not have a storage medium; the second terminal is provided with a second hard disk entity, and the second hard disk entity is connected with the hard disk agent through a network; wherein the method comprises the following steps:
the first terminal obtains a write command; sending the write command to a hard disk agent; after the hard disk agent obtains the write command, the hard disk agent encapsulates the write command and write data into a network message and sends the network message to a second hard disk entity; the second hard disk entity executes the write command, obtains a first operation result, and sends the first operation result to the hard disk agent through a network; and sending a completion command according to the first operation result to the first terminal, and completing the write command.
Preferably, the method further comprises:
the first terminal obtains a disk management command;
the first terminal is provided with a disk agent, and the disk agent operates the disk management command.
Preferably, after obtaining the write command, the hard disk agent encapsulates the write command and the write data into a network packet and sends the network packet to the second hard disk entity, further comprising: the hard disk agent is provided with a PCIE interface and a network interface, wherein the PCIE interface and the network interface can operate simultaneously; the second hard disk entity is provided with a PCIE interface and a network interface, wherein the PCIE interface and the network interface can not run simultaneously.
Preferably, the method further comprises:
when the first terminal and the second terminal both run the operating system, the second hard disk entity cannot share the storage space of the disk by using the network interface of the second hard disk entity, and the second hard disk entity can share the storage space of the disk by using the PCIE interface of the second hard disk entity.
Preferably, the method further comprises:
when the first terminal runs the operating system and the second terminal closes the operating system, the first terminal and the second terminal share the storage space of the disk through the network.
In a second aspect, the present invention provides a device for remotely accessing a disk, which is applied to a first terminal and a second terminal, wherein the first terminal has a hard disk agent, and the second terminal remotely accesses the hard disk agent through a network, and is characterized in that the hard disk agent has the same host interface function as a common hard disk, and the hard disk agent itself does not have a storage medium; the second terminal is provided with a second hard disk entity, and the second hard disk entity is connected with the hard disk agent through a network; wherein the apparatus comprises:
a first obtaining unit, configured to obtain a write command by the first terminal;
a first sending unit, configured to send the write command to a hard disk agent;
the second sending unit is used for encapsulating the write command and the write data into a network message and sending the network message to a second hard disk entity after the hard disk agent obtains the write command;
the first execution unit is used for the second hard disk entity to execute the write command, obtain a first operation result and send the first operation result to the hard disk agent through a network;
and the third sending unit is used for sending a completion command according to the first operation result to the first terminal, and the write command is completed.
Preferably, the apparatus further comprises:
a second obtaining unit, configured to obtain, by the first terminal, a disk management command;
and the first operation unit is used for the first terminal to be provided with a disk agent, and the disk agent operates the disk management command.
Preferably, after obtaining the write command, the hard disk agent encapsulates the write command and the write data into a network packet and sends the network packet to the second hard disk entity, further comprising:
the second sending unit comprises a hard disk agent which is provided with a PCIE interface and a network interface, wherein the PCIE interface and the network interface can operate simultaneously;
the second sending unit comprises a second hard disk entity which is provided with a PCIE interface and a network interface, wherein the PCIE interface and the network interface can not run simultaneously.
Preferably, the apparatus further comprises:
the second sending unit comprises a second hard disk entity which can not use the storage space of the shared disk of the network interface of the second hard disk entity under the condition that the first terminal and the second terminal both run the operating system, and the second hard disk entity can share the storage space of the shared disk of the PCIE interface of the second hard disk entity.
Preferably, the apparatus further comprises:
the second sending unit comprises a storage space of a disk shared by the first terminal and the second terminal through a network when the first terminal runs the operating system and the second terminal closes the operating system.
In a third aspect, the present invention provides an apparatus for remotely accessing a disk, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps: the first terminal obtains a write command; sending the write command to a hard disk agent; after the hard disk agent obtains the write command, the hard disk agent encapsulates the write command and write data into a network message and sends the network message to a second hard disk entity; the second hard disk entity executes the write command, obtains a first operation result, and sends the first operation result to the hard disk agent through a network; and sending a completion command according to the first operation result to the first terminal, and completing the write command.
One or more technical solutions in the embodiments of the present application have at least one or more of the following technical effects:
the method and the device for remotely accessing the disk are applied to a first terminal and a second terminal, wherein the first terminal is provided with a hard disk agent, and the second terminal remotely accesses the hard disk agent through a network; the second terminal is provided with a second hard disk entity, and the second hard disk entity is connected with the hard disk agent through a network; obtaining a write command through the first terminal; sending the write command to a hard disk agent; after the hard disk agent obtains the write command, the hard disk agent encapsulates the write command and write data into a network message and sends the network message to a second hard disk entity; the second hard disk entity executes the write command, obtains a first operation result, and sends the first operation result to the hard disk agent through a network; and sending a completion command according to the first operation result to the first terminal, and completing the write command. The problem that a user host cannot be directly executed for an application program on a remote disk but needs to be copied to the local for execution in the prior art is solved; or the client host needs to run a special program to access the remote disk, so that the file system can seamlessly use the remote disk as if the local disk is used, the block device is ensured to be unchanged, and the difference of a physical transmission layer is completely shielded for the user host; the technical effects of no extra modification or special program operation for the difference of local disk access and remote disk access are needed by the OS and the upper layer application program.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
FIG. 1 is a flowchart illustrating a method for remotely accessing a disk according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of an apparatus for remotely accessing a disk according to an embodiment of the present invention;
Detailed Description
The embodiment of the invention provides a method and a device for remotely accessing a disk, and the technical scheme provided by the invention has the following general idea: the first terminal obtains a write command; sending the write command to a hard disk agent; after the hard disk agent obtains the write command, the hard disk agent encapsulates the write command and write data into a network message and sends the network message to a second hard disk entity; the second hard disk entity executes the write command, obtains a first operation result, and sends the first operation result to the hard disk agent through a network; and sending a completion command according to the first operation result to the first terminal, and completing the write command. The problem that a user host cannot be directly executed for an application program on a remote disk but needs to be copied to the local for execution in the prior art is solved; or the client host needs to run a special program to access the remote disk, so that the file system can seamlessly use the remote disk as if the local disk is used, the block device is ensured to be unchanged, and the difference of a physical transmission layer is completely shielded for the user host; the technical effects of no extra modification or special program operation for the difference of local disk access and remote disk access are needed by the OS and the upper layer application program.
The technical solutions of the present invention are described in detail below with reference to the drawings and specific embodiments, and it should be understood that the specific features in the embodiments and examples of the present invention are described in detail in the technical solutions of the present application, and are not limited to the technical solutions of the present application, and the technical features in the embodiments and examples of the present application may be combined with each other without conflict.
In order to more clearly disclose an SSD hard disk under multiple CPUs provided by the embodiments of the present application, related terms are described below.
The hard disk is solid State disk (ssd), which is called a fixed disk for short, and is a hard disk made of a solid State electronic memory chip array, and is composed of a control unit and a memory unit (FLASH chip, DRAM chip). The SSD hard disk has the characteristics of high reading and writing speed, low power consumption, no noise, vibration resistance, low heat, small volume and large working temperature range.
NVMe (Non-Volatile Memory express), which is a protocol built on m.2 interface like AHCI, is a protocol designed specifically for flash-like storage. NVMe specifies communication connection between the SSD controller and an operating system, and improves the performance and the reliability of the SSD. Specific advantages of NVMe include: the performance is improved by several times; the delay can be reduced by more than 50%; NVMe PCIe SSD can provide IOPs ten times as much as high-end enterprise-level SATA SSDs; the automatic power consumption state switching and dynamic energy consumption management functions greatly reduce power consumption; scalable capabilities to support technological development for the next decade.
Proxy servers (Proxy, Proxy Server) are an important Server security function, and work mainly at the session layer of the Open System Interconnection (OSI) model, thereby functioning as a firewall. Proxy servers are mostly used to connect INTERNET and Local Area Network.
The buffer (buffer) refers to a buffer register, which is divided into an input buffer and an output buffer. The former is used for temporarily storing data sent by an external device so that the processor can take the data away; the latter function is to temporarily store data sent by the processor to the peripheral. With the numerical control buffer, the CPU working at high speed and the peripheral working at low speed can be coordinated and buffered, and the synchronization of data transmission is realized.
Example one
Fig. 1 is a flowchart illustrating a method for remotely accessing a disk according to an embodiment of the present invention. As shown in fig. 1, the method is applied to a first terminal and a second terminal, wherein the first terminal has a hard disk agent, and the second terminal accesses the hard disk agent remotely through a network, and is characterized in that the hard disk agent has the same host interface function as a common hard disk, and the hard disk agent itself does not have a storage medium; the second terminal is provided with a second hard disk entity, and the second hard disk entity is connected with the hard disk agent through a network; wherein the method comprises the following steps:
step 110: the first terminal obtains a write command;
step 120: and sending the write command to a hard disk agent.
Specifically, the first terminal obtains a write command and sends the write command to the hard disk agent. And the hard disk Proxy-SSD-fe simulates a real SSD device interface for host. The tasks comprise: creating an nvme device; processing admin (super Admin) commands; and issuing the I/O command and the command data to a network layer.
Step 130: after the hard disk agent obtains the write command, the hard disk agent encapsulates the write command and write data into a network message and sends the network message to a second hard disk entity;
further, after obtaining the write command, the hard disk agent encapsulates the write command and the write data into a network packet and sends the network packet to a second hard disk entity, and the method further includes: the hard disk agent is provided with a PCIE interface and a network interface, wherein the PCIE interface and the network interface can operate simultaneously; the second hard disk entity is provided with a PCIE interface and a network interface, wherein the PCIE interface and the network interface can not run simultaneously. SSD front end (fronted) of second hard disk entity Real-SSD-fe: the actual completer of the nvm I/O command. Wherein the commands include: completing the I/O command and sending data returned by the read command to the hard disk agent; and informing the hard disk agent of the status of the ssd-be.
Further, the method further comprises: when the first terminal and the second terminal both run the operating system, the second terminal cannot share the disk by using the network interface. And only when the first terminal runs the operating system, the first terminal and the second terminal share the disk through the network.
Specifically, after obtaining the write command, the hard disk agent encapsulates the write command and write data into a network message and sends the network message to a shared hard disk entity, wherein the hard disk agent has a PCIE interface and a network interface, and the PCIE interface and the network interface can operate simultaneously; the second hard disk entity is provided with a PCIE interface and a network interface, wherein the PCIE interface and the network interface can not run simultaneously. When the first terminal and the second terminal both run the operating system, the second terminal cannot share the disk by using the network interface. And only when the first terminal runs the operating system, the first terminal and the second terminal share the disk through the network. When the second terminal runs an operating system, the second hard disk entity only uses the PCIE interface and does not use the network interface any more, and at the moment, the SSD of the second terminal is a standard SSD hard disk. And the transmission of the nvme I/O command and data is completed between the hard disk agent and the second hard disk entity by using a private protocol.
Step 140: the second hard disk entity executes the write command, obtains a first operation result, and sends the first operation result to the hard disk agent through a network;
step 150: and sending a completion command according to the first operation result to the first terminal, and completing the write command.
Further, the method further comprises: the first terminal obtains a disk management command; the first terminal is provided with a disk agent, and the disk agent operates the disk management command.
Specifically, the SSD on the second terminal is initially low power consumption (LPM), and only the front-end shared hard disk entity and the network module operate to wait for a network connection from host; and the Host initiates network connection, the hard disk agent is connected with the network layer of the second hard disk entity and is completely established, and the hard disk agent and the second hard disk entity directly use a private protocol for communication. The second hard disk entity performs read-write operation after obtaining the network message, obtains a first operation result, and sends the first operation result to the hard disk agent through a network; and sending a completion command according to the first operation result to the first terminal, and completing the write command.
The embodiment of the invention also provides a working process of a main scene, wherein the first scene is as follows: the process of establishing admin and IOqueue is as follows: first, there may be multiple targets on the network, where a target is a machine providing hard disk sharing service at a remote end. Initially, proxy-ssd broadcasts the real-ssd ID, and target returns its ID. If the ids match, host starts the session following this target start. Otherwise host continues to look for target. The "capability connectivity" is intended for real-ssd to inform proxy (proxy server) about its capabilities (such as supported NSID, NS size, number of queues that can be supported at most, and other nvme controller attributes), and the latter proxy configures itself according to the above-described schema. The future proxy can be independently completed after receiving the admin command without interacting with real-ssd. Next, the nvme driver of Host starts configuring proxy-ssd. Initially, controller is initialized according to the standard of nvme spec, and these actions proxy-ssd may be done locally. The required information is already available at the "capability connectivity" stage. During proxy-ssd, real-ssd needs to be notified: the controller is ready to be activated. When the real-ssd and ssd-be complete the preparation, the proxy-ssd reports to host that controller initialization is complete. Finally, the Host sends various admin commands (e.g., identity, set feature) and configuration registers to the proxy-ssd. These admin commands may all be done locally in proxy. During which the final modification result needs to be informed to real-ssd, both sides are in synchronous state. And the Host establishes nvm IO queue commands and completes the nvm IO queue commands at the proxy-ssd-fe end, the proxy-ssd needs to negotiate with the real-ssd at this time, and each IO queue corresponds to a buffer in the real-ssd. Both the IO command and the data carried by the command enter this buffer. Thus, the second hard disk entity is guaranteed to allocate an independent storage space for each IO queue.
A second scenario: NVM IO command processing. For the write command, after the hard disk agent takes the data stored in the host, the data is encapsulated into a network message together with the nvm write command and sent to the second hard disk entity. And the second hard disk entity transfers the command and the data to the ssd-be to complete the write operation. For read commands, the process is similar. And after the second hard disk entity obtains data from the ssd-be, transmitting the data to the hard disk agent through a network data packet. And then the hard disk agent moves the data to a host for storage to finish the reading operation.
The embodiment of the invention can be extended to mechanical hard disks and EMMC or UFI schemes used by mobile equipment. Because the mechanical hard disk, the controller of the EMMC or UFI used by the mobile device are all designed in a "front-end" and "back-end" mode. The extension can be done by simply breaking the front-end into a model of "front-end proxy", network and "entity front-end".
Example 2
Based on the same inventive concept as the method for remotely accessing the disk in the foregoing embodiment, the present invention further provides a device for remotely accessing the disk, which is applied to a first terminal and a second terminal, wherein the first terminal has a hard disk agent, and the second terminal remotely accesses the hard disk agent through a network, and is characterized in that the hard disk agent has the same host interface function as a common hard disk, and the hard disk agent itself does not have a storage medium; the second terminal is provided with a second hard disk entity, and the second hard disk entity is connected with the hard disk agent through a network; wherein, as shown in fig. 2, the apparatus comprises:
a first obtaining unit, configured to obtain a write command by the first terminal;
a first sending unit, configured to send the write command to a hard disk agent;
the second sending unit is used for encapsulating the write command and the write data into a network message and sending the network message to a second hard disk entity after the hard disk agent obtains the write command;
the first execution unit is used for the second hard disk entity to execute the write command, obtain a first operation result and send the first operation result to the hard disk agent through a network;
and the third sending unit is used for sending a completion command according to the first operation result to the first terminal, and the write command is completed.
Further, the apparatus further comprises:
a second obtaining unit, configured to obtain, by the first terminal, a disk management command;
and the first operation unit is used for the first terminal to be provided with a disk agent, and the disk agent operates the disk management command.
Further, after obtaining the write command, the hard disk agent encapsulates the write command and the write data into a network packet and sends the network packet to a second hard disk entity, and the method further includes:
the second sending unit comprises a hard disk agent which is provided with a PCIE interface and a network interface, wherein the PCIE interface and the network interface can operate simultaneously;
the second sending unit comprises a second hard disk entity which is provided with a PCIE interface and a network interface, wherein the PCIE interface and the network interface can not run simultaneously.
Further, the apparatus further comprises:
the second sending unit comprises a second hard disk entity which can not use the storage space of the shared disk of the network interface of the second hard disk entity under the condition that the first terminal and the second terminal both run the operating system, and the second hard disk entity can share the storage space of the shared disk of the PCIE interface of the second hard disk entity.
Further, the apparatus further comprises:
the second sending unit comprises a storage space of a disk shared by the first terminal and the second terminal through a network when the first terminal runs the operating system and the second terminal closes the operating system.
Various changes and specific examples of the method for remotely accessing a disk in embodiment 1 of fig. 1 are also applicable to the apparatus for remotely accessing a disk in this embodiment, and a person skilled in the art can clearly know the implementation method of the apparatus for remotely accessing a disk in this embodiment through the foregoing detailed description of the method for remotely accessing a disk, so for the brevity of the description, detailed descriptions are omitted here.
One or more technical solutions in the embodiments of the present application have at least one or more of the following technical effects:
the method and the device for remotely accessing the disk are applied to a first terminal and a second terminal, wherein the first terminal is provided with a hard disk agent, and the second terminal remotely accesses the hard disk agent through a network; the second terminal is provided with a second hard disk entity, and the second hard disk entity is connected with the hard disk agent through a network; obtaining a write command through the first terminal; sending the write command to a hard disk agent; after the hard disk agent obtains the write command, the hard disk agent encapsulates the write command and write data into a network message and sends the network message to a second hard disk entity; the second hard disk entity executes the write command, obtains a first operation result, and sends the first operation result to the hard disk agent through a network; and sending a completion command according to the first operation result to the first terminal, and completing the write command. The problem that a user host cannot be directly executed for an application program on a remote disk but needs to be copied to the local for execution in the prior art is solved; or the client host needs to run a special program to access the remote disk, so that the file system can seamlessly use the remote disk as if the local disk is used, the block device is ensured to be unchanged, and the difference of a physical transmission layer is completely shielded for the user host; the technical effects of no extra modification or special program operation for the difference of local disk access and remote disk access are needed by the OS and the upper layer application program.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (3)

1. A method for remotely accessing a disk is applied to a first terminal and a second terminal, wherein the first terminal is provided with a hard disk agent, and the second terminal remotely accesses the hard disk agent through a network, and is characterized in that the hard disk agent has the same host interface function as a common hard disk, and the hard disk agent does not have a storage medium; the second terminal is provided with a second hard disk entity, and the second hard disk entity is connected with the hard disk agent through a network; wherein the method comprises:
the first terminal obtains a write command;
sending the write command to a hard disk agent;
after the hard disk agent obtains the write command, the hard disk agent encapsulates the write command and write data into a network message and sends the network message to a second hard disk entity;
the second hard disk entity executes the write command, obtains a first operation result, and sends the first operation result to the hard disk agent through a network;
sending a completion command according to the first operation result to the first terminal, wherein the write command is completed;
the method further comprises the following steps:
the first terminal obtains a disk management command;
the first terminal is provided with a disk agent, and the disk agent operates the disk management command;
after obtaining the write command, the hard disk agent encapsulates the write command and write data into a network message and sends the network message to a second hard disk entity, and the method further comprises the following steps:
the hard disk agent is provided with a PCIE interface and a network interface, wherein the PCIE interface and the network interface can be operated simultaneously;
the second hard disk entity is provided with a PCIE interface and a network interface, wherein the PCIE interface and the network interface can not run simultaneously;
the method further comprises the following steps:
when the first terminal and the second terminal both run the operating system, the second hard disk entity cannot share the storage space of the disk by using the network interface of the second hard disk entity, and the second hard disk entity can share the storage space of the disk by using the PCIE interface of the second hard disk entity;
the method further comprises the following steps:
when the first terminal runs the operating system and the second terminal closes the operating system, the first terminal and the second terminal share the storage space of the disk through the network.
2. A device for remotely accessing a disk is applied to a first terminal and a second terminal, wherein the first terminal is provided with a hard disk agent, and the second terminal remotely accesses the hard disk agent through a network, and is characterized in that the hard disk agent has the same host interface function as a common hard disk, and the hard disk agent does not have a storage medium; the second terminal is provided with a second hard disk entity, and the second hard disk entity is connected with the hard disk agent through a network; wherein the apparatus comprises:
a first obtaining unit, configured to obtain a write command by the first terminal;
a first sending unit, configured to send the write command to a hard disk agent;
the second sending unit is used for encapsulating the write command and the write data into a network message and sending the network message to a second hard disk entity after the hard disk agent obtains the write command;
the first execution unit is used for the second hard disk entity to execute the write command, obtain a first operation result and send the first operation result to the hard disk agent through a network;
a third sending unit, configured to send a completion command according to the first operation result to the first terminal, where the write command is completed;
the device further comprises:
a second obtaining unit, configured to obtain, by the first terminal, a disk management command;
the first operation unit is used for the first terminal to be provided with a disk agent, and the disk agent operates the disk management command;
further, after obtaining the write command, the hard disk agent encapsulates the write command and the write data into a network packet and sends the network packet to a second hard disk entity, and the method further includes:
the second sending unit comprises a hard disk agent which is provided with a PCIE interface and a network interface, wherein the PCIE interface and the network interface can operate simultaneously;
the second sending unit comprises a second hard disk entity which is provided with a PCIE interface and a network interface, wherein the PCIE interface and the network interface can not run simultaneously;
the device further comprises:
the second sending unit comprises a second hard disk entity and a second sending unit, wherein the second hard disk entity cannot share the storage space of the disk by using the network interface of the second hard disk entity under the condition that the first terminal and the second terminal both run the operating system, and the second hard disk entity can share the storage space of the disk by using the PCIE interface of the second hard disk entity;
the device further comprises:
the second sending unit comprises a storage space of a disk shared by the first terminal and the second terminal through a network when the first terminal runs the operating system and the second terminal closes the operating system.
3. An apparatus for remotely accessing a disk, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the method steps of claim 1 when executing the computer program.
CN201810279161.7A 2018-03-31 2018-03-31 Method and device for remotely accessing disk Active CN108509155B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810279161.7A CN108509155B (en) 2018-03-31 2018-03-31 Method and device for remotely accessing disk

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810279161.7A CN108509155B (en) 2018-03-31 2018-03-31 Method and device for remotely accessing disk

Publications (2)

Publication Number Publication Date
CN108509155A CN108509155A (en) 2018-09-07
CN108509155B true CN108509155B (en) 2021-07-13

Family

ID=63377877

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810279161.7A Active CN108509155B (en) 2018-03-31 2018-03-31 Method and device for remotely accessing disk

Country Status (1)

Country Link
CN (1) CN108509155B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112347009A (en) * 2020-09-24 2021-02-09 天津市英贝特航天科技有限公司 Device for realizing hard disk storage shared by multiple processors
CN112015352B (en) * 2020-10-21 2021-01-22 北京首都在线科技股份有限公司 Storage block device identification device, system and storage block device reading and writing method

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1466045A (en) * 2002-07-02 2004-01-07 广达电脑股份有限公司 Data reading/writing method
CN101329691A (en) * 2008-07-30 2008-12-24 中兴通讯股份有限公司 Redundant magnetic disk array sharing file system and read-write method
CN102566943A (en) * 2011-12-31 2012-07-11 记忆科技(深圳)有限公司 Solid state disk and communication method based on solid state disk
CN102932383A (en) * 2011-08-08 2013-02-13 联想(北京)有限公司 Data transmission method, terminal and terminal system
JP2015519665A (en) * 2013-05-02 2015-07-09 ▲ホア▼▲ウェイ▼技術有限公司 Computer system, method and apparatus for accessing a peripheral component interconnect express endpoint device
CN106961475A (en) * 2017-03-14 2017-07-18 云宏信息科技股份有限公司 A kind of remote disk sharing method and shared system based on NBD
CN107145459A (en) * 2016-03-01 2017-09-08 华为技术有限公司 The system and method that a kind of subtending board, SSD teleengineering supports are accessed

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050289218A1 (en) * 2004-06-28 2005-12-29 Rothman Michael A Method to enable remote storage utilization

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1466045A (en) * 2002-07-02 2004-01-07 广达电脑股份有限公司 Data reading/writing method
CN101329691A (en) * 2008-07-30 2008-12-24 中兴通讯股份有限公司 Redundant magnetic disk array sharing file system and read-write method
CN102932383A (en) * 2011-08-08 2013-02-13 联想(北京)有限公司 Data transmission method, terminal and terminal system
CN102566943A (en) * 2011-12-31 2012-07-11 记忆科技(深圳)有限公司 Solid state disk and communication method based on solid state disk
JP2015519665A (en) * 2013-05-02 2015-07-09 ▲ホア▼▲ウェイ▼技術有限公司 Computer system, method and apparatus for accessing a peripheral component interconnect express endpoint device
CN107145459A (en) * 2016-03-01 2017-09-08 华为技术有限公司 The system and method that a kind of subtending board, SSD teleengineering supports are accessed
CN106961475A (en) * 2017-03-14 2017-07-18 云宏信息科技股份有限公司 A kind of remote disk sharing method and shared system based on NBD

Also Published As

Publication number Publication date
CN108509155A (en) 2018-09-07

Similar Documents

Publication Publication Date Title
US10222993B2 (en) Storage device access using unprivileged software code
EP3457288B1 (en) Computer system and storage access device
KR101530472B1 (en) Method and apparatus for remote delivery of managed usb services via a mobile computing device
JP2019153304A (en) Acceleration module based on fpga for ssd, system, and method for operating the same
RU2624563C2 (en) Operational performance control of the solid-state storages
CN106775946B (en) A kind of virtual machine Method of Creation Process
MX2012005934A (en) Multi-interface solid state disk (ssd), processing method and system thereof.
WO2017148292A1 (en) Cascade plate, and system and method for ssd remote sharing access
CN110928935B (en) Data access command processing method, device and system
TWI825327B (en) Lightweight bridge circuit and method and article for multi physical function emulation
KR20200008483A (en) METHOD OF ACCESSING A DUAL LINE SSD DEVICE THROUGH PCIe EP AND NETWORK INTERFACE SIMULTANEOUSLY
US8140724B1 (en) SATA pass through port
CN108509155B (en) Method and device for remotely accessing disk
KR102569435B1 (en) Convergence Semiconductor Apparatus and Operation Method Thereof, Stacked Memory Apparatus Having the Same
US11726797B2 (en) Secondary processor device ownership system
WO2018040622A1 (en) Method and apparatus for information processing
EP3985508A1 (en) Network state synchronization for workload migrations in edge devices
US11003618B1 (en) Out-of-band interconnect control and isolation
WO2018045926A1 (en) Method and device for use in accessing container
CN117544334A (en) Device access method, data exchange method, device and storage medium
US11087801B1 (en) Configuring a host interface of a memory device based on mode of operation
US11216211B1 (en) Emulated block storage for devices
US20070174034A1 (en) Transparent intellectual network storage device
US11593120B1 (en) Secondary processor device ownership assignment system
US20230105316A1 (en) Secondary processor proxied device ownership system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20190813

Address after: 518067 Dongjiaotou Workshop D24/F-02, Houhai Avenue, Shekou Street, Nanshan District, Shenzhen City, Guangdong Province

Applicant after: Shenzhen Yi Lian Information System Co., Ltd.

Address before: 100176 Beijing Daxing District Beijing Economic and Technological Development Zone No. 58 Jinghai Road, No. 5 Building No. 3, No. 305

Applicant before: Beijing legend core technology Co., Ltd.

GR01 Patent grant
GR01 Patent grant