CN112153149B - Server connection method, system, electronic equipment and storage medium - Google Patents
Server connection method, system, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN112153149B CN112153149B CN202011033764.2A CN202011033764A CN112153149B CN 112153149 B CN112153149 B CN 112153149B CN 202011033764 A CN202011033764 A CN 202011033764A CN 112153149 B CN112153149 B CN 112153149B
- Authority
- CN
- China
- Prior art keywords
- controller
- cluster
- server
- bits
- storage devices
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 54
- 230000006870 function Effects 0.000 claims description 21
- 238000004891 communication Methods 0.000 claims description 13
- 238000004590 computer program Methods 0.000 claims description 8
- 230000005540 biological transmission Effects 0.000 claims description 7
- 230000002596 correlated effect Effects 0.000 claims description 4
- 230000003993 interaction Effects 0.000 claims description 4
- 230000009286 beneficial effect Effects 0.000 abstract description 2
- 230000008569 process Effects 0.000 description 10
- 230000000875 corresponding effect Effects 0.000 description 9
- 239000004744 fabric Substances 0.000 description 7
- 230000009471 action Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 238000013500 data storage Methods 0.000 description 2
- 230000000977 initiatory effect Effects 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000011218 segmentation Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000013439 planning Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000013468 resource allocation Methods 0.000 description 1
- 239000000523 sample Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/141—Setup of application sessions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/146—Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer And Data Communications (AREA)
Abstract
The application discloses a server connection method, which is applied to storage equipment in a cluster, and comprises the following steps: acquiring the number of the storage devices in the cluster, and determining N-bit device distinguishing codes according to the number of the storage devices, so that the device distinguishing codes of all the storage devices in the cluster are different; after receiving a connection request sent by a server, generating a target controller identifier with a high N bit as the equipment distinguishing code; and creating a controller of the target controller identification, and establishing connection with the server by using the controller. The method and the device can reasonably distribute the controller identifications, avoid the disordered connection of the server and the storage equipment, and improve the cluster reliability. The application also discloses a server connection system, an electronic device and a storage medium, which have the beneficial effects.
Description
Technical Field
The present application relates to the field of data storage technologies, and in particular, to a server connection method, a server connection system, an electronic device, and a storage medium.
Background
In a SAN (Storage Area Network) Storage environment, a server is connected to a Storage device through a Storage Network, which is generally referred to as a front-end connection or a front-end Network in the art. In a conventional storage network, data transmission between a server and a storage device is performed according to the SCSI protocol. After the NVMe over Fabrics protocol standard is released, the front-end network can use the NVMe protocol to replace the traditional SCSI protocol.
When a server requests a storage device within a cluster to establish a connection, the storage device creates a controller to handle commands sent by the server with the controller. A controller identification (i.e., controller ID) needs to be assigned to the controller when it is created. However, because a plurality of storage devices exist in the cluster, that is, when a plurality of paths exist between the server and the storage devices, the server may initiate dynamic connection for a plurality of times, the storage devices in the cluster may sequentially and dynamically create a plurality of controllers, and at this time, the plurality of storage devices in the cluster create controllers having the same controller identifier, which may cause the connection between the server and the storage devices to be disordered, and seriously affect the reliability of the cluster.
Therefore, how to reasonably allocate the controller identifiers, avoid the disordered connection between the server and the storage device, and improve the cluster reliability is a technical problem to be solved by those skilled in the art.
Disclosure of Invention
The application aims to provide a server connection method, a server connection system, an electronic device and a storage device, which can reasonably distribute controller identifications, avoid disordered connection between the server and the storage device and improve cluster reliability.
In order to solve the above technical problem, the present application provides a server connection method, which is applied to a storage device in a cluster, and the server connection method includes:
acquiring the number of the storage devices in the cluster, and determining N-bit device distinguishing codes according to the number of the storage devices, so that the device distinguishing codes of all the storage devices in the cluster are different;
after receiving a connection request sent by a server, generating a target controller identifier with a high N bit as the equipment distinguishing code;
and creating a controller of the target controller identification, and establishing connection with the server by using the controller.
Optionally, generating the target controller identifier with the high N bits as the device distinguishing code includes:
determining a controller distinguishing code of M bits according to the low M bits of the distributed controller identifiers in the storage device, so that the controller distinguishing code is different from the low M bits of all the controller identifiers in the storage device;
generating a target controller identifier with the high N bits as the equipment distinguishing codes and the low M bits as the controller distinguishing codes; wherein the target controller identification is a value of N + M bits.
Optionally, before determining the device distinguishing code with N bits according to the number of the storage devices, the method further includes:
using preset formula 2 N-1 <A≤2 N Determining a value of the number of bits N of the device discrimination code; wherein A is the number of storage devices.
Optionally, after the connection with the server is established by using the controller, the method further includes:
judging whether controllers of other storage devices exist in the cluster and establishing connection with the server;
if yes, starting the asymmetric name space access function.
Optionally, after the connection with the server is established by using the controller, the method further includes:
and the server performs data transmission with the storage equipment in the cluster through an NVMe protocol.
Optionally, generating the target controller identifier with the high N bits as the device distinguishing code includes:
generating a target controller identifier with high N bits as the equipment distinguishing codes according to a preset rule; the preset rule is that the value of the target controller identifier is positively correlated with the connection request receiving times.
Optionally, before acquiring the number of the storage devices in the cluster, the method further includes:
and starting a cluster communication function of the cluster so that the storage equipment in the cluster can perform information interaction based on the cluster communication function.
The present application further provides a server connection system, which is applied to a storage device in a cluster, and the system includes:
the device distinguishing code determining module is used for acquiring the number of the storage devices in the cluster and determining N-bit device distinguishing codes according to the number of the storage devices so as to enable the device distinguishing codes of each storage device in the cluster to be different;
the identification determining module is used for generating a target controller identification with the high N bits as the equipment distinguishing codes after receiving a connection request sent by a server;
and the connection establishing module is used for establishing the controller of the target controller identifier and establishing connection with the server by utilizing the controller.
The application also provides a storage medium on which a computer program is stored, which when executed implements the steps performed by the above-mentioned server connection method.
The application also provides an electronic device, which comprises a memory and a processor, wherein the memory stores a computer program, and the processor realizes the steps executed by the server connection method when calling the computer program in the memory.
The application provides a server connection method, which is applied to storage equipment in a cluster, and the server connection method comprises the following steps: acquiring the number of the storage devices in the cluster, and determining N-bit device distinguishing codes according to the number of the storage devices, so that the device distinguishing codes of each storage device in the cluster are different; after receiving a connection request sent by a server, generating a target controller identifier with a high N bit as the equipment distinguishing code; and creating a controller of the target controller identification, and establishing connection with the server by using the controller.
The method and the device are applied to the storage devices in the cluster, and the device distinguishing codes of the storage devices are determined according to the number of the storage devices in the cluster, so that the device distinguishing codes of all the storage devices in the cluster are different. After receiving a connection request sent by a server, the method generates the target controller identifier with the high N bits as the device distinguishing code, namely the high N bits of the controller identifiers of all the storage devices in the cluster are different, so that the situation that different storage devices generate the same controller identifier can be avoided. After the unique target controller identifier in the cluster is determined, the corresponding controller can be generated and created, so that the controller can be used for establishing connection with the server. The method and the device for generating the controller identifier based on the device distinguishing code can ensure that the allocation of the controller identifier is not conflicted under the condition of not negotiating with other storage devices in the cluster. Therefore, controller identification can be reasonably distributed, the connection disorder of the server and the storage device is avoided, and the cluster reliability is improved. The application also provides a server connection system, an electronic device and a storage medium, which have the beneficial effects and are not repeated herein.
Drawings
In order to more clearly illustrate the embodiments of the present application, the drawings needed for 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 application, and that other drawings can be obtained by those skilled in the art without inventive effort.
Fig. 1 is a flowchart of a server connection method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a storage network according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a server connection system according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
In the process of connecting the server and the cluster, the storage device perceived by the server is a virtual device in the cluster established by a plurality of physical devices. When a dynamic connection with an NVM subsystem is initiated from a server, the NVM subsystem dynamically creates a controller, the identifier of the controller is distributed from 0, and when the dynamic connection with the NVM subsystem is initiated from the server again next time, the identifier of the newly dynamically created controller is 1 and is sequentially increased. When multiple paths exist between the server and the storage device, multiple dynamic connections are initiated, and multiple controllers are dynamically created in turn in the NVM subsystem. In a high-reliability storage network, a plurality of physical storage devices in a cluster all have independent operating systems, and if controller identifications are sequentially allocated from 0,1,2,3 after each device dynamically creates a controller, ID conflicts of a plurality of controller identifications in NVM subsystems in the cluster are caused, which causes confusion and does not meet the standard requirements of NVMe over Fabrics protocol. Therefore, the embodiments of the present application provide the following several implementation manners, which can reasonably allocate the controller identifiers, avoid the confusion of the connection between the server and the storage device, and improve the cluster reliability.
Referring to fig. 1, fig. 1 is a flowchart of a server connection method according to an embodiment of the present disclosure.
The specific steps may include:
s101: acquiring the number of storage devices in a cluster, and determining N-bit device distinguishing codes according to the number of the storage devices, so that the device distinguishing codes of each storage device in the cluster are different;
fig. 2 is a schematic view of a structure of a storage network provided in an embodiment of the present invention, and fig. 2 is a schematic view of the structure of the storage network. As shown in fig. 2, the server is connected to the storage devices in the cluster through a switch, and the plurality of storage devices are connected to a data storage medium (e.g., a mechanical hard disk, a solid state disk SSD, etc.). In the networking mode shown in fig. 2, there are multiple paths from the server to the storage medium, and when a certain path fails, data transmission can be performed through another path. According to the definition in NVMe over Fabrics protocol, the server is used as host end and is connected to the NVM subsystem of the storage device. The NVMe over Fabrics protocol specification describes a method for a probe to use a network link to carry the NVMe protocol. The controller in the NVM subsystem processes the command sent from the host side, and the controller may be dynamically created, and when there are multiple paths between the host side and the NVM subsystem of the storage device, multiple controllers may be created in the NVM subsystem to correspond to the multiple controllers. When a controller is created by a storage device, the controller needs to be assigned a controller identification controllerID, which may be a 16-bit value, for example.
In this step, the number of storage devices existing in the cluster or the number of online storage devices is determined, and N-bit device distinguishing codes are determined according to the number of the storage devices, so that the device distinguishing codes of each storage device in the cluster are different. The present embodiment can flexibly set the value of N according to the number of storage devices, for example, when there are 8 storage devices, a device distinguishing code with a bit number of 3 can be determined, that is, the device and device distinguishing codes of the 8 storage devices are sequentially: 000. 001, 010, 011, 100, 101, 110, 111. The device distinguishing code is a unique identifier for distinguishing the storage devices, and the unique corresponding storage device can be determined according to the device distinguishing code.
S102: after receiving a connection request sent by a server, generating a target controller identifier with a high N bit as a device distinguishing code;
the server may send a connection request to a plurality of storage devices in the cluster, and after receiving the connection request sent by the server, the storage devices may create a controller and assign a corresponding controller identifier to the controller. In order to avoid that controllers created by different storage devices have the same controller identifier, the present embodiment sets the upper N bits of the controller identifier as the device distinguishing code, i.e., generates the upper N bits as the target controller identifier of the device distinguishing code. Since the high-order N bits of the controller identifiers allocated to the controllers by the storage devices are different, the storage devices can be prevented from generating the controller identifiers allocated to the same.
As a possible implementation manner, after determining that the target controller identifier is N bits higher, the storage device may set the remaining bits of the target controller identifier according to a preset rule, for example, the remaining bits of the target controller identifier may be sequentially set in a sequence from beat to beat, as long as it is ensured that the storage device itself is not allocated with the same controller identifier.
S103: and creating a controller of the target controller identification, and establishing connection with the server by using the controller.
In this step, a corresponding controller may be created in the storage device, and the target controller identifier determined in S102 is assigned to the controller, so that the controller is used to establish a connection with the server and process a command sent by the server. After the connection with the server is established by using the controller, the server may perform data transmission with the storage devices in the cluster through an NVMe (Non-Volatile Memory express) protocol.
The embodiment is applied to storage devices in a cluster, and the device distinguishing codes of the storage devices are determined according to the number of the storage devices in the cluster, so that the device distinguishing codes of all the storage devices in the cluster are different. After receiving the connection request sent by the server, the embodiment generates the target controller identifier with the high N bits as the device distinguishing code, that is, the high N bits of the controller identifiers of all the storage devices in the cluster are different, which can avoid the situation that different storage devices generate the same controller identifier. After determining the unique target controller identifier in the cluster, the embodiment may generate and create a corresponding controller, so as to establish a connection with the server using the controller. In this embodiment, a manner of generating the controller identifier based on the device distinguishing code may ensure that the allocation of the controller identifier does not conflict without negotiation with other storage devices in the cluster. Therefore, the controller identification can be reasonably distributed in the embodiment, the connection confusion of the server and the storage device is avoided, and the cluster reliability is improved.
As a possible implementation manner, the process of generating, by S102 in the embodiment corresponding to fig. 1, the target controller identifier with the upper N bits as the device distinguishing code may include the following steps: determining a controller distinguishing code of M bits according to the low M bits of the distributed controller identifiers in the storage device, so that the controller distinguishing code is different from the low M bits of all the controller identifiers in the storage device; generating a target controller identifier with the high N bits as the equipment distinguishing codes and the low M bits as the controller distinguishing codes; wherein the target controller identification is a value of N + M bits.
As a possible implementation manner, before determining the N-bit device distinguishing code according to the number of the storage devices, preset formula 2 may be used N-1 <A≤2 N Determining a value of the number of bits N of the device discrimination code; wherein A is the number of storage devices.
In this embodiment, a target controller identifier with a high N bits as the device distinguishing code may be generated according to a preset rule; the preset rule is that the value of the target controller identifier is positively correlated with the connection request receiving times. The target controller identification generation process described in the above embodiment is exemplified:
for example, there are 4 storage devices A, B, C, D in the cluster, and a 16-bit binary target controller identifier needs to be allocated, and the device distinguishing codes of the storage device A, B, C, D are: 00. 01, 10, 11. The controller distinguishing code generated by the storage device is 000000 0000 0000, 000000 00000001, 000000 0000 0010, 000000 0000 0011, … … and 11 1111 1111 1111 1111 in sequence.
The target controller identifier allocated by the storage device a is as follows in sequence:
0000 0000 0000 0000;
0000 0000 0000 0001;
0000 0000 0000 0010;
0000 0000 0000 0011;
……
0011 1111 1111 1111。
the target controller identifiers allocated by the storage device B are respectively:
0100 0000 0000 0000;
0100 0000 0000 0001;
0100 0000 0000 0010;
0100 0000 0000 0011;
……
0111 1111 1111 1111。
the storage device C target controller identifiers are respectively:
1000 0000 0000 0000;
1000 0000 0000 0001;
1000 0000 0000 0010;
1000 0000 0000 0011;
……
1011 1111 1111 1111。
the storage device D is assigned controller IDs of
1100 0000 0000 0000;
1100 0000 0000 0001;
1100 0000 0000 0010;
1100 0000 0000 0011;
……
1111 1111 1111 1111。
As a further introduction to the corresponding embodiment in fig. 1, after the controller is used to establish a connection with the server, it may also be determined whether there are controllers of other storage devices in the cluster that establish connections with the server; if yes, starting the asymmetric name space access function. The Asymmetric Namespace Access function (ANA) functions are: a block of memory space is provided in the memory device, which memory space can be accessed by a plurality of links simultaneously, but the accessibility or properties of the access links are different.
As a further introduction to the corresponding embodiment in fig. 1, before acquiring the number of storage devices in the cluster, the cluster may further start a cluster communication function, so that the storage devices in the cluster perform information interaction based on the cluster communication function. Because the cluster needs to be established by using a plurality of physical storage devices and is presented as one virtual device, the above process needs information communication and negotiation between the physical storage devices, and the cluster communication function is used for managing the information communication. The storage devices in the cluster may determine a number of storage devices based on the cluster communication function.
The flow described in the above embodiment is explained by an embodiment in practical use as follows. The embodiment provides a method for realizing front-end NVMe over Fabrics in a high-reliability storage product, which realizes that a plurality of storage devices in a cluster externally present the same NVM subsystem, and solves the problem of conflict of controller identifier allocation when a plurality of physical devices dynamically create a controller, and the specific process is as follows:
step 1: implementing a cluster management module in a storage device; the cluster management module comprises a module for realizing the cluster communication function.
Step 2: the NVM subsystem module is realized in the storage device, and is initialized when the system is started, and the same NQN value is used.
Wherein, the NQN (NVMe Qualified Name) is from NVMe specification, and the NQN attribute in NVM subsystem needs to be assigned when initializing, for example, the NQN value may be: nqn.2014-08.Com. Example.
And step 3: a controller dynamic creation module is implemented in the storage device, including controller resource allocation, and controller identification allocation.
And 4, step 4: and (4) realizing the ANA function according to the NVMe protocol requirement.
And 5: after multiple physical devices in the cluster are started, each physical device has a copy of the NVM subsystem.
Step 6: and the server side initiates connection with the NVM subsystem in the storage device.
And 7: because the connection initiation is based on the front-end connection path, only one physical storage device on the path receives the connection request when initiating one connection, the storage device receiving the request dynamically creates a controller, and the allocation strategy of the controller identifier is as follows: a. firstly, planning the maximum scale of the number of storage devices in a cluster; b. and performing logic segmentation on the agreed 16-bit controller identification in the NVMe protocol, and determining the number of bit bits to be segmented according to the quantity scale of the storage equipment in the cluster. For example, the maximum support of 8 storage devices in the cluster is only needed to be cut out 3 bits from the high bits; c. after the segmentation, the high bits are assigned to the number of the physical storage device in the cluster (i.e. the device distinguishing code mentioned above), and the low bits are assigned to 0,1,2,3, etc. (i.e. the controller distinguishing code mentioned above) in sequence according to the several controllers in the physical storage device. The controller ID assigned by the above policy is still a 16-bit value used at the server side.
And step 8: after dynamically creating the controllers on the storage device, synchronizing information in the cluster, determining whether a plurality of controllers establish connection with the server under the NVM subsystem, and if so, starting an ANA function on the storage device.
In the embodiment, the NVM subsystem is uniformly presented to the outside by multiple storage devices in the cluster, and the bit of the controller identifier is logically split, so that each physical device can rapidly and dynamically allocate the controller identifier, and the dynamically allocated controller identifier is guaranteed not to conflict without communicating and negotiating with other physical storage devices in the cluster.
In the above embodiment, a plurality of physical storage devices in the cluster are connected to the server by using the NVMe over Fabrics, and the connection between the storage devices and the server mainly includes that the storage devices have a cluster function, and the NVMe over Fabrics protocol is used. All physical storage devices in the cluster externally present the same NVM subsystem, and the method mainly comprises that a plurality of connections are arranged between a plurality of physical storage devices in the cluster and a server, but the server is connected to the same NVM subsystem by using multiple paths from the perspective of the server. When a server initiates connection through a plurality of paths of radial NVM subsystems formed by a plurality of physical storage devices in a cluster, each physical storage device can rapidly distribute controller identifications without negotiation with other physical storage devices in the cluster, the method mainly comprises the steps of fully utilizing the controller identifications with 16 bits appointed in the NVMe protocol, dividing part of the bits of the controller identifications to assign logical numbers of the physical devices in the cluster, and sequentially increasing the numbers of the other bits from 0 to the back, so that all the controller identifications presented to the server under the NVM subsystems can not conflict.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a server connection system according to an embodiment of the present disclosure;
the system may include:
an apparatus distinct code determining module 100, configured to obtain the number of storage apparatuses in the cluster, and determine an N-bit apparatus distinct code according to the number of storage apparatuses, so that the apparatus distinct codes of each storage apparatus in the cluster are different;
an identifier determining module 200, configured to generate a target controller identifier with a high N bit as the device distinguishing code after receiving a connection request sent by a server;
a connection establishing module 300, configured to create a controller identified by the target controller, and establish a connection with the server by using the controller.
The embodiment is applied to storage devices in a cluster, and the device distinguishing codes of the storage devices are determined according to the number of the storage devices in the cluster, so that the device distinguishing codes of all the storage devices in the cluster are different. After receiving the connection request sent by the server, the embodiment generates the target controller identifier with the high N bits as the device distinguishing code, that is, the high N bits of the controller identifiers of all the storage devices in the cluster are different, which can avoid the situation that different storage devices generate the same controller identifier. After determining the unique target controller identifier in the cluster, the embodiment may generate and create a corresponding controller, so as to establish a connection with the server using the controller. In this embodiment, a manner of generating the controller identifier based on the device distinguishing code may ensure that the allocation of the controller identifier does not conflict without negotiation with other storage devices in the cluster. Therefore, the controller identification can be reasonably distributed in the embodiment, the connection confusion of the server and the storage device is avoided, and the cluster reliability is improved.
Further, the identification determination module 200 includes:
a low bit determining module, configured to determine a controller distinguishing code of M bits according to the low M bits of the controller identifier allocated in the storage device, so that the controller distinguishing code is different from the low M bits of all the controller identifiers in the storage device;
the identifier generation module is used for generating a target controller identifier with the high N bits as the equipment distinguishing codes and the low M bits as the controller distinguishing codes; wherein the target controller identification is a value of N + M bits.
Further, the method also comprises the following steps:
a value determining module for utilizing a preset formula 2 before determining the N-bit device distinguishing code according to the number of the storage devices N-1 <A≤2 N Determining a value of the number of bits N of the device discrimination code; wherein A is the number of storage devices.
Further, the method also comprises the following steps:
the judging module is used for judging whether the controllers of other storage devices in the cluster are connected with the server or not after the controller is used for establishing connection with the server; if yes, starting the asymmetric name space access function.
Further, the method also comprises the following steps:
and the data transmission module is used for carrying out data transmission between the server and the storage equipment in the cluster through an NVMe protocol after the controller is utilized to establish connection with the server.
Further, the identifier determining module 200 is specifically a module configured to generate, according to a preset rule, a target controller identifier with a high N bit as the device distinguishing code; the preset rule is that the value of the target controller identifier is positively correlated with the connection request receiving times.
Further, the method also comprises the following steps:
and the function starting module is used for starting the cluster communication function of the cluster before the number of the storage devices in the cluster is acquired, so that the storage devices in the cluster can perform information interaction based on the cluster communication function.
Since the embodiment of the system part and the embodiment of the method part correspond to each other, please refer to the description of the embodiment of the method part for the embodiment of the system part, and details are not repeated here.
The present application also provides a storage medium having a computer program stored thereon, which when executed, may implement the steps provided by the above-described embodiments. The storage medium may include: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, an optical disk, or other various media capable of storing program codes.
The application further provides an electronic device, which may include a memory and a processor, where the memory stores a computer program, and the processor may implement the steps provided by the foregoing embodiments when calling the computer program in the memory. Of course, the electronic device may also include various network interfaces, power supplies, and the like.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the system disclosed by the embodiment, the description is relatively simple because the system corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation 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 may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
Claims (9)
1. A server connection method is applied to storage devices in a cluster, and comprises the following steps:
acquiring the number of the storage devices in the cluster, and determining N-bit device distinguishing codes according to the number of the storage devices, so that the device distinguishing codes of each storage device in the cluster are different;
after receiving a connection request sent by a server, generating a target controller identifier with a high N bit as the equipment distinguishing code;
creating a controller of the target controller identifier, and establishing connection with the server by using the controller;
the generating of the target controller identifier with the high N bits as the device distinguishing code includes:
determining a controller distinguishing code of M bits according to the low M bits of the distributed controller identifiers in the storage device, so that the controller distinguishing code is different from the low M bits of all the controller identifiers in the storage device;
generating a target controller identifier with the upper N bits as the equipment distinguishing codes and the lower M bits as the controller distinguishing codes; wherein the target controller identification is a value of N + M bits.
2. The server connection method according to claim 1, further comprising, before determining an N-bit device distinguishment code according to the number of storage devices:
using a predetermined formula 2 N-1 <A≤2 N Determining a value of the number of bits N of the device discrimination code; wherein A is the number of storage devices.
3. The server connection method according to claim 1, further comprising, after establishing a connection with the server using the controller:
judging whether controllers of other storage devices exist in the cluster and establishing connection with the server;
if yes, starting the asymmetric name space access function.
4. The server connection method according to claim 1, further comprising, after establishing a connection with the server using the controller:
and the server performs data transmission with the storage equipment in the cluster through an NVMe protocol.
5. The server connection method according to claim 1, wherein generating the target controller identifier with the upper N bits as the device identification code comprises:
generating a target controller identifier with high N bits as the equipment distinguishing codes according to a preset rule; the preset rule is that the value of the target controller identifier is positively correlated with the connection request receiving times.
6. The server connection method according to any one of claims 1 to 5, further comprising, before obtaining the number of storage devices in the cluster:
and starting a cluster communication function of the cluster so that the storage equipment in the cluster can perform information interaction based on the cluster communication function.
7. A server connection system applied to a storage device in a cluster, the server connection system comprising:
the device distinguishing code determining module is used for acquiring the number of the storage devices in the cluster and determining N-bit device distinguishing codes according to the number of the storage devices so as to enable the device distinguishing codes of each storage device in the cluster to be different;
the identification determining module is used for generating a target controller identification with the high N bits as the equipment distinguishing codes after receiving a connection request sent by a server;
the connection establishing module is used for establishing a controller of the target controller identifier and establishing connection with the server by utilizing the controller;
wherein the identification determination module comprises:
a low bit determining module, configured to determine a controller distinguishing code of M bits according to the low M bits of the controller identifier allocated in the storage device, so that the controller distinguishing code is different from the low M bits of all the controller identifiers in the storage device;
the identifier generation module is used for generating a target controller identifier with the high N bits as the equipment distinguishing codes and the low M bits as the controller distinguishing codes; wherein the target controller identification is a value of N + M bits.
8. An electronic device, comprising a memory in which a computer program is stored and a processor, wherein the processor implements the steps of the server connection method according to any one of claims 1 to 6 when calling the computer program in the memory.
9. A storage medium having stored thereon computer-executable instructions which, when loaded and executed by a processor, carry out the steps of the server connection method according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011033764.2A CN112153149B (en) | 2020-09-27 | 2020-09-27 | Server connection method, system, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011033764.2A CN112153149B (en) | 2020-09-27 | 2020-09-27 | Server connection method, system, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112153149A CN112153149A (en) | 2020-12-29 |
CN112153149B true CN112153149B (en) | 2022-11-11 |
Family
ID=73895382
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011033764.2A Active CN112153149B (en) | 2020-09-27 | 2020-09-27 | Server connection method, system, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112153149B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105900068A (en) * | 2014-11-24 | 2016-08-24 | 华为技术有限公司 | Path management system, device and method |
CN106331994A (en) * | 2015-06-23 | 2017-01-11 | 阿里巴巴集团控股有限公司 | Communication group joining method and device, communication group creation method and device |
WO2017066910A1 (en) * | 2015-10-19 | 2017-04-27 | 华为技术有限公司 | Method, device and system for determining control policy |
CN107819828A (en) * | 2017-10-16 | 2018-03-20 | 平安科技(深圳)有限公司 | Data transmission method, device, computer equipment and storage medium |
WO2019021048A1 (en) * | 2017-07-24 | 2019-01-31 | Yogesh Chunilal Rathod | Ephemeral content sharing and connecting users based on sharing unique link from 3r parties' applications and storing and relating unique identity or code of link sharing user with link accessing user |
CN110515563A (en) * | 2019-08-29 | 2019-11-29 | 北京浪潮数据技术有限公司 | A kind of storage pool management method, system, equipment and computer readable storage medium |
CN110896408A (en) * | 2018-09-13 | 2020-03-20 | 华为技术有限公司 | Data processing method and server cluster |
-
2020
- 2020-09-27 CN CN202011033764.2A patent/CN112153149B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105900068A (en) * | 2014-11-24 | 2016-08-24 | 华为技术有限公司 | Path management system, device and method |
CN106331994A (en) * | 2015-06-23 | 2017-01-11 | 阿里巴巴集团控股有限公司 | Communication group joining method and device, communication group creation method and device |
WO2017066910A1 (en) * | 2015-10-19 | 2017-04-27 | 华为技术有限公司 | Method, device and system for determining control policy |
WO2019021048A1 (en) * | 2017-07-24 | 2019-01-31 | Yogesh Chunilal Rathod | Ephemeral content sharing and connecting users based on sharing unique link from 3r parties' applications and storing and relating unique identity or code of link sharing user with link accessing user |
CN107819828A (en) * | 2017-10-16 | 2018-03-20 | 平安科技(深圳)有限公司 | Data transmission method, device, computer equipment and storage medium |
CN110896408A (en) * | 2018-09-13 | 2020-03-20 | 华为技术有限公司 | Data processing method and server cluster |
CN110515563A (en) * | 2019-08-29 | 2019-11-29 | 北京浪潮数据技术有限公司 | A kind of storage pool management method, system, equipment and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN112153149A (en) | 2020-12-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20220272242A1 (en) | Cluster resource management in distributed computing systems | |
US10901636B2 (en) | Target optimized auto provisioning of storage in a discoverable storage network | |
TWI672028B (en) | Fabric box, method and system for allocating system resources | |
US7478177B2 (en) | System and method for automatic reassignment of shared storage on blade replacement | |
CN108924268B (en) | Container cloud service system and pod creation method and device | |
US9866450B2 (en) | Methods and apparatus related to management of unit-based virtual resources within a data center environment | |
TWI224440B (en) | System and method for managing storage resources in a clustered computing environment | |
US8495255B2 (en) | Discovery and configuration of device configurations | |
US20080162735A1 (en) | Methods and systems for prioritizing input/outputs to storage devices | |
EP3470984B1 (en) | Method, device, and system for managing disk lock | |
CN102123176B (en) | Space distribution and management method and device for network storage system | |
JP2010182302A (en) | Method and apparatus for efficiently removing data duplication by metadata grouping | |
JP2007520814A (en) | Method, system, and program for identifying, reserving, and logically provisioning resources in a provisioning data processing system | |
JP2014532946A (en) | Method, computer program, and device for allocating computer resources of said cluster to perform tasks requested of the cluster | |
JP2008541213A (en) | Autonomous storage provisioning to improve the availability of storage virtualization infrastructure [i1] | |
JP5734415B2 (en) | Multi-level port extension for port multiplier | |
US10579287B2 (en) | Sharing alias addresses among logical devices | |
CN105468300A (en) | IP hard disc management method and device | |
US20190303015A1 (en) | Sharing alias addresses among logical devices | |
CN111163186B (en) | ID generation method, device, equipment and storage medium | |
US8725979B1 (en) | Efficient methods and systems for allocating storage volumes | |
US10459768B2 (en) | Computer system, management system, and resource management method | |
CN112153149B (en) | Server connection method, system, electronic equipment and storage medium | |
CN113055448A (en) | Metadata management method and device | |
CN108696557B (en) | Information processing system, method and device |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |