A method, apparatus, and device for implementing iSCSI services supporting IP dual-stack.
By having the client select the IP stack type and send it to the iSCSI server, the server automatically matches and returns the service IP, which solves the problem of manually selecting the IP in iSCSI services and achieves more efficient operation and stability.
Patent Information
- Application Number
- CN202310389896.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-07
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2043-04-07
AI Technical Summary
In existing technologies, iSCSI services in IP dual-stack environments require manual intervention to select the service IP, which is inconvenient and labor-intensive.
The client selects the IP stack type and sends it to the iSCSI server. The server automatically matches and returns the appropriate service IP, and the client automatically connects to the iSCSI service.
It reduces manual intervention, improves operational convenience, prevents target name conflicts, and enhances the stability and convenience of iSCSI services.
Smart Images

Figure CN116233223B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, and in particular to an implementation method, device and equipment of iSCSI service supporting IP dual stack. BACKGROUND
[0002] In the prior art, IP dual stack means using IPv6 / IPv4 simultaneously in a system (such as a host or a router), and an iSCSI (Internet Small Computer System Interface) service returns a service IP list to a client, and the client selects a service IP to access the iSCSI service by itself. An iSCSI map is a mapping generated when a storage service monitors an iSCSI service of a storage node, and an omap is used to store data required by a storage in a cluster to provide a service. This process needs manual intervention in the middle during access to the service, that is, a person needs to manually select a service IP from the returned service IP list to access the iSCSI service, which consumes manpower and is inconvenient to operate. SUMMARY
[0003] Therefore, the present application provides an implementation method, device and equipment of iSCSI service supporting IP dual stack, wherein the implementation method of iSCSI service supporting IP dual stack provided by the present application comprises the following steps: a client selects an IP stack type and issues it to an iSCSI server, the iSCSI service automatically matches an appropriate service IP from a service IP list according to the IP stack type and returns it to the client, and the iSCSI client automatically connects the service IP, thereby avoiding manual intervention to select a service IP from the service IP list to access the iSCSI service.
[0004] To achieve the above purpose, one aspect of an embodiment of the present application provides an implementation method of iSCSI service supporting IP dual stack, which comprises the following steps performed at a server: deploying a configuration file of IP dual stack at a storage node of the server and starting an iSCSI service; loading a network segment of the configuration file and matching it with a local network card to obtain a matched service IP list and write it into an iSCSI map for maintenance; in response to receiving a mount volume command issued by a client, obtaining an IP stack type carried by the mount volume command and matching it with the service IP list of the iSCSI map, and returning a matched service IP to the client, so that the client accesses the iSCSI service through the returned service IP.
[0005] In some embodiments, the method further comprises the following steps: in response to the server receiving a discover target command initiated by the client, splicing the matched service IP with a target name of the discover target command, and returning it to the client.
[0006] In some embodiments, the step of, in response to receiving the mount volume command issued by the client, obtaining the IP stack type carried by the mount volume command and matching the service IP list of the iSCSI map, and returning the matched service IP to the client, so that the client accesses the iSCSI service through the returned service IP, comprises the steps of: in response to receiving the mount volume command issued by the client, parsing the corresponding volume mapping information from the mount volume command and caching in the omap of the storage cluster, obtaining the corresponding IP stack type from the omap and matching the service IP list of the iSCSI map.
[0007] In some embodiments, the information maintained by the iSCSI map at least includes: a storage pool list, a service IP list, and a cabinet ID information of the storage node.
[0008] In some embodiments, the step of deploying the IP dual stack configuration file on the storage node of the server and starting the iSCSI service comprises the step of: deploying the IP dual stack configuration file on the storage node of the server by writing the network segments of IPV4 and IPV6 into the configuration file.
[0009] In some embodiments, the step of loading the network segment of the configuration file and matching with the local network card, obtaining the matched service IP list and writing into the iSCSI map for maintenance comprises the steps of: loading and parsing the configuration file, and obtaining the service network segment of the configuration file.
[0010] In some embodiments, the step of loading the network segment of the configuration file and matching with the local network card, obtaining the matched service IP list and writing into the iSCSI map for maintenance further comprises the step of: matching the service network segment with the local network card of the storage node to obtain the matched service IP list.
[0011] In some embodiments, the step of loading the network segment of the configuration file and matching with the local network card, obtaining the matched service IP list and writing into the iSCSI map for maintenance comprises the step of: in response to the iSCSI service and the monitoring service being no heartbeat for more than a preset time, deleting the iSCSI map from the monitoring service.
[0012] Another aspect of the embodiments of the present application also provides an implementation device for supporting IP dual stack iSCSI service, the device comprising: a first module configured to deploy a configuration file of IP dual stack and start an iSCSI service on a storage node of a service end; a second module configured to load a network segment of the configuration file and match with a local network card, obtain a matched service IP list and write into an iSCSI map for maintenance; and a third module configured to, in response to receiving a mount volume command issued by a client, obtain an IP stack type carried by the mount volume command and match with the service IP list of the iSCSI map, return a matched service IP to the client, so that the client accesses the iSCSI service through the returned service IP.
[0013] In some embodiments, the device further comprises a fourth module configured to, in response to the service end receiving a discover target command initiated by the client, splice the matched service IP with a target name of the discover target command and return to the client.
[0014] In some embodiments, the third module is further configured to, in response to receiving a mount volume command issued by a client, parse corresponding volume mapping information from the mount volume command and cache in an omap of a storage cluster, obtain a corresponding IP stack type from the omap and match with the service IP list of the iSCSI map.
[0015] In some embodiments, the information maintained by the iSCSI map at least comprises a storage pool list, a service IP list and a cabinet ID information of a storage node.
[0016] In some embodiments, the first module is further configured to deploy a configuration file of IP dual stack on a storage node of a service end by writing network segments of IPV4 and IPV6 into the configuration file.
[0017] In some embodiments, the second module is further configured to load and parse the configuration file and obtain a service network segment of the configuration file.
[0018] In some embodiments, the second module is further configured to match the service network segment with a local network card of a storage node and obtain a matched service IP list.
[0019] In some embodiments, the second module is further configured to, in response to the iSCSI service and a monitoring service being no heartbeat for more than a preset time, delete the iSCSI map from the monitoring service.
[0020] Another aspect of the embodiments of the present application further provides a computer device, comprising at least one processor; and a memory, the memory storing computer instructions executable on the processor, the instructions being executed by the processor to implement the steps of any of the above methods.
[0021] Another aspect of the embodiments of the present application further provides a computer readable storage medium, the computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of any of the above methods.
[0022] The present application has at least the following beneficial effects: the present application provides an implementation method, device and equipment of an iSCSI service supporting IP dual stacks, wherein the implementation method of the iSCSI service supporting IP dual stacks provided by the present application realizes IP stack selection and automatic access of a client and a server, reduces manual intervention in an intermediate process, and improves operation convenience. Specifically, by combining a target name with a service IP, the present application prevents target names returned by different node iSCSI services to a client from conflicting in the same iSCSI client, and improves iSCSI service stability; an iSCSI client can carry an IP type to an iSCSI server, and the server returns a suitable service IP from a service IP list to the client, without the need for the client to select a service IP for access, thereby saving labor costs and improving convenience. BRIEF DESCRIPTION OF DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other embodiments can be obtained from these drawings without creative labor.
[0024] Figure 1 FIG. 1 shows a schematic diagram of an embodiment of the implementation method of the iSCSI service supporting IP dual stacks provided by the present application;
[0025] Figure 2 FIG. 2 shows a schematic diagram of an embodiment of the implementation device of the iSCSI service supporting IP dual stacks provided by the present application;
[0026] Figure 3 FIG. 3 shows a schematic diagram of an embodiment of the computer device provided by the present application;
[0027] Figure 4 FIG. 4 shows a schematic diagram of an embodiment of the computer readable storage medium provided by the present application. DETAILED DESCRIPTION
[0028] Embodiments of the present application are described below. It should be understood, however, that the disclosed embodiments are merely examples and other embodiments can take various alternative forms.
[0029] In addition, it should be noted that the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus.
[0030] One or more embodiments of the present application will be described below with reference to the accompanying drawings.
[0031] Based on the above purpose, in a first aspect of the embodiments of the present application, an embodiment of an implementation method of an iSCSI service supporting IP dual stack is provided. Figure 1 An embodiment of an implementation method of an iSCSI service supporting IP dual stack provided by the present application is shown. As shown in the figure, Figure 1 An implementation method of an iSCSI service supporting IP dual stack provided by the present application includes the following steps performed on the service side:
[0032] S1, deploying a configuration file of IP dual stack on a storage node of the service side and starting an iSCSI service;
[0033] S2, loading a network segment of the configuration file and matching with a local network card, obtaining a list of matching service IPs and writing into an iSCSI map for maintenance;
[0034] S3, in response to receiving a mount volume command issued by a client, obtaining an IP stack type carried by the mount volume command and matching with the list of service IPs of the iSCSI map, returning a matching service IP to the client, so that the client accesses the iSCSI service through the returned service IP.
[0035] According to several embodiments of the present application, the method further includes, in response to the service side receiving a discovery target command initiated by the client, concatenating the matching service IP with a target name of the discovery target command and returning to the client.
[0036] According to several embodiments of the present application, in response to receiving the mount volume command issued by the client, obtaining the IP stack type carried by the mount volume command and matching the service IP list of the iSCSI map, and returning the matched service IP to the client, so that the client accesses the iSCSI service through the returned service IP, comprises: in response to receiving the mount volume command issued by the client, parsing the corresponding volume mapping information from the mount volume command and caching in the omap of the storage cluster, obtaining the corresponding IP stack type from the omap and matching the service IP list of the iSCSI map.
[0037] According to several embodiments of the present application, the information maintained by the iSCSI map at least includes: a storage pool list, a service IP list, and cabinet ID information of the storage node.
[0038] According to several embodiments of the present application, deploying the IP dual stack configuration file on the storage node of the server and starting the iSCSI service comprises: deploying the IP dual stack configuration file on the storage node of the server by writing the IPV4 and IPV6 network segments into the configuration file.
[0039] According to several embodiments of the present application, loading the network segment of the configuration file and matching with the local network card, obtaining the matched service IP list and writing into the iSCSI map for maintenance comprises: loading and parsing the configuration file, obtaining the service network segment of the configuration file.
[0040] According to several embodiments of the present application, loading the network segment of the configuration file and matching with the local network card, obtaining the matched service IP list and writing into the iSCSI map for maintenance further comprises: matching the service network segment with the local network card of the storage node to obtain the matched service IP list.
[0041] According to several embodiments of the present application, loading the network segment of the configuration file and matching with the local network card, obtaining the matched service IP list and writing into the iSCSI map for maintenance comprises: in response to the iSCSI service and the monitoring service being no heartbeat for more than a preset time, deleting the iSCSI map from the monitoring service.
[0042] The following is another embodiment of an implementation method of an iSCSI service supporting IP dual stack provided by the present application.
[0043] According to the network segment configured by the configuration file when the iSCSI service starts, the local network card is automatically matched, and the matched service IP list is written into the storage cluster and maintained in the iSCSI map. The iSCSI map exists when the service is normal, and the map disappears after the service is abnormal. The client calls the command of the server to create a volume mapping, and the iSCSI service will first cache the volume mapping information, obtain the service IP list from the iSCSI map, and return the corresponding service IP to the client according to the IP stack type of the volume mapping. After the client receives the service IP of the same type, it accesses the iSCSI service through the returned service IP of the same type. In the process of discovering the target before the client accesses the iSCSI service, the iSCSI service will obtain the service IP list from the iSCSI map of the storage cluster and match it with the IP type of the client. After successful matching, the service IP and the target name are spliced and returned to the client to prevent conflicts between target names of different physical machines in the same client. The following is the specific implementation process:
[0044] (1) Obtain service IP
[0045] The iSCSI service will write the required IPV4 / IPV6 network segment into the configuration file when the service is deployed on the server. After deployment is complete, the iSCSI service will first load and parse the configuration file and obtain the service network segment when starting. Then, the service IP list is obtained by matching with the local network card of the storage node.
[0046] (2) Storage of service IP
[0047] Storage cluster storage. After obtaining the service IP list, the iSCSI service stores the service IP list in the iSCSI map through the storage service interface. The iSCSI map is a mapping generated by the storage service when monitoring the iSCSI service. If the iSCSI service and the storage monitoring service do not have a heartbeat for more than a predetermined time (such as 120s), the iSCSI map will be deleted from the storage monitoring service.
[0048] iSCSI service cache. When creating a volume mapping, if the volume mapping has no cache in the iSCSI service, the iSCSI service will obtain the storage pool list, service IP list, and cabinet ID of the storage node from the iSCSI map, and then write the created volume mapping information into the omap of the storage cluster and establish a cache in the iSCSI service, to prevent frequent reading of volume mapping configuration information and affect the performance of the cluster.
[0049] (3) Application of service IP
[0050] When the client creates a volume mapping, the IP type is carried in the command sent from the ISM module of the client to the iSCSI service. If the volume mapping already exists, the service IP matching the iptype is obtained from the service IP list cached by the iSCSI service. After the client obtains the corresponding service IP, the client accesses the service IP returned by the iSCSI service using the same IP type. Before accessing the iSCSI service, the client first initiates a discovery target process. After receiving the iSCSI discovery target command, the iSCSI service matches the IP type of the client with the service IP list in the iSCSI map, splices the matching service IP and the target name to prevent conflicts of the target name in the iSCSI client from causing other problems.
[0051] The implementation method of the iSCSI service supporting IP dual stack provided by the application improves the stability of the iSCSI service. When the iSCSI client discovers the target of the iSCSI server, the target name is stored in the database of the iSCSI client. The iSCSI server combines the target name and the service IP through the iSCSI dual stack framework to avoid conflicts of the target name returned by the iSCSI service of different nodes to the client in the same iSCSI client. The implementation method also improves the convenience of the iSCSI service access. The iSCSI client can carry the IP type to the iSCSI server, and then match the appropriate service IP from the service IP list and return it to the client. The service IP list does not need to be returned to the client, and the user selects the service IP to access, which saves the labor cost and improves the convenience.
[0052] In a second aspect, the application provides an implementation device of the iSCSI service supporting IP dual stack. Figure 2 The application provides an implementation device of the iSCSI service supporting IP dual stack. Figure 2 The implementation device of the iSCSI service supporting IP dual stack includes a first module 011 configured to deploy a configuration file of IP dual stack on a storage node of a server and start an iSCSI service, a second module 012 configured to load a network segment of the configuration file and match the network segment with a local network card, obtain a matching service IP list and write the service IP list in an iSCSI map for maintenance, and a third module 013 configured to obtain an IP stack type carried in a mounting volume command of a client and match the IP stack type with a service IP list of the iSCSI map in response to receiving the mounting volume command, and return a matching service IP to the client, so that the client accesses the iSCSI service through the returned service IP.
[0053] According to some embodiments of the present application, the apparatus further comprises a fourth module configured to splice the matched service IP with a target name of the discovery target command initiated by the client and return to the client in response to the service end receiving the discovery target command.
[0054] According to some embodiments of the present application, the third module is further configured to parse corresponding volume mapping information from the mount volume command and cache in the omap of the storage cluster in response to receiving the mount volume command issued by the client, and obtain corresponding IP stack type from the omap and match with the service IP list of the iSCSI map.
[0055] According to some embodiments of the present application, the information maintained by the iSCSI map at least includes a storage pool list, a service IP list and cabinet ID information of the storage node.
[0056] According to some embodiments of the present application, the first module is further configured to deploy the configuration file of the IP dual stack by writing the network segment of IPV4 and IPV6 into the configuration file at the storage node of the service end.
[0057] According to some embodiments of the present application, the second module is further configured to load and parse the configuration file and obtain the service network segment of the configuration file.
[0058] According to some embodiments of the present application, the second module is further configured to match the service network segment with the local network card of the storage node to obtain the matched service IP list.
[0059] According to some embodiments of the present application, the second module is further configured to delete the iSCSI map from the monitoring service in response to no heartbeat of the iSCSI service and the monitoring service exceeding a preset time.
[0060] Based on the above purpose, the third aspect of the embodiments of the present application proposes a computer device, Figure 3 The figure shows a schematic diagram of an embodiment of a computer device provided by the present application. As shown in the figure, Figure 3As shown, the embodiment of the computer device provided by the application comprises the following modules: at least one processor 021; and a memory 022, which stores computer instructions 023 capable of running on the processor 021, and the computer instructions 023 implement the steps of the method as described above when executed by the processor 021, wherein the method performed by the steps comprises: deploying a configuration file of IP dual stack and starting an iSCSI service on a storage node of a service end; loading a network segment of the configuration file and matching with a local network card to obtain a matched service IP list and write into an iSCSI map for maintenance; in response to receiving a mount volume command issued by a client, obtaining an IP stack type carried by the mount volume command and matching with the service IP list of the iSCSI map, returning a matched service IP to the client, so that the client accesses the iSCSI service through the returned service IP.
[0061] In some embodiments, the method further comprises: in response to the service end receiving a discovery target command initiated by the client, splicing the matched service IP with a target name e of the discovery target command and returning to the client.
[0062] In some embodiments, the response to receiving a mount volume command issued by a client, obtaining an IP stack type carried by the mount volume command and matching with the service IP list of the iSCSI map, returning a matched service IP to the client, so that the client accesses the iSCSI service through the returned service IP comprises: in response to receiving a mount volume command issued by a client, parsing corresponding volume mapping information from the mount volume command and caching in an omap of a storage cluster, obtaining a corresponding IP stack type from the omap and matching with the service IP list of the iSCSI map.
[0063] In some embodiments, the information maintained by the iSCSI map at least comprises: a storage pool list, a service IP list and cabinet ID information of a storage node.
[0064] In some embodiments, the deploying a configuration file of IP dual stack and starting an iSCSI service on a storage node of a service end comprises: deploying a configuration file of IP dual stack on a storage node of a service end by writing network segments of IPV4 and IPV6 into the configuration file.
[0065] In some embodiments, the loading a network segment of the configuration file and matching with a local network card to obtain a matched service IP list and write into an iSCSI map for maintenance comprises: loading and parsing the configuration file to obtain a service network segment of the configuration file.
[0066] In some embodiments, the loading the network segment of the configuration file and matching with the local network card, obtaining the matched service IP list and writing into the iSCSI map for maintenance further comprises: matching the service network segment with the local network card of the storage node to obtain the matched service IP list.
[0067] In some embodiments, the loading the network segment of the configuration file and matching with the local network card, obtaining the matched service IP list and writing into the iSCSI map for maintenance comprises: in response to no heartbeat from the iSCSI service and the monitoring service for more than a preset time, deleting the iSCSI map from the monitoring service.
[0068] The present application also provides a computer readable storage medium. Figure 4 An embodiment of the computer readable storage medium provided by the present application is shown in the schematic diagram. As shown in the figure, Figure 4 The computer readable storage medium 031 stores a computer program 032 which, when executed by a processor, performs the following steps: deploying an IP dual stack configuration file on a storage node of a service end and starting an iSCSI service; loading the network segment of the configuration file and matching with the local network card, obtaining the matched service IP list and writing into the iSCSI map for maintenance; in response to receiving a mount volume command issued by a client, obtaining the IP stack type carried by the mount volume command and matching with the service IP list of the iSCSI map, returning the matched service IP to the client, so that the client accesses the iSCSI service through the returned service IP.
[0069] In some embodiments, the method further comprises: in response to the service end receiving a discover target command initiated by the client, splicing the matched service IP with the target name of the discover target command and returning to the client.
[0070] In some embodiments, the response to receiving a mount volume command issued by a client, obtaining the IP stack type carried by the mount volume command and matching with the service IP list of the iSCSI map, returning the matched service IP to the client, so that the client accesses the iSCSI service through the returned service IP comprises: in response to receiving a mount volume command issued by a client, parsing the corresponding volume mapping information from the mount volume command and caching in the omap of the storage cluster, obtaining the corresponding IP stack type from the omap and matching with the service IP list of the iSCSI map.
[0071] In some embodiments, the information maintained by the iSCSI map at least includes: a storage pool list, a service IP list and a cabinet ID information of the storage node.
[0072] In some embodiments, the deploying the IP dual stack configuration file and starting the iSCSI service on the storage node of the service end comprises: deploying the IP dual stack configuration file on the storage node of the service end by writing the network segment of IPV4 and IPV6 into the configuration file.
[0073] In some embodiments, the loading the network segment of the configuration file and matching with the local network card, obtaining the matched service IP list and writing into the iSCSI map for maintenance comprises: loading and parsing the configuration file to obtain the service network segment of the configuration file.
[0074] In some embodiments, the loading the network segment of the configuration file and matching with the local network card, obtaining the matched service IP list and writing into the iSCSI map for maintenance further comprises: matching the service network segment with the local network card of the storage node to obtain the matched service IP list.
[0075] In some embodiments, the loading the network segment of the configuration file and matching with the local network card, obtaining the matched service IP list and writing into the iSCSI map for maintenance comprises: in response to no heartbeat from the iSCSI service to the monitoring service for more than a preset time, deleting the iSCSI map from the monitoring service.
[0076] Finally, it needs to be explained that all or part of the processes in the above-mentioned embodiments can be understood by those of ordinary skill in the art, and can be completed by a computer program instructing related hardware. The program for setting system parameters can be stored in a computer readable storage medium. When the program is executed, it can include the processes of the above-mentioned embodiments. The storage medium of the program can be a magnetic disc, an optical disc, a read-only memory (ROM) or a random access memory (RAM), etc. The above-mentioned computer program embodiments can achieve the same or similar effects as the corresponding any method embodiments.
[0077] In addition, the method disclosed in the embodiments of the present application can also be implemented as a computer program executed by a processor, which can be stored in a computer readable storage medium. When the computer program is executed by the processor, the above-mentioned functions defined in the method disclosed in the embodiments of the present application are executed.
[0078] In addition, the above-mentioned method steps and system units can also be implemented by a controller and a computer readable storage medium for storing a computer program for enabling the controller to implement the above-mentioned steps or unit functions.
[0079] Those skilled in the art will further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein can be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the overall system. Skilled artisans can implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present embodiments disclosure.
[0080] In one or more exemplary designs, the functions described can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions can be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media can be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code means in the form of instructions or data structures and that can be accessed by a general-purpose or special-purpose computer, or a general-purpose or special-purpose processor. Also, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0081] The foregoing is a summary of the exemplary embodiments disclosed herein, but it should be noted that numerous changes and modifications can be made without departing from the scope of the embodiments disclosed in the claims. The functions, steps and / or actions of the method claims in accordance with the embodiments described herein need not be performed in any particular order. Furthermore, although the elements of the embodiments disclosed herein can be described or claimed in individual forms, other embodiments can include a combination of elements from two or more of these disclosures.
[0082] It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising", or "includes" and / or "including" when used herein, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0083] The above-mentioned embodiment serial number of the present application is only for description, not representing the advantages and disadvantages of the embodiments.
[0084] Those skilled in the art can understand that all or part of the steps of the above-mentioned embodiments can be completed by hardware, or by program instructing relevant hardware to complete, and the program can be stored in a computer readable storage medium, such as read-only memory, magnetic disk or optical disk.
[0085] Those skilled in the art should understand that the above discussion of any embodiment is only exemplary, and is not intended to imply that the scope of the embodiments of the present application (including claims) is limited to these examples; under the idea of the embodiments of the present application, the above embodiments or technical features in different embodiments can also be combined, and there are many other changes of different aspects of the embodiments of the present application as above. In order to be brief, they are not provided in details. Therefore, any omission, modification, equivalent replacement, improvement, etc. made in the spirit and principle of the embodiments of the present application shall be included in the protection scope of the embodiments of the present application.
Claims
1. An implementation method of an iSCSI service supporting IP dual stack, characterized in that, The steps performed at the service end include: deploying an IP dual stack configuration file at a storage node of the service end and starting an iSCSI service; loading a network segment of the configuration file and matching it with a local network card to obtain a matching service IP list and write the service IP list into an iSCSI map for maintenance; in response to receiving a mount volume command issued by a client, obtaining an IP stack type carried by the mount volume command and matching the IP stack type with the service IP list of the iSCSI map, returning a matching service IP to the client, so that the client accesses the iSCSI service through the returned service IP; in response to the service end receiving a discover target command initiated by the client, splicing the matching service IP with a target name of the discover target command and returning the spliced result to the client.
2. The method of claim 1, wherein, The step of, in response to receiving a mount volume command issued by a client, obtaining an IP stack type carried by the mount volume command and matching the IP stack type with the service IP list of the iSCSI map, returning a matching service IP to the client, so that the client accesses the iSCSI service through the returned service IP includes: in response to receiving a mount volume command issued by a client, obtaining corresponding volume mapping information from the mount volume command and caching the volume mapping information in an omap of a storage cluster, obtaining a corresponding IP stack type from the omap and matching the IP stack type with the service IP list of the iSCSI map.
3. The method of claim 1, wherein, The information maintained by the iSCSI map at least includes a storage pool list, a service IP list and a cabinet ID information of a storage node.
4. The method of claim 1, wherein, The step of deploying an IP dual stack configuration file at a storage node of the service end and starting an iSCSI service includes: deploying an IP dual stack configuration file at a storage node of the service end by writing network segments of IPV4 and IPV6 into the configuration file.
5. The method of claim 1, wherein, The step of loading a network segment of the configuration file and matching it with a local network card to obtain a matching service IP list and write the service IP list into an iSCSI map for maintenance includes: loading and parsing the configuration file to obtain a service network segment of the configuration file.
6. The method of claim 5, wherein, The step of loading a network segment of the configuration file and matching it with a local network card to obtain a matching service IP list and write the service IP list into an iSCSI map for maintenance further includes: matching the service network segment with a local network card of the storage node to obtain a matching service IP list.
7. The method of claim 1, wherein, The step of loading a network segment of the configuration file and matching it with a local network card to obtain a matching service IP list and write the service IP list into an iSCSI map for maintenance includes: in response to the iSCSI service and a monitoring service not having a heartbeat for more than a preset time, deleting the iSCSI map from the monitoring service.
8. An implementation apparatus for iSCSI service supporting IP dual-stack, characterized in that, The apparatus includes: a first module configured to deploy an IP dual stack configuration file at a storage node of the service end and start an iSCSI service; a second module configured to load a network segment of the configuration file and match it with a local network card to obtain a matching service IP list and write the service IP list into an iSCSI map for maintenance; The third module is configured to, in response to receiving a mounting volume command issued by a client, acquire an IP stack type carried by the mounting volume command and match the acquired IP stack type with a service IP list of the iSCSI map, and return a matched service IP to the client, so that the client accesses an iSCSI service through the returned service IP; The fourth module is configured to, in response to the server receiving a discovery target command initiated by the client, splice the matched service IP with a target name of the discovery target command, and return to the client.
9. A computer device, characterized by The server comprises: at least one processor; and a memory storing computer instructions executable on the processor, the instructions being executed by the processor to implement the steps of the method of any one of claims 1-7.
Citation Information
Patent Citations
Dual-IP and dual-line server and serving method
CN104486459A