[go: up one dir, main page]

CN117931074A - Method for controlling diskless data read-write and computer device - Google Patents

Method for controlling diskless data read-write and computer device Download PDF

Info

Publication number
CN117931074A
CN117931074A CN202410010099.7A CN202410010099A CN117931074A CN 117931074 A CN117931074 A CN 117931074A CN 202410010099 A CN202410010099 A CN 202410010099A CN 117931074 A CN117931074 A CN 117931074A
Authority
CN
China
Prior art keywords
iscsi
read
local memory
write
data
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.)
Pending
Application number
CN202410010099.7A
Other languages
Chinese (zh)
Inventor
余胜桥
贺国超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Tonggan Technology Co ltd
Original Assignee
Shenzhen Tonggan Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Tonggan Technology Co ltd filed Critical Shenzhen Tonggan Technology Co ltd
Publication of CN117931074A publication Critical patent/CN117931074A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • G06F3/0617Improving the reliability of storage systems in relation to availability
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/0656Data buffering arrangements
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; 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]

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

The invention relates to the technical field of computer networks, in particular to a method for controlling diskless data read-write and a computer device, comprising the following steps of S1: the application program sends a command to the ISCSI disk drive; s2: intercepting a read-write command of the ISCSI disk drive, and redirecting the read-write command to a local memory; s3: after the local memory receives the data, the local memory reads and writes the data; s4: after the read-write operation is completed, the local memory waits for the response of the target service program; s5: after the local memory receives the confirmation message, the result of the read-write operation is returned to the application program, and the program releases the resources. The invention uses ISCSI disk drive of windows system, without changing original starting configuration and flow of diskless, to intercept and redirect the read-write of ISCSI disk drive, to transfer the read-write of disk to local memory, to reduce the pressure of server, and at the same time, the redirection to local memory can support hot plug and fault tolerance, because the local memory can be replaced or upgraded at any time, without affecting the usability of the whole system.

Description

Method for controlling diskless data read-write and computer device
Technical Field
The invention relates to the technical field of computer networks, in particular to a method for controlling diskless data read-write and a computer device.
Background
Diskless data read-write control methods are commonly used for remote access and remote office environments in computer networks. In such an environment, the computer typically does not need to install a local hard drive, but rather is connected to a server or storage device over a network to access and manage data. The method can improve the safety and reliability of the data and reduce the risks of data loss and damage. In the prior art, the current diskless is to automatically develop a virtual disk drive to control diskless disk data read-write, but under win10, because microsoft frequently upgrades the kernel of an operating system, the upgrade sometimes causes that diskless which can normally run originally cannot be started normally due to compatibility; microsoft does not disclose the source code of win10, which results in very time and effort consuming each time the problem is examined and handled. In view of the above, the present invention provides a method and a computer device for controlling diskless data reading and writing to solve the above problems.
Disclosure of Invention
The present invention is directed to a method and a computer device for controlling diskless data reading and writing, so as to solve the problems of the related art.
To achieve the above object, according to one aspect of the present invention, there is provided a method of controlling diskless data reading and writing, comprising the steps of:
S1: the application program sends a command to the ISCSI disk drive;
s2: intercepting a read-write command of the ISCSI disk drive, and redirecting the read-write command to a local memory;
S3: after the local memory receives the data, the local memory reads and writes the data;
s4: after the read-write operation is completed, the local memory waits for the response of the target service program;
S5: after the local memory receives the confirmation message, the result of the read-write operation is returned to the application program, and the program releases the resources.
Further, the commands in S1 include a login command, a logout command, and a disk read/write command.
Further, the specific steps of S1 are as follows:
s11: the application program initiates a connection request to a target service program through an ISCSI disk drive, and an ISCSI session is established;
s12: after the connection is established, the application program needs to initiate a login command to the target service program through the ISCSI disk drive;
S13: after the login session is established, the application program may send a read/write command to the target service program through the ISCSI disk driver, and execute S2.
Further, the local memory in S2 includes a memory, a local disk, and a private service program.
Further, the specific steps of S2 are as follows:
S21: installing ISCSI software on a local computer, and communicating with ISCSI target equipment;
S22: and writing an ISCSI client program, intercepting an ISCSI read-write request, and redirecting the ISCSI read-write request to a local memory for processing.
Further, before and after the local memory in S3 performs reading and writing, data processing, conversion and analysis are performed through the private disk filter driver.
Further, the specific steps of S3 are as follows:
S31: memory space for storing data to be read and written is allocated in the local memory;
S32: writing the data into a specified position in a local memory;
S33: the specified position data is read.
Further, the response in S4 includes the result of success or failure of reading and writing, and the actual content of the read and write data.
Further, the resources released by the procedure in S5 are resources occupied by the ISCSI driver, including ISCSI session and ISCSI target service procedure.
The computer device comprises an application program, a private disk filter driver, an ISCSI driver, a target service program and a local memory, wherein the ISCSI driver is responsible for converting a data read-write request of the application program into an ISCSI protocol command and sending the command to the target service program; the target service program is responsible for receiving a command; the local memory is used for intercepting and responding to the read-write request; the private disk filter drive can process data before and after reading and writing.
Compared with the prior art, the invention has the following beneficial effects:
The invention uses ISCSI disk drive of windows system, without changing original starting configuration and flow of diskless, to intercept and redirect the read-write of ISCSI disk drive, to transfer the read-write of disk to local memory, to reduce the pressure of server, and at the same time, the redirection to local memory can support hot plug and fault tolerance, because the local memory can be replaced or upgraded at any time, without affecting the usability of the whole system.
Drawings
FIG. 1 is a flow chart of the method of the present invention;
Fig. 2 is an overall flow chart of the present invention.
Detailed Description
In order to further describe the technical means and effects adopted by the present invention for achieving the intended purpose, the following detailed description will refer to the specific implementation, structure, characteristics and effects according to the present invention with reference to the accompanying drawings and preferred embodiments.
Referring to fig. 1-2, there is provided a method of controlling diskless data reading and writing, comprising the steps of:
S1: the application program sends a command to the ISCSI disk drive;
s2: intercepting a read-write command of the ISCSI disk drive, and redirecting the read-write command to a local memory;
S3: after the local memory receives the data, the local memory reads and writes the data;
s4: after the read-write operation is completed, the local memory waits for the response of the target service program;
S5: after the local memory receives the confirmation message, the result of the read-write operation is returned to the application program, and the program releases the resources.
The commands in S1 include a login command, a logout command, and a disk read/write command.
The specific steps of the S1 are as follows:
s11: the application program initiates a connection request to a target service program through an ISCSI disk drive, and an ISCSI session is established;
s12: after the connection is established, the application program needs to initiate a login command to the target service program through the ISCSI disk drive;
S13: after the login session is established, the application program may send a read/write command to the target service program through the ISCSI disk driver, and execute S2.
And S2, the local memory comprises a memory, a local disk and a private service program.
The specific steps of the S2 are as follows:
S21: installing ISCSI software on a local computer, and communicating with ISCSI target equipment;
S22: and writing an ISCSI client program, intercepting an ISCSI read-write request, and redirecting the ISCSI read-write request to a local memory for processing.
And (3) performing data processing conversion and analysis on the local memory before and after reading and writing in the S3 through a private disk filter drive.
The specific steps of the S3 are as follows:
S31: memory space for storing data to be read and written is allocated in the local memory;
S32: writing the data into a specified position in a local memory;
S33: the specified position data is read.
The response in the step S4 comprises the result of successful or failed reading and writing and the actual content of the read-write data.
The resources released by the procedure in S5 are resources occupied by the ISCSI driver, including ISCSI session and ISCSI target service procedure.
The computer device comprises an application program, a private disk filter driver, an ISCSI driver, a target service program and a local memory, wherein the ISCSI driver is responsible for converting a data read-write request of the application program into an ISCSI protocol command and sending the command to the target service program; the target service program is responsible for receiving a command; the local memory is used for intercepting and responding to the read-write request; the private disk filter drive can process data before and after reading and writing.
In this embodiment, when a program is started, it is required to initialize an ISCSI disk drive, the program initiates a connection request to a target service program through the ISCSI disk drive, and establishes an ISCSI session, after the connection is established, the program needs to initiate a login command to the target service program through the ISCSI disk drive, after the login session is established, the program sends a read-write command to the target service program through the ISCSI disk drive, at this time, the read-write command is intercepted and redirected to a local memory, after the local memory receives data, it performs read-write on the local memory, after the read-write operation is completed, the ISCSI disk drive needs to wait for the response of the target service program, after the ISCSI disk drive receives a confirmation message, returns a result of the read-write operation to an application program, and the program releases resources, where:
When an application program is started, an initialization program is needed to drive an ISCSI disk, including creating an ISCSI target service program, binding an ISCSI target IP address and configuring a network interface; the application program initiates a connection request to a target service program through an ISCSI disk drive, an ISCSI session is established, target IP address and port number information is required to be established when the session is established, after the connection is established, the application program is required to send a login command to the target service program through the ISCSI disk drive, the application program is required to provide a corresponding user name and password when the login session is established, the ISCSI disk drive packages the command into an ISCSI protocol, the ISCSI client of an operating system sends the request to the target service program through an ISCSI client of an operating system, wherein the ISCSI is a network storage protocol which allows transmission and processing of SCSI commands through the Internet so as to realize remote access and sharing of storage equipment, the ISCSI protocol establishes a virtual ISCSI channel between the client and a server, the ISCSI command is transmitted to the server through the channel by the client, and the response is transmitted to the client through the channel by the server. This virtual channel is transported and handled through the TCP/IP protocol, so the ISCSI protocol can be used in different network environments, such as local area networks, wide area networks, etc.
After receiving the request, the target service program analyzes the ISCSI protocol, and executes corresponding operation according to parameters in the ISCSI protocol, the target service program checks whether the user name and the password specified in the login instruction are matched with the known user name and password so as to verify the identity of the user, and after the identity verification is successful, the target service program checks an access control list specified in the login instruction so as to determine whether the user has the authority to access the target service program. If the target service program has access rights, a session is established with the user so that the user can execute the command or access the resource, and once the user logs in successfully and establishes the session, the target service program executes the command or resource request appointed by the user.
After the login session is established, the application program can send a read-write command to the target service program through the ISCSI disk drive, the ISCSI disk drive encapsulates the command into an ISCSI protocol, an ISCSI client of the operating system sends a read-write request to the target service program, the read-write request is intercepted and redirected to the local memory, the local memory comprises a memory, a local disk and a private service program, and the intercepting step comprises the following steps: firstly, ISCSI software is installed on a local computer to communicate with a target service program; then writing an ISCSI client program, intercepting an ISCSI read-write request, redirecting the ISCSI read-write request to a local memory for processing, and filtering the drive by a private disk before the local memory reads and writes.
A proprietary disk filter drive is a driver used in Windows operating systems to access and control disks. It allows applications to query and modify the state and properties of the disk by calling Windows API functions without having to directly access the hardware. Proprietary disk filter drives are commonly used to develop custom disk management applications such as defragmentation tools, disk cleaning tools, disk backup and restore tools, and the like. It can provide higher levels of disk access and management functions while also avoiding the performance degradation and security vulnerabilities caused by direct access to hardware.
Before reading and writing, the private disk filter drive can provide higher-level data access and processing functions, such as data conversion, data compression, data encryption and the like, and when the local disk is used for reading and writing, a certain memory space is allocated in the local memory so as to store data needing to be read and written; writing the data to be read into a designated position in a local memory; and reading the data to be written from the appointed position in the local memory, and writing the data into the appointed output equipment. The read and write operations of local memory are typically much faster than those of other storage media. After reading and writing, the private disk filter drive may provide higher level data management and analysis functions such as data backup, data recovery, data archiving, etc.
After the read-write operation is completed, the ISCSI disk drive needs to wait for the response of the target service program, and the target service program returns the result to the ISCSI disk drive, so that the ISCSI disk drive can continue to process subsequent read-write requests. The response of the target service program comprises the result of successful or failed reading and writing and the actual content of the read-write data.
After the ISCSI disk drive receives the acknowledgement message, the ISCSI disk drive returns the result of the read-write operation to the application program, and the program releases the resource, and it should be noted that the response may be the result of successful execution of the command, or may be an error code or other information that an error occurs in the process of executing the command. The application needs to parse and process the response to see how the command is being executed and whether further operations are needed. The resources released by the application program are resources occupied by the ISCSI driver, including ISCSI session and ISCSI target service program. Releasing the ISCSI session may release the connection with the target service program for the next read/write operation. Releasing ISCSI target service instances may release the resources of the target service for other users or processes to use. Releasing these resources may also ensure stability and reliability of the system. For example, if ISCSI sessions or target service instances are always in an occupied state, system resources may be strained or other problems may occur. Therefore, it is very important to release resources in time after the read and write operations are completed.
The present invention is not limited to the above embodiments, but is capable of modification and variation in detail, and other modifications and variations can be made by those skilled in the art without departing from the scope of the present invention.

Claims (10)

1. A method for controlling diskless data reading and writing, comprising the steps of:
S1: the application program sends a command to the ISCSI disk drive;
s2: intercepting a read-write command of the ISCSI disk drive, and redirecting the read-write command to a local memory;
S3: after the local memory receives the data, the local memory reads and writes the data;
S4: after the read-write operation is completed, the ISCSI disk drive waits for the response of the target service program;
s5: after the ISCSI disk drive receives the confirmation message, a read-write operation result is returned to the application program, and the program releases the resources.
2. The method of claim 1, wherein the commands in S1 include a login command, a logout command, and a disk read/write command.
3. The method for controlling diskless data reading and writing of claim 1, wherein the specific steps of S1 are as follows:
s11: the application program initiates a connection request to a target service program through an ISCSI disk drive, and an ISCSI session is established;
s12: after the connection is established, the application program needs to initiate a login command to the target service program through the ISCSI disk drive;
S13: after the login session is established, the application program may send a read/write command to the target service program through the ISCSI disk driver, and execute S2.
4. The method for controlling diskless data read-write according to claim 1, wherein the local memory in S2 includes a memory, a local disk and a private service program.
5. The method for controlling diskless data reading and writing of claim 1, wherein the specific steps of S2 are as follows:
S21: installing ISCSI software on a local computer, and communicating with ISCSI target equipment;
S22: and writing an ISCSI client program, intercepting an ISCSI read-write request, and redirecting the ISCSI read-write request to a local memory for processing.
6. The method for controlling diskless data read-write according to claim 1, wherein the local memory in S3 performs data processing conversion and analysis through a private disk filter driver before and after the local memory reads and writes.
7. The method for controlling diskless data reading and writing of claim 1, wherein the specific steps of S3 are as follows:
S31: memory space for storing data to be read and written is allocated in the local memory;
S32: writing the data into a specified position in a local memory;
S33: the specified position data is read.
8. The method of claim 1, wherein the response in S4 includes a result of success or failure of the reading and writing, and an actual content of the reading and writing data.
9. The method of claim 1, wherein the resources released by the program in S5 are resources occupied by ISCSI drivers, including ISCSI sessions and ISCSI target service programs.
10. A computer device for controlling diskless data reading and writing, comprising an application program, a private disk filter driver, an ISCSI driver, a target service program and a local memory, wherein the method for controlling diskless data reading and writing is based on any one of claims 1-9, and is characterized in that the ISCSI driver is responsible for converting a data reading and writing request of the application program into a command of ISCSI protocol and sending the command to the target service program; the target service program is responsible for receiving a command; the local memory is used for intercepting and responding to the read-write request; the private disk filter drive can process data before and after reading and writing.
CN202410010099.7A 2023-12-27 2024-01-03 Method for controlling diskless data read-write and computer device Pending CN117931074A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202311834598 2023-12-27
CN202311834598X 2023-12-27

Publications (1)

Publication Number Publication Date
CN117931074A true CN117931074A (en) 2024-04-26

Family

ID=90750030

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410010099.7A Pending CN117931074A (en) 2023-12-27 2024-01-03 Method for controlling diskless data read-write and computer device

Country Status (1)

Country Link
CN (1) CN117931074A (en)

Similar Documents

Publication Publication Date Title
US8463989B2 (en) Storage device and method utilizing both block I/O and file I/O access
US11201913B1 (en) Cloud-based authentication of a storage system user
US6816917B2 (en) Storage system with LUN virtualization
US10402206B2 (en) Methods and systems for attaching an encrypted data partition during the startup of an operating system
JP5260333B2 (en) Method and apparatus for backing up data with NAS and CAS integration
US9813485B2 (en) Communication of virtual machine data
US20150067399A1 (en) Analysis, recovery and repair of devices attached to remote computing systems
US10409999B2 (en) Communication between key manager and storage subsystem kernel via management console
JP2006504187A5 (en)
US20050160150A1 (en) Apparatus and method for managing and transporting virtual disks over a network to networked stations
US20090222569A1 (en) Storage system front end
US8356140B2 (en) Methods and apparatus for controlling data between storage systems providing different storage functions
US10176271B2 (en) Command line interface browser
US6697895B1 (en) Network attached tape storage system
CN117931074A (en) Method for controlling diskless data read-write and computer device
CN108376055B (en) Method and system for protecting disk array data security through trusted channel technology
JP7702577B2 (en) Configuring Quorum Components on Network Storage
US10824748B2 (en) Method and system for low overhead control/status handshake for remote shared file server
KR102233705B1 (en) Mobile virtualization methods and devices
US20100070546A1 (en) Providing Local File Storage within a Java Server Environment
JP2019003618A (en) Method for migrating workload, computer configuration, and non-volatile storage medium
JP4255451B2 (en) Proxy server allocation system, proxy server allocation method, network system, and program
CN113986467B (en) A method and device for online migration of virtual resources
CN118260249A (en) NFS-based remote folder mounting system and method
CN120805178A (en) Data interaction method and data interaction 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