Storage device and control method of server, storage medium and electronic device

By dividing storage devices into hierarchical expanders and dynamically changing storage control permissions, the problem of low flexibility in server storage resource access is solved, enabling flexible scheduling and on-demand authorization of storage resources, and improving resource utilization efficiency.

CN121833583APending Publication Date: 2026-04-10XIAMEN YUANCHOU INTELLIGENT COMPUTING TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XIAMEN YUANCHOU INTELLIGENT COMPUTING TECHNOLOGY CO LTD
Filing Date
2025-12-30
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

In existing technologies, servers have low flexibility in accessing storage resources in storage devices, making it impossible to achieve flexible scheduling and on-demand allocation of resources, resulting in resource waste and an inability to adapt to dynamic business load demands.

Method used

By dividing the extenders in the server's storage devices into multiple levels and detecting permission information in the target extender at the highest level, the control permissions of the storage are dynamically changed, a unified switching network is built, and flexible access to storage resources is achieved.

Benefits of technology

It enables dynamic scheduling and on-demand authorization of storage resources, improves the flexibility of the server in calling storage resources in storage devices, and ensures the uniqueness and accuracy of the dynamic scheduling process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121833583A_ABST
    Figure CN121833583A_ABST
Patent Text Reader

Abstract

The invention discloses storage equipment of a server, a control method, a storage medium and electronic equipment, and relates to the technical field of computers, the storage equipment comprises a plurality of expanders and a plurality of storages, the plurality of expanders are divided into a plurality of hierarchies, the expander at the upper hierarchy is connected with the expander at the lower hierarchy in the plurality of hierarchies, and the expanders at the upper hierarchy are connected with the storages in the plurality of hierarchies. The target expander at the highest level is allowed to be connected with the plurality of servers, each memory is connected with one of the plurality of reference expanders at the lowest level, and the target expander is set to detect authority information of a received control request; each reference extender is set to check a control request according to the control authority currently corresponding to the connected memory under the condition that the control request is received; and under the condition that the verification is passed, the control request is transmitted to the connected memory, so that the technical problems that the calling flexibility of the server to the storage resources in the storage equipment is relatively low and the like are solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the computer field, in particular, to a storage device and control method of a server, a storage medium and an electronic device. BACKGROUND

[0002] In current data center and enterprise-level storage applications, high-density storage servers (such as JBOD, Just a Bunch of Disks) are commonly used technical means to achieve large-scale storage expansion. In order to improve the utilization rate of resources, it is usually necessary to connect a JBOD device (storage device) to multiple host servers at the same time. In the prior art, the main way to realize multi-host access to the SATA hard disk array of the storage device is physical isolation or the use of multiple independent storage expanders. The physical isolation scheme divides the hard disk array in the JBOD into several fixed hard disk groups through backplane jumpers or different physical cables, and each hard disk group is fixedly allocated to a host. The scheme using independent expanders is that each expander manages a part of hard disks and is independently connected to a specified host, which is essentially still a partition isolation at the hardware level.

[0003] However, the above prior art scheme has obvious technical problems. The core defect is that the access mode is rigid and cannot realize flexible scheduling and on-demand allocation of resources. Since the correspondence between the hard disk and the host is locked at the physical layer or the fixed hardware configuration layer, when a host is short of storage space and another host has a large amount of idle storage resources, the idle hard disk resources cannot be dynamically allocated to the host in need. This fixed partition mode causes serious waste of resources and cannot adapt to the dynamically changing business load demand in the modern cloud computing environment.

[0004] For the technical problems such as low flexibility of server calling storage resources in the storage device in the related art, no effective solutions have been proposed. SUMMARY

[0005] Embodiments of the present application provide a storage device and control method of a server, a storage medium and an electronic device to at least solve the technical problems such as low flexibility of server calling storage resources in the storage device in the related art.

[0006] According to one of the embodiments of the present application, a storage device of a server is provided, comprising: a plurality of extenders and a plurality of memories, the plurality of extenders are divided into a plurality of levels, the extenders in a previous level and the extenders in a next level are connected to each other in the plurality of levels, a target extender in a highest level is allowed to be connected to a plurality of servers, each of the memories is connected to a reference extender in a lowest level, wherein the target extender is configured to detect authority information of a received control request, the control request is used to indicate that a target server requests to control a target memory, the authority information is used to indicate a control authority of the target server on the target memory; according to the authority information, a candidate extender connected to the target memory in the plurality of reference extenders is controlled to change the control authority of the target memory to the target server; and the control request is transmitted to the candidate extender.

[0007] Each of the reference extenders is configured to, in a case where the control request is received, verify the control request according to a current corresponding control authority of the connected memory; in a case where the verification is passed, the control request is transmitted to the connected memory.

[0008] According to one of the embodiments of the present application, a control method of a storage device is provided, applied to a target extender in a highest level in a plurality of extenders of the storage device, comprising:

[0009] Detecting authority information of a received control request, the control request is used to indicate that a target server requests to control a target memory in a plurality of memories of the storage device, the authority information is used to indicate a control authority of the target server on the target memory, the target extender is allowed to be connected to a plurality of servers;

[0010] According to the authority information, a candidate extender connected to the target memory in a plurality of reference extenders of the storage device is controlled to change the control authority of the target memory to the target server, wherein the plurality of extenders of the storage device are divided into a plurality of levels, the extenders in a previous level and the extenders in a next level are connected to each other in the plurality of levels, the reference extenders are the extenders in a lowest level in the plurality of levels, and each of the memories in the storage device is connected to a reference extender;

[0011] The control request is transmitted to the candidate extender, wherein the candidate extender is configured to, in a case where the control request is received, verify the control request according to a current corresponding control authority of the target memory; in a case where the verification is passed, the control request is transmitted to the target memory.

[0012] According to another embodiment of the present application, a control device for a storage device is also provided, applied to a target expander at the highest level among a plurality of expanders of the storage device, comprising:

[0013] The detection module is used to detect the permission information of the received control request, wherein the control request is used to instruct the target server to request control of the target memory among the multiple memories of the storage device, the permission information is used to instruct the target server to have control permissions over the target memory, and the target extender allows connection to multiple servers;

[0014] A change module is used to control a candidate extender connected to the target memory among multiple reference extenders of the storage device to change the control permission of the target memory to the target server according to the permission information. The multiple extenders of the storage device are divided into multiple levels, and the extender at the upper level of the multiple levels is interconnected with the extender at the lower level. The reference extender is the extender at the lowest level among the multiple levels, and each memory in the storage device is connected to one reference extender.

[0015] A transmission module is configured to transmit the control request to the candidate extender, wherein the candidate extender is configured to, upon receiving the control request, verify the control request according to the control permissions currently corresponding to the target memory; and if the verification passes, transmit the control request to the target memory.

[0016] This application also provides an electronic device, including: a memory for storing a computer program; and a processor for implementing the control method of any of the above-described memory devices when executing the computer program.

[0017] This application also provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, it implements the steps of the control method of any of the above-described storage devices.

[0018] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the control method for any of the above-described storage devices.

[0019] This application provides a server storage device, comprising: multiple expanders and multiple memories. The multiple expanders are divided into multiple levels, with expanders at higher levels interconnected with expanders at lower levels. A target expander at the highest level is allowed to connect to multiple servers. Each memory is connected to one of a plurality of reference expanders at the lowest level. The target expander is configured to detect permission information in a received control request, wherein the control request instructs a target server to request control of a target memory, and the permission information indicates the target server's control permissions over the target memory. Based on the permission information, the target expander controls a candidate expander connected to the target memory to transfer control permissions of the target memory to the target server; the control request is transmitted to the candidate expander. Each reference expander is configured to, upon receiving a control request, verify the control request based on the current control permissions corresponding to the connected memory; and if the verification passes, transmit the control request to the connected memory. Physically, this server storage device constructs a unified switching network by dividing multiple expanders into multiple levels and interconnecting the expanders at higher levels with those at lower levels. In this network, the highest-level target extender can connect to multiple servers, while each memory connects to one of multiple reference extenders at the lowest level. This structure itself breaks the fixed physical binding between servers and memory, providing the necessary foundational platform for flexible invocation. Based on this, when a target server intends to control a target memory, the target extender at the top of the architecture is not merely a request transmitter. Its core role is to first detect the permission information of the received control request, and then proactively, based on this permission information, control the candidate extenders connected to the target memory to transfer control of the target memory to the target server. It is this act of "changing" control permissions that transforms static resource ownership into dynamic, on-demand authorization, which is key to improving invocation flexibility. After the control permissions are dynamically changed, the target extender transmits the control request to the candidate extenders. At this point, each reference extender at the bottom of the architecture acts as an execution supervisor. It is configured to verify the control request based on the current control permissions corresponding to the connected memory upon receiving it. Only if the verification passes will the instruction be ultimately transmitted to the connected memory. This verification step ensures that at any given time, a memory only responds to requests from its legitimate controller, guaranteeing the uniqueness and accuracy of the dynamic scheduling process. Therefore, it solves the technical problem of low flexibility in server access to storage resources in storage devices, thereby improving the flexibility of server access to storage resources. Attached Figure Description

[0020] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a schematic diagram of a server storage device according to an embodiment of this application;

[0022] Figure 2 This is a schematic diagram of a target port identifier and a candidate port identifier in a server's storage device according to an embodiment of this application;

[0023] Figure 3 This is a schematic diagram of a controller in a server's storage device according to an embodiment of this application;

[0024] Figure 4 This is a schematic diagram of the port identifier of an intermediate extender of a server's storage device according to an embodiment of this application;

[0025] Figure 5 This is a hardware structure block diagram of a computer device for a method of controlling a storage device according to an embodiment of this application;

[0026] Figure 6 This is a flowchart of a control method for a storage device according to an embodiment of this application;

[0027] Figure 7 This is a schematic diagram of the structure of a storage device according to an embodiment of this application;

[0028] Figure 8 This is a structural block diagram of a control device for a storage device according to an embodiment of this application;

[0029] Figure 9 This is a schematic diagram of an electronic device according to an embodiment of this application. Detailed Implementation

[0030] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

[0031] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0032] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0033] The terms used in the embodiments of this application are explained as follows:

[0034] SATA: A hard drive interface standard. In the context of this technical solution, its key characteristic is that a SATA hard drive has only one port that can be accessed externally.

[0035] JBOD (Just a Bunch of Disks): A type of storage hard drive pooling product. It contains only storage units (hard drives) and does not include motherboard computing units such as CPU and memory. It connects to a host server via external cables to achieve storage expansion.

[0036] An expander module, also known as an extender, is a hardware module added between the host and the hard drive. Its upstream port connects to one or more hosts, and its downstream port connects to multiple hard drives. By configuring its port ID, hard drives can be dynamically assigned to different hosts.

[0037] Port ID: An identifier assigned to the upstream and downstream ports of the expansion module. In this scheme, modifying the downstream port ID via command changes the logical connection between the hard drive and the host, thereby determining which host has access to a specific hard drive. This ID setting is also known as "zone setting" or "partition setting".

[0038] Cascading: Refers to the connection method between expansion modules. For example, multiple expansion modules at the same level can be connected to another expansion module at a higher level simultaneously, forming a multi-level link architecture.

[0039] This application proposes a control method for a storage device. Before describing the optional embodiments of this application, in order to better understand the inventive concept and the originality of this solution, related technologies will first be explained:

[0040] With the development of cloud computing technology, the demand for storage servers is increasing, and hard drive density is also rising, leading to the emergence of high-density storage servers, namely JBODs. JBODs only retain the hard drive portion and connect to the host via external cables to meet the server's storage expansion needs. In practical applications, it is common to see multiple servers connected to a single JBOD.

[0041] Currently, there are two main technical solutions for multiple hosts accessing a single JBOD: The first solution involves not setting up expansion modules within the JBOD. Each host connects to its required set of hard drives via a fixed physical cable, with physical isolation between hosts and their respective connected hard drive groups. The drawback of this solution is that each host can only access the hard drives it is physically connected to and cannot access other hard drive modules within the JBOD, resulting in poor scalability and inflexibility.

[0042] The second approach involves setting up multiple expansion modules within the JBOD, but each expansion module only connects to a portion of the hard drives, and the modules are independent of each other. Each host connects directly to one or more independent expansion modules, which similarly prevents the host from accessing its unconnected expansion modules and the hard drives they manage. While this approach increases the number of hard drives, it is essentially still physically isolated, and thus suffers from inflexibility and poor scalability.

[0043] In summary, the core problem with existing technologies is that the correspondence between servers and hard drives is static and fixed, whether through physical cables or independent expansion modules. This design significantly limits the scalability of JBODs, preventing multiple servers from flexibly accessing all hard drive resources within the JBOD, resulting in rigid resource scheduling and potential waste.

[0044] This embodiment provides a server storage device. Figure 1 This is a schematic diagram of a server storage device according to an embodiment of this application, such as... Figure 1As shown, the server's storage device includes multiple extenders (extenders 1-5) and multiple memories (memories 1-4). The multiple extenders are divided into multiple levels, with each extender at a higher level interconnected with the next higher level. The target extender (extender 5) at the highest level is allowed to connect to multiple servers (hosts 1-2). Each memory is connected to one of the reference extenders (extenders 1-4) at the lowest level. The target extender is configured to detect permission information in a received control request, where the control request instructs the target server (host 1) to request control of the target memory (memory 3), and the permission information instructs the target server to grant control permissions to the target memory. Based on the permission information, the target extender controls a candidate extender (extender 3) connected to the target memory among the multiple reference extenders to transfer control permissions of the target memory to the target server. The control request is then transmitted to the candidate extender.

[0045] Each of the reference extenders is configured to, upon receiving the control request, verify the control request according to the control permissions currently corresponding to the connected memory; and if the verification passes, transmit the control request to the connected memory.

[0046] Optionally, in this embodiment, the server's storage device may be, but is not limited to, a JBOD. Multiple expanders of the storage device are divided into multiple levels, and can be cascaded to form a multi-level (one column per level) hardware architecture. Figure 1 In the example, this is specifically manifested as a two-level structure: "Expander 5" is the first level (i.e., the "highest level"), and "Expanders 1, 2, 3, 4" are the second level (i.e., the "lowest level").

[0047] Optionally, in this embodiment, the highest-level target expander refers to... Figure 1 The "Expander 5" in the text allows connecting "two hosts (servers)" (i.e., "multiple servers"). The lowest level of multiple reference expanders refers to "Expanders 1, 2, 3, 4", where each expander can be connected to multiple storage devices, such as 10 SATA hard drives (i.e., "multiple storage devices").

[0048] As an optional embodiment, each of the plurality of memories includes an uplink port and a downlink port, the target extender includes a plurality of uplink ports, each uplink port of the target extender is configured to connect to one of the servers, and the reference extender includes a plurality of downlink ports, each downlink port of the reference extender is configured to connect to one of the memories, wherein the target extender is configured to acquire the target port identifier of the target uplink port connected to the target server in the target extender, and the candidate port identifier of the candidate downlink port connected to the target memory in the candidate extender; and to detect the permission information of the control request based on the target port identifier and the candidate port identifier.

[0049] Optionally, in this embodiment, access permissions are detected and controlled by comparing the identifiers (IDs) of the server port and the storage port. Figure 2 This is a schematic diagram of a target port identifier and a candidate port identifier in a server's storage device according to an embodiment of this application, as shown below. Figure 2 The following example illustrates the scenario of "two hosts, two levels, and five extenders":

[0050] The scenario is set as follows:

[0051] Target expander: "Expander 5" for the first level;

[0052] Servers: "Host 1" and "Host 2";

[0053] Reference expanders: for the second level, "Expanders 1, 2, 3, 4";

[0054] Storage: SATA hard drives connected to each secondary expander.

[0055] Upstream and downstream ports: "Expander 5" (target expander) has two upstream ports, which are connected to host 1 and host 2 respectively. "Expanders 1, 2, 3, 4" (reference expanders) each have multiple downstream ports, and each downstream port is connected to a storage device (e.g., a SATA hard drive).

[0056] Example of permission detection:

[0057] 1. Set port identifier:

[0058] The uplink port on “Extender 5” connected to host 1 is configured with a target port identifier, set to ID8;

[0059] The upstream port on Extender 5 that connects to Host 2 is configured with a target port identifier, set to ID9.

[0060] In the initial state, all downstream ports of "Extender 1" and "Extender 2" are configured with candidate port identifier ID8, which means that the hard drives under them are initially assigned to host 1.

[0061] In the initial state, all downstream ports of "Extender 3" and "Extender 4" are configured with candidate port identifier ID9, which means that the hard drives under them are initially assigned to host 2.

[0062] 2. Permission verification process:

[0063] Scenario 1: Accessing authorized memory:

[0064] When "Host 1" (target server) issues a control request to access a hard drive (target storage) under "Extender 1", the system obtains the target port identifier for connecting to Host 1 as ID8. The system also obtains the candidate port identifier for connecting to the target hard drive (i.e., the downstream port ID of Extender 1) as ID8. At this point, a permission check is performed, comparing the target port identifier and the candidate port identifier. Because ID8 is equal to ID8, the permission check passes. Therefore, Host 1 can successfully access the hard drive (storage).

[0065] Scenario 2: Accessing unauthorized memory:

[0066] If Host 1 (the target server) issues a control request attempting to access a hard drive (target storage) under Extender 3, the system will still obtain the target port identifier of Host 1 as ID8. However, the system will obtain the candidate port identifier of the target hard drive (i.e., the downstream port ID of Extender 3) as ID9. During permission checks, because ID8 and ID9 are not equal, the check will fail. Therefore, Host 1's access request will be denied, thus ensuring the data security of Host 2.

[0067] This example demonstrates how this approach concretizes the abstract concept of "permission information detection" into a comparison of the target port identifier and candidate port identifiers. This comparison mechanism clearly defines the access scope of each server at any given time and provides a foundation for subsequent dynamic permission changes via command-line modification of candidate port identifiers.

[0068] As an optional approach, the target extender is configured to detect the permission information of the control request based on the target port identifier and the candidate port identifier through the following steps:

[0069] Detect whether there is a pairing relationship between the target uplink port and the candidate downlink port based on the target port identifier and the candidate port identifier;

[0070] If the pairing relationship is detected between the target uplink port and the candidate downlink port, the permission information is determined to indicate that the target server has control permission over the target memory;

[0071] If it is detected that there is no pairing relationship between the target uplink port and the candidate downlink port, the permission information is determined to indicate that the target server does not have control permissions over the target memory.

[0072] Optionally, in this embodiment, the core of this scheme is to explicitly define the permission detection process as determining whether a "pairing relationship" exists between two ports. This pairing relationship is specifically implemented as matching port ID numbers. Continuing with... Figure 2 Taking the scenario as an example, the target uplink port connected to host 1 is identified as ID8. The target uplink port connected to host 2 is identified as ID9. Initially, the candidate downlink port connected to the memory under "extender 3" is identified as ID9. Now, the permission information detection process will be explained through two specific steps:

[0073] 1. Detect whether a pairing relationship exists:

[0074] Scenario 1: Host 1 requests access to the storage under Extender 3:

[0075] The system checks whether there is a pairing relationship between the target port identifier ID8 (from host 1) and the candidate port identifier ID9 (from the downlink port of extender 3). Because ID8 and ID9 are different, the system determines that there is no pairing relationship between them.

[0076] Scenario 2: Host 2 requests access to the storage under Extender 3:

[0077] The system will check whether there is a pairing relationship between the target port identifier ID9 (from host 2) and the candidate port identifier ID9 (from the downlink port of extender 3). Since ID9 is the same as ID9, the system determines that there is a pairing relationship between them.

[0078] 2. Determine control permissions based on test results:

[0079] The result corresponding to Scenario 1: Since the system detects that there is no pairing relationship between the target uplink port and the candidate downlink port, the system determines that the permission information is used to indicate that the target server (host 1) does not have control permissions over the target memory (the memory under extender 3). Therefore, access to host 1 is denied.

[0080] The result for scenario two: Since the system detects the pairing relationship between the target uplink port and the candidate downlink port, it determines that the permission information is used to instruct the target server (host 2) to have control permissions over the target memory (memory under extender 3). Therefore, access by host 2 is permitted.

[0081] This example clearly demonstrates that abstract permission detection is broken down into two steps: "detecting pairing relationships" and "determining permissions based on relationships." In a specific implementation, "pairing relationship" is simply a direct match of port IDs. This design makes the permission control logic very clear and reliable.

[0082] As an optional solution, the target extender is configured to detect whether there is a pairing relationship between the target uplink port and the candidate downlink port based on the target port identifier and the candidate port identifier through the following steps:

[0083] Detect whether the target port identifier and the candidate port identifier are consistent;

[0084] If the target port identifier and the candidate port identifier are the same, it is determined that there is a pairing relationship between the target uplink port and the candidate downlink port;

[0085] If the target port identifier and the candidate port identifier are inconsistent, it is determined that there is no pairing relationship between the target uplink port and the candidate downlink port.

[0086] Optionally, in this embodiment, the detection method for "pairing relationship" is defined as the most direct identifier comparison. This is precisely the core logic of its software design, namely, determining whether the port ID numbers are "the same". Continuing with... Figure 2 Taking the scenario in the example, the target port of host 1 is identified as ID8. The candidate downstream port of the memory connection under "extender 3" is initially identified as ID9.

[0087] The detection of "pairing relationships" will now be explained through the following specific steps:

[0088] 1. Check if the port identifiers are consistent:

[0089] Scenario: Host 1 requests access to the memory under Extender 3. The first step executed by the system is: "Check whether the target port identifier and the candidate port identifier are consistent." Specifically, this involves comparing ID8 of Host 1 and ID9 of Extender 3. The comparison result is that they are inconsistent.

[0090] 2. Determine the pairing relationship based on the consistency results:

[0091] The result of the above scenario is as follows: Since the detection results are inconsistent, the system will proceed to the next step: "If the target port identifier and the candidate port identifier are inconsistent, it is determined that there is no pairing relationship between the target uplink port and the candidate downlink port." Because there is no pairing relationship, host 1 ultimately does not have control over the memory, and access is blocked.

[0092] Conversely, if host 2 (whose target port identifier is ID9) requests access to the same memory, the system will check whether the ID9 of host 2 and the ID9 of extender 3 are consistent. If they are consistent, the system will determine: "If the target port identifier and the candidate port identifier are consistent, it is determined that the target uplink port and the candidate downlink port have the pairing relationship." Because the pairing relationship exists, host 2 has control privileges, and access is permitted.

[0093] This example clearly demonstrates that the complex permission checks in this scheme are simplified into a single fundamental logical operation: determining whether two port IDs are equal. This ensures that the design principle of "only accessing the memory connected to this same port ID" is implemented in a simple, efficient, and reliable manner.

[0094] As an optional embodiment, each of the plurality of memories includes an uplink port and a downlink port. The target extender includes a plurality of uplink ports, each of which is configured to connect to one of the servers. The reference extender includes a plurality of downlink ports, each of which is configured to connect to one of the memories. The target extender is further configured to, when the permission information indicates that the target server does not have control over the target memory, obtain the port address of a candidate downlink port connected to the target memory from among the candidate extenders; and send target permission information carrying the port address to the target server, wherein the target permission information indicates that the target server does not have control over the memory connected to the candidate downlink port. The target server is configured to, upon receiving the target permission information, send a permission change instruction carrying the port address to the candidate extender, wherein the permission change instruction controls the candidate extender to change the control over the memory connected to the downlink port indicated by the port address to the target server.

[0095] Optionally, this embodiment describes in detail the entire process of how a server, lacking control permissions, proactively initiates a request and ultimately gains control of the target storage, continuing with... Figure 2 Taking the scene in the example, the scene setting is as follows:

[0096] Target server: Host 1.

[0097] Target storage: Storage (such as a SATA hard drive) initially controlled by host 2 under “expander 3”.

[0098] Target expander: Level 1 "Expander 5".

[0099] Candidate expander: "Expander 3" at the second level.

[0100] Initial state: Host 1's permission ID is ID8, while Extender 3's downlink port ID is ID9. Therefore, Host 1 does not have control over the target memory.

[0101] The following steps illustrate the specific process by which host 1 obtains control permissions:

[0102] 1. The target extender (extender 5) receives and sends information:

[0103] When host 1 fails to access the storage under extender 3, the system determines that it lacks sufficient permissions.

[0104] At this point, "Expander 5" (target expander) will execute its pre-defined program: First, it obtains the port address of the candidate downlink port connected to the target memory in "Expander 3" (candidate expander).

[0105] Then, "Extender 5" sends a target permission message to Host 1 (the target server). This message carries the port address that was just acquired and explicitly indicates that Host 1 currently does not have control permissions for the storage connected to that address. This is equivalent to telling Host 1: "The resource you want to access is located at this address, but you do not have permission right now."

[0106] 2. The target server (host 1) initiates a permission change command:

[0107] After receiving the target permission information carrying the port address, host 1 knows the specific target that needs to be operated on.

[0108] Therefore, host 1 is configured to send a permission change command directly to "extender 3" (candidate extender) based on this information. This command also carries the crucial port address.

[0109] 3. The candidate expander (expander 3) performs changes:

[0110] Extender 3 received a permission change command from host 1, which carried the port address.

[0111] The purpose of this instruction is to control "Expander 3" to change the ID of the downstream port indicated by this port address from ID9 to ID8. After the modification is completed, the control of the memory connected to this downstream port is successfully transferred to host 1.

[0112] This concrete example demonstrates how the scheme defines a closed-loop permission request and modification process. First, the upper-layer extender precisely notifies the lower-level server of the "no permission" status and target address. Then, based on this address, the server initiates a clear permission modification instruction to the upper-layer extender, ultimately achieving a dynamic, on-demand transfer of control.

[0113] As an optional embodiment, each of the plurality of memories includes an uplink port and a downlink port. The target extender includes a plurality of uplink ports, each of which is configured to connect to one of the servers. The reference extender includes a plurality of downlink ports, each of which is configured to connect to one of the memories. The target extender is further configured to, when the permission information indicates that the target server does not have control over the target memory, control the candidate extender to establish a pairing relationship between a candidate downlink port and a target uplink port to transfer control over the target memory to the target server. The candidate downlink port is the downlink port of the candidate extender connected to the target memory, and the target uplink port is the uplink port of the target extender connected to the target server.

[0114] Optionally, in this embodiment, a more centralized permission change control process is described, in which the top-level "target extender" directly leads and completes the permission change. Still using... Figure 2 For example, in the scenario described:

[0115] Scene setting:

[0116] Target server: Host 1.

[0117] Target memory: Initially controlled by host 2, the memory under "expander 3".

[0118] Target expander: Level 1 "Expander 5".

[0119] Candidate expander: "Expander 3" at the second level.

[0120] Initial state: "Host 1" is connected to the target uplink port on "Extender 5", with port ID 8. "Extender 3" is connected to the candidate downlink port of the target memory, with port ID 9. Due to the inconsistent port IDs, the initial permission information indicates that the target server (Host 1) does not have control permissions over the target memory.

[0121] Permission change process instructions:

[0122] 1. Triggering and Decision-Making: When host 1 sends a request to access the storage under extender 3, the request first reaches "extender 5" (target extender). "Extender 5" detects that the port identifier ID8 of host 1 does not match the identifier ID9 of the port where the target storage is located, and determines that its permissions are insufficient.

[0123] 2. Target Extender (Extender 5) Leads the Change: According to the settings of this scheme, "Extender 5" is set to actively initiate the change process at this time. It will directly control "Extender 3" (candidate extender), commanding it to build the pairing relationship between the candidate downlink port and the target uplink port.

[0124] 3. Establishing a Pairing Relationship: The specific implementation of "establishing a pairing relationship" is as follows: Modify the downlink port ID of "Extender 3" to match the uplink port ID of Host 1. Therefore, "Extender 3" will change the port identifier of its "candidate downlink port" from ID9 to ID8. After the modification, the identifier ID8 of the candidate downlink port and the identifier ID8 of the target uplink port are successfully paired.

[0125] 4. Complete the permission change: By establishing this pairing relationship, the final effect is to change the control permission of the target storage to the target server (host 1). Afterwards, when host 1 accesses the storage again, the permission check will pass because ID8 matches ID8.

[0126] Compared to the previous scheme, this scheme has a more centralized control logic. Permission changes no longer require secondary server intervention. Instead, the top-level "target extender" directly issues instructions to the bottom-level "candidate extenders" after determining that permissions are insufficient. The entire process may be transparent to the server, thus achieving a more automated and centralized control mode.

[0127] As an optional approach, the target extender is configured to acquire the target port identifier of the target uplink port; and control the candidate extender to adjust the candidate port identifier of the candidate downlink port to be consistent with the target port identifier, so as to establish a pairing relationship between the candidate downlink port and the target uplink port.

[0128] Optionally, in this embodiment, the process of "building a pairing relationship" is further broken down, and the specific actions required by the "target expander" are described in detail, still using... Figure 2 Taking the following scenario as an example: Initial state: Host 1 wants to access the storage under Extender 3, but lacks sufficient permissions. Target Extender: "Extender 5". Candidate Extender: "Extender 3". Target Uplink Port: The port on "Extender 5" that connects to Host 1. Candidate Downlink Port: The port on "Extender 3" that connects to the target storage.

[0129] According to this scheme, the target expander (expander 5) will establish the pairing relationship through the following two explicit steps:

[0130] Step 1: Obtain the target port identifier:

[0131] Extender 5 is initially set to obtain the target port identifier of the target uplink port. The system recognizes that the request originates from host 1 and obtains the ID of the target uplink port it is connected to, which is ID8. Therefore, the obtained target port identifier is ID8.

[0132] Step 2: Control the candidate extender to adjust the port identifier:

[0133] After obtaining the target ID: ID8, "Expander 5" will perform a second action: controlling the candidate expander (expander 3) to adjust the candidate port identifier of the candidate downlink port to match the target port identifier. Specifically, "Expander 5" sends an instruction to "Expander 3" requesting it to adjust the downlink port ID from the current ID9 to ID8. Upon receiving the instruction, "Expander 3" executes the adjustment operation.

[0134] Through the above two steps, the identifier of the candidate downlink port (adjusted ID8) is successfully made consistent with the identifier (ID8) of the target uplink port, thereby establishing a pairing relationship between the candidate downlink port and the target uplink port.

[0135] As an optional solution, the storage device further includes a controller connected to the plurality of expanders, wherein the controller is configured to configure port identifiers for the uplink and downlink ports on each expander according to the level at which each expander is located in the plurality of levels.

[0136] Optionally, in this embodiment, Figure 3 This is a schematic diagram of a controller in a server's storage device according to an embodiment of this application, as shown below. Figure 3As shown, the storage device comprises five expanders across two levels. In this scheme, a controller is introduced and connected to expanders 1, 2, 3, 4, and 5 respectively. This controller is configured to automatically configure its port ID based on the level in which each expander is located.

[0137] As an alternative, when the target extender at the highest level includes N uplink ports, and the N uplink ports are currently connected to M servers, the controller is configured to configure the multiple uplink ports with different port identifiers, where N is an integer greater than 1 and M is an integer greater than 1 and less than or equal to N.

[0138] Optionally, in this embodiment, a specific configuration rule is added to the "controller" described in the previous scheme, namely, how to handle the uplink port of the top-level extender. Figure 3 Taking the scenario in the example, let's apply the definitions of N and M: In Figure 3 In the example, "Expander 5" is the target expander at the highest level. This expander physically has N uplink ports, where N is an integer greater than 1. Currently, it connects "two hosts", so M=2. (M=2 satisfies the condition of being greater than 1 and less than or equal to N).

[0139] Example of controller configuration: According to this scheme, the controller is configured to configure these M connected uplink ports. The rule it follows is to configure the multiple uplink ports with different port identifiers. For example, the controller configures the uplink port connected to host 1 as port identifier ID8, and the uplink port connected to host 2 as port identifier ID9. These two IDs are "different".

[0140] This example illustrates a fundamental yet crucial task for the controller: assigning a unique logical identity (i.e., a distinct port identifier) ​​to each server accessing the system. This distinction is the prerequisite for all subsequent permission management and access control, ensuring the system can clearly identify whether a request originates from host 1 (ID8) or host 2 (ID9).

[0141] As an optional approach, where the target extender includes P downlink ports, and the next level of the target extender includes Q intermediate extenders, and each intermediate extender is connected to one of the P downlink ports via an uplink port, the controller is configured to configure the Q uplink ports of the Q intermediate extenders connected to the target extender and the Q downlink ports of the P downlink ports connected to the intermediate extenders to the same port identifier, where P is an integer greater than 1 and Q is an integer greater than 1 and less than or equal to P.

[0142] Optionally, in this embodiment, specific configuration rules are set for the controller to handle the connection between the first-level (highest level) and second-level (intermediate level) extenders. Figure 4 This is a schematic diagram of the port identifier of an intermediate extender for a server's storage device according to an embodiment of this application, such as... Figure 4 As shown, applying the definitions of P and Q: In Figure 4 In the example, "Expander 5" is the target expander, which has P downstream ports. Its next level includes four expanders ("Expander 1, 2, 3, 4"), which can be considered as Q intermediate expanders, hence Q = 4. Each intermediate expander is connected to one downstream port of "Expander 5" via an upstream port, satisfying the condition that P is an integer greater than 1 and Q is an integer greater than 1 and less than or equal to P.

[0143] Example of controller configuration: According to this scheme, the controller is configured to configure all ports connecting the first and second tiers with the same port identifier to establish a smooth internal connection.

[0144] During actual execution, the controller will perform two parts of configuration:

[0145] 1. Configure the downstream ports of the target extender: The controller configures all four downstream ports (Q=4) on "Extender 5" that are connected to the next level to the same port identifier. For example, the identifier is ID1.

[0146] 2. Configure the uplink ports of the intermediate extenders: The controller will also configure all the uplink ports of the four intermediate extenders "Extenders 1, 2, 3, 4" that are connected to "Extender 5" as ID1.

[0147] This example demonstrates that the controller sets all ports used for inter-level interconnection (i.e., the Q downlink ports of "Expander 5" and the Q uplink ports of "Expanders 1, 2, 3, 4") to the exact same port identifier ID1. The purpose of this configuration is to enable pass-through access between the two levels of expanders. This ensures that signals from the top-level expander can reach any second-level expander without discrimination, laying the foundation for more granular access control based on host IDs.

[0148] As an optional approach, where the lowest level of the storage device includes T reference extenders, and the memory connected to the i-th reference extender of the T reference extenders is allocated to the j-th server of the M servers, the controller is configured to configure the downlink port of the i-th reference extender connected to the memory to be consistent with the port identifier of the uplink port of the target extender connected to the j-th server, where T is an integer greater than 1, i is an integer greater than or equal to 1 and less than or equal to T, and j is an integer greater than or equal to 1 and less than or equal to M.

[0149] Optionally, in this embodiment, this scheme sets specific configuration rules for the lowest-level ports of the controller, i.e., how to explicitly allocate memory resources to a designated server. Continuing with... Figure 4 Taking the scenario in the example, applying the definitions of T, M, i, j: in Figure 4 In this example, the lowest level of the storage device includes four units: "Expanders 1, 2, 3, and 4", therefore T=4. The system connects to two servers: "Host 1" and "Host 2", therefore M=2.

[0150] An example of a controller performing configuration:

[0151] Scenario 1: The memory is allocated to the j=1th server (host 1). Based on the initial settings, the memory connected to both "Expander 1" (i=1st reference expander) and "Expander 2" (i=2nd reference expander) is allocated to the j=1th server (host 1). At this point, the controller performs configuration: it obtains the port identifier (ID8) of the uplink port connected to host 1. Therefore, the controller also configures the downlink ports connected to the memory in "Expander 1" and "Expander 2" to ID8, making them consistent with the port identifier of host 1.

[0152] Scenario 2: The memory is allocated to the j=2nd server (host 2). Based on the initial settings, the memory connected to "Expander 3" (the i=3rd reference expander) and "Expander 4" (the i=4th reference expander) is also allocated to the j=2nd server (host 2). At this point, the controller performs a configuration: it obtains the port identifier (ID9) of the uplink port connecting to host 2. Therefore, the controller also configures the downlink ports connected to the memory in "Expander 3" and "Expander 4" to ID9, making them consistent with the port identifier of host 2.

[0153] This example demonstrates how the controller, by enforcing this rule, completes the final logical allocation of storage resources. It ensures that the access port ID of the memory allocated to a specific server is completely consistent with the server's identity ID, thus establishing an initial, legitimate "pairing relationship." This guarantees that the server can only access the storage resources explicitly allocated to it after system startup. This provides an initial, secure state for the entire dynamic access control system.

[0154] The methods and embodiments provided in this application can be executed on a server device or a similar computing device. Taking running on a server device as an example, Figure 5 This is a hardware structure block diagram of a computer device for a method of controlling a storage device according to an embodiment of this application. (See diagram below.) Figure 5 As shown, the server device may include one or more ( Figure 5 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The server device may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 5 The structure shown is for illustrative purposes only and does not limit the structure of the server equipment described above. For example, the server equipment may also include components that are more... Figure 5 The more or fewer components shown, or having the same Figure 5 The different configurations shown.

[0155] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the control method of the storage device in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thus implementing the above-described method. The memory 104 may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to server devices via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0156] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider for the server device. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.

[0157] This embodiment provides a control method for a storage device, applied to the highest-level target expander among multiple expanders of the storage device. Figure 6 This is a flowchart of a control method for a storage device according to an embodiment of this application, such as... Figure 6 As shown, the process includes the following steps:

[0158] Step S12: Detect the permission information of the received control request, wherein the control request is used to instruct the target server to request control of the target memory among the multiple memories of the storage device, the permission information is used to instruct the target server to control the target memory, and the target extender is allowed to connect to multiple servers;

[0159] Step S14: Based on the permission information, control the candidate extender among the multiple reference extenders of the storage device connected to the target memory to change the control permission of the target memory to the target server. The multiple extenders of the storage device are divided into multiple levels. The extender at the upper level of the multiple levels is interconnected with the extender at the lower level. The reference extender is the extender at the lowest level of the multiple levels. Each memory in the storage device is connected to one reference extender.

[0160] Step S16: The control request is transmitted to the candidate extender, wherein the candidate extender is configured to, upon receiving the control request, verify the control request according to the control permissions currently corresponding to the target memory; and if the verification passes, transmit the control request to the target memory.

[0161] Optionally, in this embodiment, firstly, the target extender receives a control request initiated by the target server, which aims to control a target memory in the storage device. Then, the target extender checks the permission information contained in the control request to determine the control permissions the target server possesses over the target memory. Next, based on the detection result of the permission information, the target extender controls a candidate extender to perform the operation of changing the control permissions of the target memory to the target server. Here, the candidate extender refers to the reference extender at the lowest level in the multi-level architecture of the storage device and directly connected to the target memory. Finally, the target extender transmits the control request to the aforementioned candidate extender. Upon receiving the request, the candidate extender verifies the control request based on the current control permissions corresponding to the target memory. Only if the verification passes will the candidate extender ultimately transmit the control request to the target memory. This achieves the technical effect of improving the server's flexibility in accessing storage resources in the storage device, thereby solving the technical problem of low server flexibility in accessing storage resources in the storage device.

[0162] As an optional approach, the detection of permission information in the received control request includes:

[0163] S21, obtain the target port identifier of the target uplink port connected to the target server in the target extender, and the candidate port identifier of the candidate downlink port connected to the target memory in the candidate extender, wherein each of the plurality of memories includes an uplink port and a downlink port, the target extender includes a plurality of uplink ports, each uplink port of the target extender is configured to be connected to one of the servers, and the reference extender includes a plurality of downlink ports, each downlink port of the reference extender is configured to be connected to one of the memories;

[0164] S22, The permission information of the control request is detected based on the target port identifier and the candidate port identifier.

[0165] Optionally, in this embodiment, Figure 7 This is a schematic diagram of the structure of a storage device according to an embodiment of this application, such as... Figure 7As shown, S21, obtaining the target port identifier and candidate port identifier: This step is the data preparation stage before permission judgment. Obtaining the target port identifier: Assume "Host 1" is the target server for this request. The system first needs to obtain its identity identifier. In the example, "Host 1" is connected to the upstream port of "Extender 5" (target extender), which is configured with port ID: ID8. Therefore, the target port identifier obtained by the system is ID8. Obtaining the candidate port identifier: Assume Host 1 wants to access a hard drive (target storage) under "Extender 1" (candidate extender). The system needs to obtain the ownership identifier of this storage. In the example, this storage is connected to the downstream port of "Extender 1," which is configured with port ID: ID8. Therefore, the candidate port identifier obtained by the system is also ID8.

[0166] S22, Detection based on target port identifier and candidate port identifier: This step is the core logic for performing permission judgment. In S21, the system obtained two key identifiers: the target port identifier (ID8) from the server and the candidate port identifier (ID8) from the storage. Next, the system checks the permission information based on these two identifiers. The rule for detection is to determine whether the two IDs are "the same". Because in this example, both identifiers obtained are ID8, they are the same, so the permission check passes, and host 1 is allowed to access the storage. In contrast, if host 1 (target port identifier ID8) attempts to access the storage under "Extender 3" (its candidate port identifier is ID9), then in step S22, the system will determine insufficient permissions because ID8 and ID9 are not the same, thus denying access.

[0167] As an optional approach, the step of detecting the permission information of the control request based on the target port identifier and the candidate port identifier includes:

[0168] S31, detect whether there is a pairing relationship between the target uplink port and the candidate downlink port based on the target port identifier and the candidate port identifier;

[0169] S32, if the pairing relationship between the target uplink port and the candidate downlink port is detected, the permission information is determined to indicate that the target server has control permission over the target memory;

[0170] S33, if it is detected that there is no pairing relationship between the target uplink port and the candidate downlink port, determine that the permission information is used to indicate that the target server does not have control permission to the target memory.

[0171] Optionally, in this embodiment, the complete logic of permission detection is decomposed into three steps: "detecting the relationship," "determining if the relationship exists," and "determining if the relationship does not exist." This "pairing relationship" is achieved by determining whether the port IDs are "the same." Combined with... Figure 7 Let's illustrate the scenario in section S31: Detecting whether a pairing relationship exists: This step is the core of the judgment. The system will detect whether a pairing relationship exists between the target port identifier obtained from the server and the candidate port identifier obtained from the storage.

[0172] Example 1: When “Host 1” (target port ID8) requests access to the memory under “Extender 1” (candidate port ID8), the system finds that the two IDs are the same by comparison, and therefore detects that there is a pairing relationship between the target uplink port and the candidate downlink port.

[0173] Example 2: When “Host 1” (target port ID8) requests access to the memory under “Extender 3” (candidate port ID9), the system finds that the two IDs are different by comparison, and therefore detects that there is no pairing relationship between them.

[0174] S32, Determination of Pairing Relationship: This step corresponds to the subsequent processing after the detection in S31 is passed. In Example 1 above, because the system detects that there is a pairing relationship between the two, step S32 is executed: determining that the permission information is used to instruct the target server (host 1) to have control permissions over the target storage (storage under extender 1). Finally, access is permitted.

[0175] S33, Determination in the absence of a pairing relationship: This step corresponds to the follow-up processing after the detection failure in S31. In Example 2 above, because the system detects that there is no pairing relationship between the two, step S33 is executed: determining that the permission information is used to indicate that the target server (host 1) does not have control permissions over the target storage (storage under extender 3). Ultimately, access is denied.

[0176] Optionally, in order to better understand the control process of the above-mentioned storage device, the control flow of the above-mentioned storage device will be described below in conjunction with optional embodiments, but this is not intended to limit the technical solution of the embodiments of this application.

[0177] Based on this understanding, the technical solution of this application, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0178] This embodiment also provides a control device for a storage device, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0179] Figure 8 This is a structural block diagram of a control device for a storage device according to an embodiment of this application; as shown below. Figure 8 As shown, a control device for a storage device is applied to the highest-level target expander among multiple expanders of the storage device, and the device includes:

[0180] The detection module 802 is used to detect the permission information of the received control request, wherein the control request is used to instruct the target server to request control of the target memory among the multiple memories of the storage device, the permission information is used to instruct the target server to control the target memory, and the target extender allows connection to multiple servers;

[0181] The modification module 804 is used to control a candidate extender connected to the target memory among a plurality of reference extenders of the storage device to change the control permission of the target memory to the target server according to the permission information. The plurality of extenders of the storage device are divided into multiple levels, and the extender at the upper level of the plurality of levels is interconnected with the extender at the lower level. The reference extender is the extender at the lowest level among the plurality of levels, and each memory in the storage device is connected to one reference extender.

[0182] The transmission module 806 is configured to transmit the control request to the candidate extender, wherein the candidate extender is configured to, upon receiving the control request, verify the control request according to the control permissions currently corresponding to the target memory; and if the verification passes, transmit the control request to the target memory.

[0183] In one exemplary embodiment, the detection module includes:

[0184] An acquisition unit is configured to acquire the target port identifier of the target uplink port connected to the target server in the target extender, and the candidate port identifier of the candidate downlink port connected to the target memory in the candidate extender, wherein each of the plurality of memories includes an uplink port and a downlink port, the target extender includes a plurality of uplink ports, each uplink port of the target extender is configured to be connected to one of the servers, and the reference extender includes a plurality of downlink ports, each downlink port of the reference extender is configured to be connected to one of the memories;

[0185] The detection unit is used to detect the permission information of the control request based on the target port identifier and the candidate port identifier.

[0186] In one exemplary embodiment, the detection unit is further configured to:

[0187] Detect whether there is a pairing relationship between the target uplink port and the candidate downlink port based on the target port identifier and the candidate port identifier;

[0188] If the pairing relationship is detected between the target uplink port and the candidate downlink port, the permission information is determined to indicate that the target server has control permission over the target memory;

[0189] If it is detected that there is no pairing relationship between the target uplink port and the candidate downlink port, the permission information is determined to indicate that the target server does not have control permissions over the target memory.

[0190] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.

[0191] For a description of the features in the embodiment corresponding to the control device of the storage device, please refer to the relevant description in the embodiment corresponding to the control method of the storage device, which will not be repeated here.

[0192] Embodiments of this application also provide an electronic device. Figure 9 This is a schematic diagram of an electronic device according to an embodiment of this application, such as... Figure 9 As shown, the electronic device includes a memory and a processor, the memory storing a computer program, and the processor being configured to run the computer program to perform the steps in any of the above-described embodiments of the control method for the storage device.

[0193] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0194] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.

[0195] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described embodiments of the control method for the storage device.

[0196] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0197] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0198] Embodiments of this application also provide a computer program product, including a computer program that, when executed by a processor, implements the steps of the methods described in various embodiments of this application; the computer program product further includes a non-volatile computer-readable storage medium storing the computer program, which, when executed by a processor, implements the steps of the control method for the storage device described in various embodiments of this application.

[0199] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0200] The control method for a storage device provided in this application has been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make several improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of the claims of this application.

Claims

1. A server storage device, characterized in that, include: Multiple extenders and multiple memories are provided. The extenders are divided into multiple levels, with each extender at a higher level interconnected with an extender at a lower level. The highest-level target extender is allowed to connect to multiple servers. Each memory is connected to one of the multiple reference extenders at the lowest level. The target extender is configured to detect permission information of a received control request, wherein the control request is used to instruct a target server to request control of a target memory, and the permission information is used to instruct the target server to have control permissions over the target memory; based on the permission information, the target extender controls a candidate extender among a plurality of reference extenders connected to the target memory to change the control permissions of the target memory to the target server; and the target extender transmits the control request to the candidate extender. Each of the reference extenders is configured to, upon receiving the control request, verify the control request according to the control permissions currently corresponding to the connected memory; and if the verification passes, transmit the control request to the connected memory.

2. The storage device according to claim 1, characterized in that, Each of the plurality of memories includes an uplink port and a downlink port. The target extender includes a plurality of uplink ports, each uplink port of the target extender being configured to connect to one of the servers. The reference extender includes a plurality of downlink ports, each downlink port of the reference extender being configured to connect to one of the memories. The target extender is configured to acquire the target port identifier of the target uplink port connected to the target server in the target extender, and the candidate port identifier of the candidate downlink port connected to the target memory in the candidate extender; and to detect the permission information of the control request based on the target port identifier and the candidate port identifier.

3. The storage device according to claim 2, characterized in that, The target extender is configured to detect the permission information of the control request based on the target port identifier and the candidate port identifier through the following steps: Detect whether there is a pairing relationship between the target uplink port and the candidate downlink port based on the target port identifier and the candidate port identifier; If the pairing relationship is detected between the target uplink port and the candidate downlink port, the permission information is determined to indicate that the target server has control permission over the target memory; If it is detected that there is no pairing relationship between the target uplink port and the candidate downlink port, the permission information is determined to indicate that the target server does not have control permissions over the target memory.

4. The storage device according to claim 3, characterized in that, The target extender is configured to detect whether there is a pairing relationship between the target uplink port and the candidate downlink port based on the target port identifier and the candidate port identifier through the following steps: Detect whether the target port identifier and the candidate port identifier are consistent; If the target port identifier and the candidate port identifier are the same, it is determined that there is a pairing relationship between the target uplink port and the candidate downlink port; If the target port identifier and the candidate port identifier are inconsistent, it is determined that there is no pairing relationship between the target uplink port and the candidate downlink port.

5. The storage device according to claim 1, characterized in that, Each of the plurality of memories includes an uplink port and a downlink port. The target extender includes a plurality of uplink ports, each uplink port of the target extender being configured to connect to one of the servers. The reference extender includes a plurality of downlink ports, each downlink port of the reference extender being configured to connect to one of the memories. The target extender is further configured to, when the permission information indicates that the target server does not have control permissions over the target memory, obtain the port address of the candidate downlink port connected to the target memory from the candidate extenders; send target permission information carrying the port address to the target server, wherein the target permission information indicates that the target server does not have control permissions over the memory connected to the candidate downlink port; and the target server is configured to, upon receiving the target permission information, send a permission change instruction carrying the port address to the candidate extender, wherein the permission change instruction controls the candidate extender to change the control permissions of the memory connected to the downlink port indicated by the port address to the target server.

6. The storage device according to claim 1, characterized in that, Each of the plurality of memories includes an uplink port and a downlink port. The target extender includes a plurality of uplink ports, each uplink port of the target extender being configured to connect to one of the servers. The reference extender includes a plurality of downlink ports, each downlink port of the reference extender being configured to connect to one of the memories. The target extender is further configured to, when the permission information indicates that the target server does not have control permissions over the target memory, control the candidate extender to establish a pairing relationship between a candidate downlink port and a target uplink port, so as to change the control permissions of the target memory to the target server, wherein the candidate downlink port is the downlink port of the candidate extender connected to the target memory, and the target uplink port is the uplink port of the target extender connected to the target server.

7. The storage device according to claim 6, characterized in that, The target extender is configured to acquire the target port identifier of the target uplink port; and control the candidate extender to adjust the candidate port identifier of the candidate downlink port to be consistent with the target port identifier, so as to establish a pairing relationship between the candidate downlink port and the target uplink port.

8. The storage device according to claim 1, characterized in that, The storage device further includes a controller, which is connected to each of the plurality of expanders, wherein... The controller is configured to configure port identifiers for the uplink and downlink ports on each of the multiple layers, based on the layer in which each of the extenders is located.

9. The storage device according to claim 8, characterized in that, In the case where the target extender at the highest level includes N uplink ports, and the N uplink ports are currently connected to M servers, the controller is configured to configure the multiple uplink ports with different port identifiers, where N is an integer greater than 1 and M is an integer greater than 1 and less than or equal to N.

10. The storage device according to claim 9, characterized in that, In a scenario where the target extender includes P downlink ports, and the next level of the target extender includes Q intermediate extenders, each of the intermediate extenders being connected to one of the P downlink ports via an uplink port, the controller is configured to configure the Q uplink ports of the Q intermediate extenders connected to the target extender and the Q downlink ports of the P downlink ports connected to the intermediate extenders to the same port identifier, where P is an integer greater than 1 and Q is an integer greater than 1 and less than or equal to P.

11. The storage device according to claim 9, characterized in that, In the case where the lowest level of the storage device includes T reference extenders, and the memory connected to the i-th reference extender of the T reference extenders is allocated to the j-th server of the M servers, the controller is configured to configure the downlink port of the i-th reference extender connected to the memory to be consistent with the port identifier of the uplink port of the target extender connected to the j-th server, where T is an integer greater than 1, i is an integer greater than or equal to 1 and less than or equal to T, and j is an integer greater than or equal to 1 and less than or equal to M.

12. A method for controlling a server's storage device, characterized in that, The method involves applying a target expander at the highest level among multiple expanders used in a storage device, and includes: The permission information of the received control request is detected, wherein the control request is used to instruct the target server to request control of the target memory among the multiple memories of the storage device, the permission information is used to instruct the target server to control the target memory, and the target extender allows connection to multiple servers; According to the permission information, the candidate extender connected to the target memory among the multiple reference extenders of the storage device changes the control permission of the target memory to the target server. The multiple extenders of the storage device are divided into multiple levels. The extender at the upper level of the multiple levels is interconnected with the extender at the lower level. The reference extender is the extender at the lowest level among the multiple levels. Each memory in the storage device is connected to one reference extender. The control request is transmitted to the candidate extender, wherein the candidate extender is configured to, upon receiving the control request, verify the control request according to the control permissions currently corresponding to the target memory; and if the verification passes, transmit the control request to the target memory.

13. The control method for a storage device according to claim 12, characterized in that, The step of detecting the permission information of the received control request includes: Obtain the target port identifier of the target uplink port connected to the target server in the target extender, and the candidate port identifier of the candidate downlink port connected to the target memory in the candidate extender, wherein each of the plurality of memories includes an uplink port and a downlink port, the target extender includes a plurality of uplink ports, each uplink port of the target extender is configured to be connected to one of the servers, and the reference extender includes a plurality of downlink ports, each downlink port of the reference extender is configured to be connected to one of the memories; The permission information of the control request is detected based on the target port identifier and the candidate port identifier.

14. The control method for a storage device according to claim 13, characterized in that, The step of detecting the permission information of the control request based on the target port identifier and the candidate port identifier includes: Detect whether there is a pairing relationship between the target uplink port and the candidate downlink port based on the target port identifier and the candidate port identifier; If the pairing relationship is detected between the target uplink port and the candidate downlink port, the permission information is determined to indicate that the target server has control permission over the target memory; If it is detected that there is no pairing relationship between the target uplink port and the candidate downlink port, the permission information is determined to indicate that the target server does not have control permissions over the target memory.

15. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the control method for the storage device as described in any one of claims 1 to 12.