CN110568994B - Logic block device access method and device and electronic device - Google Patents

Logic block device access method and device and electronic device Download PDF

Info

Publication number
CN110568994B
CN110568994B CN201910758713.7A CN201910758713A CN110568994B CN 110568994 B CN110568994 B CN 110568994B CN 201910758713 A CN201910758713 A CN 201910758713A CN 110568994 B CN110568994 B CN 110568994B
Authority
CN
China
Prior art keywords
data access
access request
target
logic block
target object
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
CN201910758713.7A
Other languages
Chinese (zh)
Other versions
CN110568994A (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.)
Beijing Volcano Engine Technology Co Ltd
Original Assignee
Beijing Volcano Engine 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 Beijing Volcano Engine Technology Co Ltd filed Critical Beijing Volcano Engine Technology Co Ltd
Priority to CN201910758713.7A priority Critical patent/CN110568994B/en
Publication of CN110568994A publication Critical patent/CN110568994A/en
Application granted granted Critical
Publication of CN110568994B publication Critical patent/CN110568994B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0674Disk device

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 embodiment of the disclosure provides a logic block device access method, a device and an electronic device, belonging to the technical field of data processing, wherein the method comprises the following steps: acquiring a data access request which is sent by a client and faces to logic block equipment; judging whether the data access request is legal or not based on an analysis result of the data access request; when the data access request is a legal request, converting TID, LUN and OFFSET fields contained in the access request into target indexes by using a preset algorithm; and taking the target index as a main key and the data corresponding to the target index as a target value, and performing data access operation on the logic block equipment with the LSM-Tree structure. By the scheme, the data access efficiency of the logic block device can be improved.

Description

Logic block device access method and device and electronic device
Technical Field
The disclosure relates to the technical field of data processing, and in particular relates to a logic block device access method and device and electronic equipment.
Background
With the great popularity of cloud computing, iaaS (Infrastructure as a Service ) plays a role in the management, allocation and use of underlying resources therein. IaaS is both performance and cost conscious. This is particularly true on storage devices. Typically, high performance (e.g., solid state disk SSDs) means higher costs, and inexpensive costs can only be used with lower performance (e.g., mechanical hard disk HDDs).
In certain scenarios, such as storage devices for storing log files, have business features of more writing and less reading. In the prior art, a mechanical hard disk HDD is generally logically divided into a plurality of logic blocks. For example, a 10TB HDD is logically divided into 101 TB logical blocks, which are provided to 10 clients for use. A number of clients generate a large number of random accesses during use. In the physical structure of the HDD, physical operations such as swinging the magnetic head are required, which is not friendly to random access. Therefore, the write latency of the logic block is high, and the performance of the write throughput is very low.
Disclosure of Invention
In view of this, embodiments of the present disclosure provide a method, an apparatus, and an electronic device for accessing a logic block device, which at least partially solve the problems in the prior art.
In a first aspect, an embodiment of the present disclosure provides a method for accessing a logic block device, including:
acquiring a data access request which is sent by a client and faces to logic block equipment;
judging whether the data access request is legal or not based on an analysis result of the data access request;
when the data access request is a legal request, converting TID, LUN and OFFSET fields contained in the access request into target indexes by using a preset algorithm;
and taking the target index as a main key and the data corresponding to the target index as a target value, and performing data access operation on the logic block equipment with the LSM-Tree structure.
According to a specific implementation manner of the embodiment of the present disclosure, before the obtaining the data access request for the logical block device sent by the client, the method further includes:
and constructing a logic block device based on the LSM-Tree structure.
According to a specific implementation manner of the embodiment of the disclosure, the building of the logic block device based on the LSM-Tree structure includes:
constructing a back-end storage driver based on target object software;
creating one or more target objects based on the backend storage drive;
and creating one or more logic unit codes on each target object, wherein the logic unit codes are used for identifying logic block equipment of a client, and the client can mount the logic unit code equipment by using a preset protocol so as to perform read-write access on the logic block equipment.
According to a specific implementation manner of the embodiment of the present disclosure, the constructing a back-end storage driver based on the target object software includes:
managing one or more target objects using a tgt process;
each target object is assigned a specific target object identifier TID.
According to a specific implementation manner of the embodiment of the present disclosure, the constructing a back-end storage driver based on the target object software further includes:
managing one or more logical units with the target object;
a unique logical unit encoded LUN is set for each logical unit.
According to a specific implementation manner of the embodiment of the present disclosure, the constructing a back-end storage driver based on the target object software further includes:
acquiring an Offset value Offset of a logic unit for a read-write request;
and taking the Offset value Offset as an attribute value of the logic unit.
According to a specific implementation manner of the embodiment of the present disclosure, the constructing a back-end storage driver based on the target object software further includes:
and using a KEY obtained by calculating a combination of the TID-LUN-Offset through a preset algorithm as an index to identify all logic blocks in the tgt process.
According to a specific implementation manner of the embodiment of the present disclosure, after the determining whether the data access request is legal based on the analysis result of the data access request, the method further includes:
and when the parameters in the data access request are illegal parameters, returning an error identification and ending the data access request.
In a second aspect, an embodiment of the present disclosure provides a logic block device access apparatus, including:
the acquisition module is used for acquiring a data access request which is sent by the client and faces to the logic block equipment;
the judging module is used for judging whether the data access request is legal or not based on the analysis result of the data access request;
the conversion module is used for converting TID, LUN and OFFSET fields contained in the access request into target indexes by using a preset algorithm when the data access request is a legal request;
and the execution module is used for performing data access operation on the logic block equipment with the LSM-Tree structure by taking the target index as a main key and the data corresponding to the target index as a target value.
In a third aspect, embodiments of the present disclosure further provide an electronic device, including:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of accessing a logical block device in any one of the implementations of the Ren Di or first aspect described above.
In a fourth aspect, embodiments of the present disclosure also provide a non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the logic block device access method of the foregoing first aspect or any implementation of the first aspect.
In a fifth aspect, embodiments of the present disclosure also provide a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the logic block device access method of the first aspect or any implementation of the first aspect.
The access scheme of the logic block device in the embodiment of the disclosure comprises the steps of obtaining a data access request which is sent by a client and faces to the logic block device; judging whether the data access request is legal or not based on an analysis result of the data access request; when the data access request is a legal request, converting TID, LUN and OFFSET fields contained in the access request into target indexes by using a preset algorithm; and taking the target index as a main key and the data corresponding to the target index as a target value, and performing data access operation on the logic block equipment with the LSM-Tree structure. According to the scheme, random writing operation of a plurality of logic blocks can be converted into physical sequential writing through LSM-Tree, hardware characteristics of the HDD are met, and effects of fast writing, writing delay reduction and writing throughput improvement are achieved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and other drawings may be obtained according to these drawings without inventive effort to a person of ordinary skill in the art.
Fig. 1 is a schematic diagram of a logic block device access flow provided in an embodiment of the disclosure;
FIG. 2 is a schematic diagram of another access flow of a logic block device according to an embodiment of the disclosure;
FIG. 3 is a schematic diagram of another access flow of a logic block device according to an embodiment of the disclosure;
FIG. 4 is a schematic diagram of another access flow of a logical block device according to an embodiment of the disclosure;
fig. 5 is a schematic structural diagram of an access device for a logic block device according to an embodiment of the present disclosure;
fig. 6 is a schematic diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
Embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
Other advantages and effects of the present disclosure will become readily apparent to those skilled in the art from the following disclosure, which describes embodiments of the present disclosure by way of specific examples. It will be apparent that the described embodiments are merely some, but not all embodiments of the present disclosure. The disclosure may be embodied or practiced in other different specific embodiments, and details within the subject specification may be modified or changed from various points of view and applications without departing from the spirit of the disclosure. It should be noted that the following embodiments and features in the embodiments may be combined with each other without conflict. All other embodiments, which can be made by one of ordinary skill in the art without inventive effort, based on the embodiments in this disclosure are intended to be within the scope of this disclosure.
It is noted that various aspects of the embodiments are described below within the scope of the following claims. It should be apparent that the aspects described herein may be embodied in a wide variety of forms and that any specific structure and/or function described herein is merely illustrative. Based on the present disclosure, one skilled in the art will appreciate that one aspect described herein may be implemented independently of any other aspect, and that two or more of these aspects may be combined in various ways. For example, an apparatus may be implemented and/or a method practiced using any number of the aspects set forth herein. In addition, such apparatus may be implemented and/or such methods practiced using other structure and/or functionality in addition to one or more of the aspects set forth herein.
It should also be noted that the illustrations provided in the following embodiments merely illustrate the basic concepts of the disclosure by way of illustration, and only the components related to the disclosure are shown in the drawings and are not drawn according to the number, shape and size of the components in actual implementation, and the form, number and proportion of the components in actual implementation may be arbitrarily changed, and the layout of the components may be more complicated.
In addition, in the following description, specific details are provided in order to provide a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects may be practiced without these specific details.
The embodiment of the disclosure provides a logic block device access method. The method for accessing a logic block device provided in this embodiment may be performed by a computing device, which may be implemented as software, or as a combination of software and hardware, and the computing device may be integrally provided in a server, a terminal device, or the like.
Referring to fig. 1 and 4, a method for accessing a logic block device according to an embodiment of the present disclosure includes the following steps:
s101, acquiring a data access request which is sent by a client and faces to logic block equipment.
In certain scenarios, such as storage devices for storing log files, have business features of more writing and less reading. In the prior art, a mechanical hard disk HDD is generally logically divided into a plurality of logic blocks. For example, a 10TB HDD is logically divided into 101 TB logical blocks, which are provided to 10 clients for use. A number of clients generate a large number of random accesses during use. In the physical structure of the HDD, physical operations such as swinging the magnetic head are required, which is not friendly to random access. Therefore, the write latency of the logic block is high, and the performance of the write throughput is very low.
Aiming at the specific business characteristics of more writing, less reading and less reading, the scheme of the disclosure provides improvement, and a plurality of logic blocks are constructed on the mechanical hard disk HDD, so that the plurality of logic blocks have higher writing performance, and the experience of using the logic blocks by the business is improved.
The logic block device may be a storage disk comprising a plurality of logic blocks, a disk array comprising a plurality of logic blocks, or other devices with storage functions. The logic block device is connected to one or more client devices by wired or wireless means, in such a way that the client devices can read or write data from or to the logic block device. The client device performs data access to the logic block device in a data access request mode, and therefore, in the process of performing data control on the logic block device, the data access request which is sent by the client device and faces to the logic block device needs to be acquired.
S102, judging whether the data access request is legal or not based on the analysis result of the data access request.
The data access request from the client is set according to a preset data arrangement mode, and the data access request comprises a plurality of request fields. For example, the request field in the data access request should include at least an access parameter such as an ID of a logical block to be accessed by the client, and whether the data access request is legal can be obtained by determining whether the access parameter is legal.
The decision as to whether the data access request is legal may be made in a number of ways, as a case may be that the accessed logical block is first decided based on the data access request, and when the accessed logical block is an illegal parameter, an error is returned and the access request is ended. When the logic block access is correct, it may further determine whether the parameter in the data access request is correct (for example, it may determine whether the parameter in the data access request is a preset resolvable parameter), and when the parameter in the data access request is an illegal parameter, return an error and end the access request.
And S103, when the data access request is a legal request, converting TID, LUN and OFFSET fields contained in the access request into target indexes by using a preset algorithm.
When the data access request is a legal request, preset parameters contained in the data access request can be analyzed by a preset algorithm, and a specific object aimed by the data access request is determined based on the analysis result.
In order to effectively analyze the data access request so as to access the data block according to a preset mode, the storage mode of the data block needs to be set in advance. As a specific implementation manner of the present disclosure, an embodiment of the present disclosure proposes a method for constructing a logic block device based on an LSM-Tree structure, where the main steps include: first, the Target software tgt based on iSCSI realizes the back-end storage drive. Next, based on the backend storage drive, the user may choose to create one or more Target objects, at each of which the user may choose to create one or more LUNs (Logical Unit Number, logical unit encodings). For each LUN created, the user may act as a logical block device for the client. Finally, the client uses iSCSI protocol to mount LUN equipment, and performs read-write access by means of block equipment.
For each tgt process instance, it may manage one or more targets, each Target having a different identifier, called TID. In each Target, one or more logical units may be managed, each having a different identifier, called a LUN. The read-write request for each LUN has an Offset value called Offset. It follows that within a tgt process, the combination of TID-LUN-Offset is unique and can be used as a unique identifier.
For each LUN, it may be divided into equal-sized logical blocks. For example, a 1073741824 byte LUN has 262626144 4096 bytes of logical blocks. The start address of the first logical block is 0, the start address of the second logical block is 4096, the start address of the third logical block is 8192, and so on.
And constructing indexes for all logic blocks in a tgt process according to KEYs obtained by calculating a TID-LUN-Offset rule through a preset algorithm. For example, the index of the second logical block of Target 1LUN 2 is 1-2-4096,Target 2LUN 3 and the index of the fourth logical block is 2-3-12288.
S104, taking the target index as a main key and the data corresponding to the target index as a target value, and performing data access operation on the logic block equipment with the LSM-Tree structure.
The unique index of each logical block is used as a KEY (KEY) for LSM-Tree access, and the data of the logical block is used as a target VALUE (VALUE). Through the algorithm, the Offset write operation of the LUN of the TID can be converted into the Set KEY-VALUE operation of the LSM-Tree, and the Offset read operation of the LUN of the TID can be converted into the Get KEY-VALUE operation of the LSM-Tree.
By the method, random writing operation of a plurality of logical volumes can be converted into physical sequential writing through LSM-Tree, hardware characteristics of the HDD are met, the effect of quick writing is achieved, writing delay is reduced, and data writing throughput efficiency is improved.
According to a specific implementation manner of the embodiment of the present disclosure, before the obtaining the data access request for the logical block device sent by the client, the method further includes: and constructing a logic block device based on the LSM-Tree structure.
Referring to fig. 2, according to a specific implementation manner of the embodiment of the present disclosure, the constructing a logic block device based on an LSM-Tree structure includes:
s201, constructing a back-end storage driver based on target object software.
The storage driver of the back-end may be implemented using Target software tgt, such as iSCSI, so that control of the storage blocks of the data connection of the back-end may be implemented based on the storage driver of the back-end.
S202, one or more target objects are created based on the back-end storage drive.
S203, one or more logic unit codes are created on each target object, wherein the logic unit codes are used for identifying logic block equipment of a client, and the client can mount the logic unit code equipment by using a preset protocol so as to perform read-write access on the logic block equipment.
By the method, the constructed logic block can conform to an LSM-Tree structure, so that a foundation is provided for subsequent efficient data access.
Referring to fig. 3, according to a specific implementation of the embodiment of the disclosure, the constructing a backend storage driver based on the target object software may include:
s301, managing one or more target objects by utilizing a tgt process.
For each tgt process instance, it may manage one or more Target objects (targets), for which purpose one or more Target objects may be managed by way of creating the tgt process.
S302, a specific target object identifier TID is allocated to each target object.
To facilitate identification and differentiation of target objects managed by tgt processes, each target object may be assigned a specific target object identifier TID by which the different target objects are identified.
By the method, different target objects can be identified by setting the target object identifier TID, so that the identification efficiency of the target objects is improved.
In addition, in the process of constructing the back-end storage drive based on the target object software, one or more logic units can be managed by using the target object; a unique logical unit encoded LUN is set for each logical unit.
After the logic unit coding is set, the Offset value Offset of the logic unit for the read-write request can be further obtained; and taking the Offset value Offset as an attribute value of the logic unit.
After the above steps are completed, the KEY obtained by the combination of TID-LUN-Offset through calculation by the preset algorithm can be used as an index to identify all logic blocks in the tgt process.
By the method, a specific logic block can be uniquely identified and determined based on the combination of the TID-LUN-Offset, and support is provided for rapidly locating a specific logic block.
According to a specific implementation manner of the embodiment of the present disclosure, after the determining whether the data access request is legal based on the analysis result of the data access request, the method further includes: and when the parameters in the data access request are illegal parameters, returning an error identification and ending the data access request. By the method, illegal access requests can be prevented in time, and the effectiveness of data access is improved.
Corresponding to the above method embodiment, referring to fig. 5, the embodiment of the present disclosure further provides a logic block device access apparatus 50, including:
the obtaining module 501 is configured to obtain a data access request sent by a client and oriented to a logical block device.
In certain scenarios, such as storage devices for storing log files, have business features of more writing and less reading. In the prior art, a mechanical hard disk HDD is generally logically divided into a plurality of logic blocks. For example, a 10TB HDD is logically divided into 101 TB logical blocks, which are provided to 10 clients for use. A number of clients generate a large number of random accesses during use. In the physical structure of the HDD, physical operations such as swinging the magnetic head are required, which is not friendly to random access. Therefore, the write latency of the logic block is high, and the performance of the write throughput is very low.
Aiming at the specific business characteristics of more writing, less reading and less reading, the scheme of the disclosure provides improvement, and a plurality of logic blocks are constructed on the mechanical hard disk HDD, so that the plurality of logic blocks have higher writing performance, and the experience of using the logic blocks by the business is improved.
The logic block device may be a storage disk comprising a plurality of logic blocks, a disk array comprising a plurality of logic blocks, or other devices with storage functions. The logic block device is connected to one or more client devices by wired or wireless means, in such a way that the client devices can read or write data from or to the logic block device. The client device performs data access to the logic block device in a data access request mode, and therefore, in the process of performing data control on the logic block device, the data access request which is sent by the client device and faces to the logic block device needs to be acquired.
And the judging module 502 is configured to judge whether the data access request is legal or not based on the analysis result of the data access request.
The data access request from the client is set according to a preset data arrangement mode, and the data access request comprises a plurality of request fields. For example, the request field in the data access request should include at least an access parameter such as an ID of a logical block to be accessed by the client, and whether the data access request is legal can be obtained by determining whether the access parameter is legal.
The decision as to whether the data access request is legal may be made in a number of ways, as a case may be that the accessed logical block is first decided based on the data access request, and when the accessed logical block is an illegal parameter, an error is returned and the access request is ended. When the logic block access is correct, it may further determine whether the parameter in the data access request is correct (for example, it may determine whether the parameter in the data access request is a preset resolvable parameter), and when the parameter in the data access request is an illegal parameter, return an error and end the access request.
And a conversion module 503, configured to convert TID, LUN, and OFFSET fields included in the access request into a target index by using a preset algorithm when the data access request is a legal request.
When the data access request is a legal request, preset parameters contained in the data access request can be analyzed by a preset algorithm, and a specific object aimed by the data access request is determined based on the analysis result.
In order to effectively analyze the data access request so as to access the data block according to a preset mode, the storage mode of the data block needs to be set in advance. As a specific implementation manner of the present disclosure, the present disclosure proposes a method for constructing a logic block device based on an LSM-Tree structure, which mainly includes the steps of: first, the Target software tgt based on iSCSI realizes the back-end storage drive. Next, based on the backend storage drive, the user may choose to create one or more Target objects, at each of which the user may choose to create one or more LUNs (Logical Unit Number, logical unit encodings). For each LUN created, the user may act as a logical block device for the client. Finally, the client uses iSCSI protocol to mount LUN equipment, and performs read-write access by means of block equipment.
For each tgt process instance, it may manage one or more targets, each Target having a different identifier, called TID. In each Target, one or more logical units may be managed, each having a different identifier, called a LUN. The read-write request for each LUN has an Offset value called Offset. It follows that within a tgt process, the combination of TID-LUN-Offset is unique and can be used as a unique identifier.
For each LUN, it may be divided into equal-sized logical blocks. For example, a 1073741824 byte LUN has 262626144 4096 bytes of logical blocks. The start address of the first logical block is 0, the start address of the second logical block is 4096, the start address of the third logical block is 8192, and so on.
The index may be built according to the TID-LUN-Offset rule for all logical blocks within a tgt process. For example, the index of the second logical block of Target 1LUN 2 is 1-2-4096,Target 2LUN 3 and the index of the fourth logical block is 2-3-12288.
And the execution module 504 is configured to perform a data access operation on a logic block device having an LSM-Tree structure with the target index as a primary key and data corresponding to the target index as a target value.
The unique index of each logical block is used as a KEY (KEY) for LSM-Tree access, and the data of the logical block is used as a target VALUE (VALUE). Through the algorithm, the Offset write operation of the LUN of the TID can be converted into the Set KEY-VALUE operation of the LSM-Tree, and the Offset read operation of the LUN of the TID can be converted into the Get KEY-VALUE operation of the LSM-Tree.
The apparatus shown in fig. 5 may correspondingly execute the content in the foregoing method embodiment, and the portions not described in detail in this embodiment refer to the content described in the foregoing method embodiment, which are not described herein again.
By the method, random writing operation of a plurality of logical volumes can be converted into physical sequential writing through LSM-Tree, hardware characteristics of the HDD are met, the effect of quick writing is achieved, writing delay is reduced, and data writing throughput efficiency is improved.
Referring to fig. 6, an embodiment of the present disclosure also provides an electronic device 60, comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the logical block device access method of the foregoing method embodiments.
The disclosed embodiments also provide a non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the foregoing method embodiments.
The disclosed embodiments also provide a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the logical block device access method of the foregoing method embodiments.
Referring now to fig. 6, a schematic diagram of an electronic device 60 suitable for use in implementing embodiments of the present disclosure is shown. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 6 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 6, the electronic device 60 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 601, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic device 60 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
In general, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; an output device 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, magnetic tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 60 to communicate with other devices wirelessly or by wire to exchange data. While an electronic device 60 having various means is shown, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 609, or from storage means 608, or from ROM 602. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 601.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring at least two internet protocol addresses; sending a node evaluation request comprising the at least two internet protocol addresses to node evaluation equipment, wherein the node evaluation equipment selects an internet protocol address from the at least two internet protocol addresses and returns the internet protocol address; receiving an Internet protocol address returned by the node evaluation equipment; wherein the acquired internet protocol address indicates an edge node in the content distribution network.
Alternatively, the computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: receiving a node evaluation request comprising at least two internet protocol addresses; selecting an internet protocol address from the at least two internet protocol addresses; returning the selected internet protocol address; wherein the received internet protocol address indicates an edge node in the content distribution network.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The name of the unit does not in any way constitute a limitation of the unit itself, for example the first acquisition unit may also be described as "unit acquiring at least two internet protocol addresses".
It should be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof.
The foregoing is merely specific embodiments of the disclosure, but the protection scope of the disclosure is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the disclosure are intended to be covered by the protection scope of the disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (8)

1. A method for accessing a logical block device, comprising:
constructing a back-end storage driver based on target object software;
creating one or more target objects based on the backend storage drive, each target object having a particular target object identifier TID; creating one or more logical unit encodings on each target object, each logical unit being provided with a unique logical unit encoding LUN; the logic unit codes logic block equipment for identifying the client side and acquires an Offset value Offset of the logic unit for the read-write request; taking the Offset value Offset as an attribute value of the logic unit; the client can mount the logic unit coding equipment by using a preset protocol, so as to perform read-write access on the logic block equipment;
acquiring a data access request which is sent by a client and faces to logic block equipment;
judging whether the data access request is legal or not based on an analysis result of the data access request;
when the data access request is a legal request, converting TID, LUN and OFFSET fields contained in the access request into target indexes by utilizing a preset algorithm according to a TID-LUN-Offset rule;
and taking the target index as a main key and the data corresponding to the target index as a target value, and performing data access operation on the logic block equipment with the LSM-Tree structure.
2. The method of claim 1, wherein the constructing a back-end storage driver based on the target object software comprises:
managing one or more target objects using a tgt process;
each target object is assigned a specific target object identifier TID.
3. The method of claim 2, wherein the constructing a back-end storage drive based on the target object software further comprises:
managing one or more logical units with the target object;
a unique logical unit encoded LUN is set for each logical unit.
4. The method of claim 1, wherein the constructing a back-end storage drive based on the target object software further comprises:
and using a KEY obtained by calculating a combination of the TID-LUN-Offset through a preset algorithm as an index to identify all logic blocks in the tgt process.
5. The method according to claim 1, wherein after the determining whether the data access request is legal based on the analysis result of the data access request, the method further comprises:
and when the parameters in the data access request are illegal parameters, returning an error identification and ending the data access request.
6. A logic block device access apparatus, comprising:
the acquisition module is used for constructing a back-end storage drive based on target object software; creating one or more target objects based on the backend storage drive, each target object having a particular target object identifier TID; creating one or more logical unit encodings on each target object, each logical unit being provided with a unique logical unit encoding LUN; the logic unit codes logic block equipment for identifying the client side and acquires an Offset value Offset of the logic unit for the read-write request; taking the Offset value Offset as an attribute value of the logic unit; the client can mount the logic unit coding equipment by using a preset protocol, so as to perform read-write access on the logic block equipment; acquiring a data access request which is sent by a client and faces to logic block equipment;
the judging module is used for judging whether the data access request is legal or not based on the analysis result of the data access request;
the conversion module is used for calculating TID, LUN and OFFSET fields contained in the access request by using a preset algorithm when the data access request is a legal request, and converting the TID, LUN and OFFSET fields into a target index according to a TID-LUN-OFFSET rule;
and the execution module is used for performing data access operation on the logic block equipment with the LSM-Tree structure by taking the target index as a main key and the data corresponding to the target index as a target value.
7. An electronic device, the electronic device comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the logical block device access method of any one of the preceding claims 1-5.
8. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the logical block device access method of any of the preceding claims 1-5.
CN201910758713.7A 2019-08-16 2019-08-16 Logic block device access method and device and electronic device Active CN110568994B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910758713.7A CN110568994B (en) 2019-08-16 2019-08-16 Logic block device access method and device and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910758713.7A CN110568994B (en) 2019-08-16 2019-08-16 Logic block device access method and device and electronic device

Publications (2)

Publication Number Publication Date
CN110568994A CN110568994A (en) 2019-12-13
CN110568994B true CN110568994B (en) 2023-11-14

Family

ID=68775662

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910758713.7A Active CN110568994B (en) 2019-08-16 2019-08-16 Logic block device access method and device and electronic device

Country Status (1)

Country Link
CN (1) CN110568994B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105612491A (en) * 2013-09-16 2016-05-25 网络装置公司 Management of extent based metadata with dense tree structures within a distributed storage architecture
CN108769123A (en) * 2018-04-27 2018-11-06 国信优易数据有限公司 A kind of data system and data processing method
CN109213432A (en) * 2017-07-04 2019-01-15 华为技术有限公司 Utilize the log-structured storage device and method thereof for merging tree and writing data into
CN109558084A (en) * 2018-11-29 2019-04-02 文华学院 A kind of data processing method and relevant device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10303363B2 (en) * 2016-10-19 2019-05-28 Acronis International Gmbh System and method for data storage using log-structured merge trees

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105612491A (en) * 2013-09-16 2016-05-25 网络装置公司 Management of extent based metadata with dense tree structures within a distributed storage architecture
CN109213432A (en) * 2017-07-04 2019-01-15 华为技术有限公司 Utilize the log-structured storage device and method thereof for merging tree and writing data into
CN108769123A (en) * 2018-04-27 2018-11-06 国信优易数据有限公司 A kind of data system and data processing method
CN109558084A (en) * 2018-11-29 2019-04-02 文华学院 A kind of data processing method and relevant device

Also Published As

Publication number Publication date
CN110568994A (en) 2019-12-13

Similar Documents

Publication Publication Date Title
CN111090628B (en) Data processing method and device, storage medium and electronic equipment
KR102240557B1 (en) Method, device and system for storing data
US9727578B2 (en) Coordinated access to a file system's shared storage using dynamic creation of file access layout
US9683852B2 (en) Dispatching map matching tasks by a cluster server
RU2729053C1 (en) Method and device for online preview of document
CN110989926B (en) Fault magnetic disc slot positioning method and device and electronic equipment
CN111198859B (en) Data processing method, device, electronic equipment and computer readable storage medium
US20190235758A1 (en) Autonomic Data Compression for Balancing Performance and Space
CN111382123A (en) File storage method, device, equipment and storage medium
US10417192B2 (en) File classification in a distributed file system
JP2022159405A (en) Method and device for appending data, electronic device, storage medium, and computer program
CN111198861A (en) Logic log processing method and device and electronic equipment
CN106156038B (en) Date storage method and device
CN110545313B (en) Message push control method and device and electronic equipment
CN110568994B (en) Logic block device access method and device and electronic device
JP2016515258A (en) File aggregation for optimized file operation
US10346424B2 (en) Object processing
CN113032349A (en) Data storage method and device, electronic equipment and computer readable medium
US10509578B2 (en) Logical address space for storage resource pools
US11983573B2 (en) Mapping telemetry data to states for efficient resource allocation
US11200109B2 (en) Method, device and computer program product for processing data
CN111309988B (en) Character string retrieval method and device based on coding and electronic equipment
CN110753136B (en) Domain name resolution method, device, equipment and storage medium
US8966133B2 (en) Determining a mapping mode for a DMA data transfer
US9317217B1 (en) Wiping and verifying storage devices

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

Effective date of registration: 20220707

Address after: 100190 1309, 13th floor, building 4, Zijin Digital Park, Haidian District, Beijing

Applicant after: Beijing volcano Engine Technology Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant