A storage system

By using the SAS port and ZONE function in the storage system, the hard disk resources of the storage expansion cabinet are dynamically allocated, which solves the problem of inflexible expansion granularity of the storage expansion cabinet in the existing technology and improves the utilization rate and cost-effectiveness of storage resources.

CN118672515BActive Publication Date: 2024-10-29ZHEJIANG HUAQI INTELLIGENT TECHNOLOGY CO LTD +1
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411147700.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-21
Publication Date
2024-10-29
Estimated Expiration
2044-08-21

AI Technical Summary

Technical Problem

When the existing storage system is expanding, the minimum expansion granularity is the storage expansion cabinet, which cannot flexibly expand the capacity, resulting in waste of resources, high cost, and low effective expansion rate. Especially in the cluster storage system, multiple controller nodes require multiple storage expansion cabinets to fully implement the expansion. Node expansion results in more waste of storage resources.

Method used

By using the SAS port connection between the controller and the expander, enable the ZONE function, detect the interruption signal when the storage expansion cabinet is connected, enable the ZONE function of the storage expansion cabinet based on the SMP protocol, add it to the ZONE area, and generate storage resources Table, dynamically allocate idle hard disks as expansion resources, realize expansion and contraction of the controller at the granularity of hard disks, and rationally allocate storage resources.

Benefits of technology

It improves the effective storage space utilization of storage expansion cabinets, reduces storage costs, enables more flexible and efficient storage resource management, and avoids waste of resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118672515B_ABST
    Figure CN118672515B_ABST
Patent Text Reader

Abstract

The present application discloses a storage system for implementing the expansion of the controller with the hard disk of the storage expansion cabinet as the granularity, realizing the reasonable allocation of storage resources, thereby improving the utilization rate of the effective storage space of the storage expansion cabinet and reducing the storage cost. The present application provides a storage system, including: at least one controller and at least one expander; the first controller is used to enable the ZONE function of the storage expansion cabinet and generate a storage resource table based on the SMP protocol through the expander connected to the storage expansion cabinet when a storage expansion cabinet is connected; according to the storage resource table, the expansion target hard disk is determined from the idle hard disks, and the expansion target hard disk is used as the expansion storage resource, and the expansion storage resource is allocated to the controller that needs to be expanded through the ZONE configuration; the current use status of the target hard disk in the storage resource table is updated to occupied, and a mapping relationship between the identifier of the expanded controller and the allocated expansion target hard disk is established, and saved to the storage resource table.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cluster storage technology, and in particular to a storage system. Background Art

[0002] In current storage systems, when two controllers need to be expanded, at least two storage expansion cabinets are required for expansion. The minimum granularity of expansion is the storage capacity of the storage expansion cabinet. It is not possible to expand the two controllers at the same time with one storage expansion cabinet, and it is not possible to expand at a smaller granularity (hard disk). Such expansion solutions waste the storage resources of the storage expansion cabinet, are costly, inflexible, and have a low effective expansion rate. Especially for cluster storage systems, multiple controller nodes require multiple (at least 1:1) storage expansion cabinets to expand the storage capacity of all nodes, resulting in more waste of storage resources. Summary of the invention

[0003] The embodiment of the present application provides a storage system for expanding the controller based on the hard disk of the storage expansion cabinet, realizing the reasonable allocation of storage resources, thereby improving the utilization rate of the effective storage space of the storage expansion cabinet and reducing storage costs.

[0004] The embodiment of the present application provides a storage system, including: at least one controller and at least one expander; each of the controllers is connected to the corresponding expander through a SAS port; all the expanders form a ZONE area by enabling the ZONE function, and any controller accesses the storage resources in the ZONE area through the ZONE configuration;

[0005] The expander is used to: when detecting that a storage expansion cabinet is connected, report an interrupt signal to a first controller that has the right to access the hard disk of the storage expansion cabinet;

[0006] The first controller is used to: after receiving the interrupt signal, based on the SMP protocol, enable the ZONE function of the storage expansion cabinet through the expander that reports the interrupt signal, so that the storage expansion cabinet is added to the ZONE area, so that any controller has the right to access the corresponding hard disk in the storage expansion cabinet allocated to it as an extended storage resource; and

[0007] The first controller also generates a storage resource table including at least a cabinet identifier of the storage expansion cabinet, a hard disk ID of each hard disk in the storage expansion cabinet, a storage capacity of each hard disk, and a current usage status of each hard disk;

[0008] The first controller determines the expansion target hard disk from the hard disks whose current usage status is idle based on the storage resource table saved locally, uses the expansion target hard disk as the extended storage resource, and allocates the extended storage resource to the controller that needs to be expanded through the ZONE configuration; updates the current usage status of the target hard disk in the storage resource table to occupied, and establishes a mapping relationship between the identifier of the controller to be expanded and the allocated expansion target hard disk, and saves it to the storage resource table.

[0009] Through this system, the controller can be expanded based on the hard disk of the storage expansion cabinet, and the storage resources can be reasonably allocated, thereby improving the utilization rate of the effective storage space of the storage expansion cabinet and reducing storage costs.

[0010] In some embodiments, the first controller allocates the extended storage resource to the controller that needs to be expanded through ZONE configuration, specifically including:

[0011] When the user interface is detected to trigger a controller expansion operation, for each controller selected for expansion, based on the expansion capacity selected for the controller, an expansion target hard disk that meets the storage capacity required by the controller is determined from the hard disks whose current usage status is idle in the locally saved storage resource table, and the expansion target hard disk is allocated to the controller as an expanded storage resource through ZONE configuration.

[0012] Through the system, the first controller can expand the controller according to user needs, thereby fully utilizing existing storage resources and avoiding waste of storage resources.

[0013] In some embodiments, the controllers are connected via a network;

[0014] The first controller is further used to: send a heartbeat message to other controllers according to a set period, carrying the storage resource table stored locally;

[0015] When the original storage resources are insufficient, other controllers determine the size of the storage resources to be increased according to the storage resource table; and send a request to increase the storage resources to the first controller;

[0016] The first controller allocates the extended storage resource to the controller that needs to be expanded through ZONE configuration, specifically including:

[0017] When its own original storage resources are insufficient and / or when receiving a request to increase storage resources from other controllers, based on its own storage capacity that needs to be expanded and / or the storage capacity requested by the requesting controller, an expansion target hard disk that meets the expansion requirements is determined from the hard disks that are currently idle in the storage resource table, and the expansion target hard disk is allocated as an extended storage resource to itself and / or the requesting controller through ZONE configuration.

[0018] Through the system, the first controller can be intelligently expanded according to the expansion requirements of itself and / or other controllers, thereby making full use of existing storage resources and avoiding waste of storage resources.

[0019] In some embodiments, the controllers are connected via a network;

[0020] The first controller is further configured to: send a notification message carrying the remaining storage resource capacity to other controllers according to the locally stored storage resource table at a set period;

[0021] When the original storage resources of other controllers are insufficient, they send a request to the first controller to increase storage resources;

[0022] The first controller allocates the extended storage resource to the controller that needs to be expanded through ZONE configuration, specifically including:

[0023] When the original storage resources are insufficient and / or when a request for increasing storage resources is received from other controllers, a sum is calculated based on the original storage resource usage ratios carried in the requests of the controllers that need to be expanded; and a total remaining storage capacity is calculated based on the storage capacity of the hard disks that are currently in use and are idle in the storage resource table;

[0024] For each controller that needs to be expanded, execute:

[0025] The original storage resource usage ratio of the controller is divided by the sum value to obtain a ratio, and the ratio is multiplied by the total remaining storage capacity to obtain the storage capacity allocated to the controller this time;

[0026] An expansion target hard disk that satisfies the storage capacity allocated to the controller this time is determined from the hard disks whose current usage status is idle in the storage resource table, and the expansion target hard disk is allocated to the controller as an extended storage resource through ZONE configuration.

[0027] Through this system, the first controller can reasonably allocate the remaining storage capacity of the storage expansion cabinet to each controller that needs to be expanded according to the original storage resource usage ratio of each controller that needs to be expanded, so as to meet the expansion needs of more controllers.

[0028] In some embodiments, the first controller is further configured to:

[0029] When the user interface triggers the controller scaling down operation, for each selected controller to be scaled down, execute the following:

[0030] According to the hard disk ID corresponding to the target hard disk selected for shrinkage this time, the cabinet ID of the storage expansion cabinet and the ID of the controller, the controller's access permission to the target hard disk is revoked through ZONE configuration, the current usage status of the target hard disk in the storage resource table is updated to idle, and the mapping relationship between the controller's ID and the target hard disk is deleted.

[0031] Through this system, the first controller can reduce the capacity of the controller according to user needs, so that the occupied idle expansion storage resources can be released in time to meet the expansion needs of other controllers.

[0032] In some embodiments, the controllers are connected via a network;

[0033] The other controller, when the remaining storage capacity of its own original storage resource is at least greater than the storage capacity of one hard disk in the occupied extended storage resource, determines the target hard disk to be shrunk this time according to the remaining storage capacity of the original storage resource and the occupied storage capacity of each hard disk in the extended storage resource, transfers the data stored in the target hard disk to the remaining storage space of the original storage resource, and then sends a request to reduce storage resources to the first controller;

[0034] The first controller is also used to: based on the hard disk ID corresponding to the target hard disk carried in the request to reduce storage resources, the cabinet identifier of the storage expansion cabinet and the identifier of the requested controller, release the controller's access rights to the target hard disk through ZONE configuration, update the current usage status of the target hard disk in the storage resource table to idle, and delete the mapping relationship between the controller's identifier and the target hard disk.

[0035] Through this system, the first controller can be intelligently shrunk according to the shrinking requirements of the controllers that need to be shrunk, so that the occupied idle expansion storage resources can be released in time to meet the expansion requirements of other controllers.

[0036] In some embodiments, the first controller is further configured to:

[0037] When it is detected that the remaining storage capacity of the original storage resource is at least greater than the storage capacity of one hard disk in the occupied extended storage resource, the target hard disk to be shrunk is determined according to the remaining storage capacity of the original storage resource and the occupied storage capacity of each hard disk in the extended storage resource;

[0038] After transferring the data stored in the shrinking target hard disk to the remaining storage space of the original storage resource, the current usage status of the shrinking target hard disk in the storage resource table is updated to idle, and the mapping relationship between the identifier of the first controller and the shrinking target hard disk is deleted.

[0039] Through this system, the first controller can be intelligently scaled down according to its own scaling requirements, so that the occupied idle expansion storage resources can be released in time to meet the expansion requirements of other controllers.

[0040] In some embodiments, the first controller is further configured to:

[0041] According to the set cycle, based on the cabinet identifier of each storage expansion cabinet in the storage resource table, when it is determined that the current usage status of all hard disks of a storage expansion cabinet is idle, based on the SMP protocol, through the expander connected to the storage expansion cabinet, the enable ZONE function of the storage expansion cabinet is turned off, and the storage expansion cabinet is controlled to enter a sleep state.

[0042] Through the system, the first controller can take the storage expansion cabinet offline after the storage space of each hard disk in the storage expansion cabinet is released, thereby saving resources.

[0043] In some embodiments, the storage expansion cabinet is used to: detect that a new storage expansion cabinet is connected, or receive a new storage expansion cabinet access message reported by other connected storage expansion cabinets, send a new storage expansion cabinet access message to the connected expander;

[0044] The expander is further used to: upon receiving the new storage expansion cabinet access message sent by the directly connected storage expansion cabinet, report an interrupt signal to the first controller having the right to access the hard disk of the new storage expansion cabinet;

[0045] The first controller is also used for: when multiple storage expansion cabinets are connected to the expander in series, setting the storage expansion cabinet directly connected to the expander to have the highest cascade level, and setting the cascade levels of other storage expansion cabinets to decrease in sequence according to the serial connection order, and saving the corresponding cascade level of each storage expansion cabinet in the storage resource table; when allocating extended storage resources to the controller that needs to be expanded, selecting the hard disk whose current usage status of the corresponding storage expansion cabinet is idle as the target hard disk according to the order of the cascade levels of each storage expansion cabinet in the storage resource table from high to low.

[0046] Through the system, when multiple storage expansion cabinets are connected in series, the first controller selects idle hard disks on the storage expansion cabinets according to the cascade level of each storage expansion cabinet and allocates them to the controller that needs to be expanded, thereby saving resources.

[0047] In some embodiments, after allocating the extended storage resource to the controller that needs to be expanded through ZONE configuration each time, the first controller is further configured to:

[0048] The parameters characterizing the enabled ZONE function status of the storage expansion cabinet and the configuration parameters of the number of hard disks allocated this time, the hard disk ID of each hard disk, and the identifier of the controller to be expanded are saved in the non-volatile storage medium of the storage expansion cabinet.

[0049] Through this system, after each restart of the storage expansion cabinet, the first controller does not need to be reconfigured, and the relevant configuration can be quickly made effective immediately according to the parameters saved in the non-volatile storage medium of the storage expansion cabinet, thereby improving efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0051] Figure 1 A schematic diagram of the structure of a dual-control storage system (excluding storage expansion cabinets) provided in an embodiment of the present application;

[0052] Figure 2 A schematic diagram of the structure of a dual-control storage system (including a storage expansion cabinet) provided in an embodiment of the present application;

[0053] Figure 3 A schematic diagram of the structure of a storage system provided in an embodiment of the present application;

[0054] Figure 4 A schematic diagram of the structure of another storage system provided in an embodiment of the present application;

[0055] Figure 5 A schematic diagram of specific steps for expanding the capacity of a controller of a storage system (semi-automatically) provided in an embodiment of the present application;

[0056] Figure 6A schematic diagram of specific steps for another embodiment of the present application to expand the capacity of a storage system controller (automatically, when the controller requests to increase storage resources, no specific storage resource size is requested);

[0057] Figure 7 A schematic diagram of specific steps for another embodiment of the present application to expand the capacity of a controller of a storage system (automatically, when the controller requests to increase storage resources, it applies for a specific storage resource size);

[0058] Figure 8 A schematic diagram of specific steps for reducing the capacity of a controller of a storage system (semi-automatically) provided in an embodiment of the present application;

[0059] Fig. 9 A schematic diagram of specific steps for another embodiment of the present application to reduce the capacity of a storage system controller (automatically, the controller that manages storage expansion cabinet resources reduces the capacity of other controllers);

[0060] Fig.10 A schematic diagram of specific steps for another embodiment of the present application to reduce the capacity of a storage system controller (automatically, the controller that manages storage expansion cabinet resources reduces the capacity of itself);

[0061] Fig.11 A schematic diagram of the structure of a storage system (including three controllers) provided in an embodiment of the present application;

[0062] Fig.12 A schematic diagram of specific steps for expanding and shrinking the controller of a storage system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0063] The following is a clear and complete description of the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0064] The embodiment of the present application provides a storage system for expanding the controller based on the hard disk of the storage expansion cabinet, realizing the reasonable allocation of storage resources, thereby improving the utilization rate of the effective storage space of the storage expansion cabinet and reducing storage costs.

[0065] The terms "first", "second", etc. (if any) in the specification and claims of the embodiments of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in a sequence other than the content illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0066] The following examples and embodiments are to be understood as illustrative examples only. Although this specification may refer to "one", "an" or "some" examples or embodiments in several places, this does not mean that each such reference relates to the same example or embodiment, nor does it mean that the feature applies only to a single example or embodiment. Individual features of different embodiments may also be combined to provide other embodiments. In addition, terms such as "including" and "comprising" should be understood as not limiting the described embodiments to consist only of those features that have been mentioned; such examples and embodiments may also include features, structures, units, modules, etc. that are not specifically mentioned.

[0067] The following is a detailed description of each embodiment of the present application in conjunction with the accompanying drawings. It should be noted that the display order of the embodiments of the present application only represents the order of the embodiments, and does not represent the advantages and disadvantages of the technical solutions provided by the embodiments.

[0068] It should be noted that the technical solution provided in the embodiment of the present application is illustrated by taking the idle hard disks on the connected storage expansion cabinet to determine the extended storage resources of the controller when the original storage resources of the controller are insufficient as an example, but is not limited to this.

[0069] For example Figure 1 The structural diagram of the dual-controller storage system shown includes: controller A, controller B, expander, and two completely independent hard disk groups A and hard disk group B; wherein the upstream port of the expander is connected to controller A and controller B, and the downstream port of the expander is connected to hard disk group A and hard disk group B.

[0070] When each device operates normally, controller A manages the storage resources of disk group A through the expander based on the Serial Small Computer System Interface (SAS) protocol, but cannot access the storage resources of disk group B.

[0071] Similarly, controller B manages the storage resources of disk group B through the expander based on the SAS protocol, and cannot access the storage resources of disk group A. Controller A and controller B are completely physically isolated, that is, the transmission route of controller A is physically separated from the transmission route of controller B, and there will be no conflict. In other words, the storage resources of disk group A and disk group B are physically isolated. To achieve this function, you need to use the expander's enable ZONE function and set the storage resources into two storage areas, groupA and groupB, and the access rights of the two storage areas are isolated from each other.

[0072] Each expander forms a zoned portion of a service delivery subsystem (ZPSDS) by enabling the ZONE function, which can also be called a ZONE area. Controller A and controller B access storage resources in the service delivery subsystem area through the ZONE configuration (to prevent controllers A and B from accessing unauthorized storage resources). The expander is connected to hard disk group A and hard disk group B respectively through the SAS interface or the Serial Advanced Technology Attachment (SATA) interface.

[0073] The SAS (Serial Small Computer System Interface SCSI) protocol stipulates that when a SAS system based on the SAS protocol is powered on, all devices in the SAS system establish communication with each other until the number and type of devices connected to the ZONE domain are determined. When a new device is added to the SAS system, such as a new storage hard disk, or when a device is uninstalled from the SAS system, such as a storage hard disk error is removed, the event notification will be sent to each initiator device so that they can readjust the configuration.

[0074] When you connect a storage expansion cabinet to the expander to expand the storage capacity of the above storage system, for example Figure 2 As shown in the figure, for example, a storage expansion cabinet is newly connected to a storage area of ​​the expander, and controller A has the permission to access the storage area. In this case, the increased storage capacity is only valid for controller A, that is, only controller A can access the hard disk on the storage expansion cabinet, and controller B cannot access the hard disk on the storage expansion cabinet because the port to which the storage expansion cabinet is connected belongs to the groupA domain, and the groupA domain and groupB domain are isolated from each other. If controller B needs to expand capacity, it needs to connect a storage expansion cabinet to the groupB domain as well ( Figure 2 Not shown, reference controller A).

[0075] The disadvantage of the above expansion solution is that the minimum granularity of expansion is the storage expansion cabinet, which is not flexible. For example, controllers A and B only need to expand the storage space of 2 hard disks each, but this method directly expands at least 24 hard disks each and requires at least two storage expansion cabinet devices, which not only increases costs, but also wastes storage resources and has a low effective expansion rate.

[0076] To solve the above problems, see Figure 3 , a storage system provided by an embodiment of the present application includes: at least one controller 100, at least one expander 200; each of the controllers 100 is connected to the corresponding expander 200 through a SAS port; all the expanders 200 form a ZONE area by enabling the ZONE function, and any controller 100 accesses the storage resources in the ZONE area through the ZONE configuration;

[0077] The expander 200 is used to: when detecting that a storage expansion cabinet 300 is connected, report an interrupt signal to the first controller 101 that has the right to access the hard disk of the storage expansion cabinet 300;

[0078] The first controller 101 is used to: after receiving the interrupt signal, based on the SMP protocol, enable the ZONE function of the storage expansion cabinet 300 through the expander 200 that reports the interrupt signal, so that the storage expansion cabinet 300 is added to the ZONE area, so that any controller 100 has the right to access the corresponding hard disk in the storage expansion cabinet 300 allocated to it as an extended storage resource; and

[0079] The first controller 101 also generates a storage resource table (such as shown in Table 1) that at least includes a cabinet identifier of the storage expansion cabinet 300 (such as a storage expansion cabinet number), a hard disk ID (such as a slot number) of each hard disk in the storage expansion cabinet 300, a storage capacity of each hard disk, and a current usage status of each hard disk;

[0080] The first controller 101 determines the expansion target hard disk from the hard disks whose current usage status is idle based on the storage resource table saved locally, uses the expansion target hard disk as the extended storage resource, and allocates the extended storage resource to the controller 100 that needs to be expanded through the ZONE configuration; updates the current usage status of the target hard disk in the storage resource table to occupied, and establishes a mapping relationship between the identifier of the controller 100 to be expanded and the allocated expansion target hard disk, and saves it to the storage resource table (for example, as shown in Table 2).

[0081] The original storage resource is, for example, a hard disk group connected to the downstream port of the expander 200 , and the controller 100 accesses the hard disk group through the expander 200 .

[0082] A controller is a first controller if a storage expansion cabinet is connected to the storage area managed by the controller on the expander corresponding to the controller. The first controller may be one or more.

[0083] When a storage expansion cabinet 300 is directly connected to a storage area on the expander 200, or when a new storage expansion cabinet access message is received from the storage expansion cabinet 300 connected to the storage area, the expander 200 reports an interrupt signal to the first controller 101 that manages the storage area. After receiving the interrupt signal, the first controller 101 identifies the storage resources (the number of hard disks, the slot number of each hard disk, and the storage capacity of each hard disk) on the new storage expansion cabinet.

[0084] Table 1 Storage resource table

[0085]

[0086] Table 2 Storage resource table with mapping relationship between controller and hard disk added

[0087]

[0088] The first controller 101 allocates extended storage resources to the controller 100 that needs to be expanded through the ZONE configuration, and sends the identifier of the controller allocated each time, the slot number of the allocated hard disk, and the configuration parameters of the cabinet identifier of the storage expansion cabinet to the expander 200, so that the expander 200 controls the data transmission route of these controllers 100 that have completed the expansion.

[0089] After the controller obtains the extended storage resource, the controller can identify the slot number where the hard disk corresponding to the extended storage resource is located and the storage expansion cabinet.

[0090] In some embodiments, the first controller 101 allocates the extended storage resources to the controller 100 that needs to be expanded through ZONE configuration, specifically including:

[0091] When the user interface is detected to trigger the controller expansion operation, for each controller 100 selected for expansion, based on the expansion capacity selected for the controller 100, the expansion target hard disk that meets the storage capacity required by the controller 100 is determined from the hard disks whose current usage status is idle in the locally saved storage resource table, and the expansion target hard disk is allocated to the controller 100 as an expanded storage resource through ZONE configuration.

[0092] By allowing operators to expand the capacity of the controllers that need to be expanded, the expansion needs in more scenarios can be met, such as when communication between controllers is abnormal or the network status is poor.

[0093] In some embodiments, the controllers 100 are connected via a network;

[0094] The first controller 101 is further used to: send a heartbeat message to other controllers 102 according to a set period, carrying the storage resource table stored locally;

[0095] When the original storage resources are insufficient, the other controllers 102 determine the size of the storage resources to be increased according to the storage resource table; and send a request for increasing storage resources to the first controller 101;

[0096] The first controller 101 allocates the extended storage resources to the controller 100 that needs to be expanded through ZONE configuration, specifically including:

[0097] When its own original storage resources are insufficient and / or when receiving a request for increasing storage resources sent by other controllers 102, based on the storage capacity that needs to be expanded and / or the storage capacity requested by the requesting controller 102, a target hard disk for expansion that meets the expansion requirements is determined from the hard disks that are currently idle in the storage resource table, and the target hard disk for expansion is allocated as an extended storage resource to itself and / or the requesting controller 102 through ZONE configuration.

[0098] For example, a storage system includes controllers A, B, and C. Controllers A, B, and C use heartbeat messages to confirm whether the communication status is normal. The storage expansion cabinets managed by controllers A and B have idle hard disks available for allocation (the storage capacity of each hard disk is the same). Controllers A and B can carry their locally stored storage resource tables in the heartbeat messages. The remaining storage capacity of the storage resource table locally stored by controller A is 5 hard disks, and the remaining storage capacity of the storage resource table locally stored by controller B is 8 hard disks. If controller C needs to increase the storage capacity of 10 hard disks, controller C can apply for X hard disks from controller A and Y hard disks from controller B, as long as the total number of hard disks applied for from both (X+Y) is 10.

[0099] In some embodiments, the controllers 100 are connected via a network;

[0100] The first controller 101 is further configured to: send a notification message carrying the remaining storage resource capacity to other controllers 102 according to the locally stored storage resource table at a set period;

[0101] When the original storage resources of the other controllers 102 are insufficient, the other controllers 102 send a request to the first controller 101 to apply for additional storage resources;

[0102] The first controller 101 allocates the extended storage resources to the controller 100 that needs to be expanded through ZONE configuration, specifically including:

[0103] When the original storage resources are insufficient and / or when a request for increasing storage resources is received from other controllers 102, a sum is calculated based on the original storage resource usage ratios carried in the requests by the controllers 100 that need to be expanded; and a total remaining storage capacity is calculated based on the storage capacity of the hard disks that are currently in use and are idle in the storage resource table;

[0104] For each controller 100 that needs to be expanded, execute:

[0105] The storage capacity currently allocated to the controller 100 is obtained by dividing the original storage resource usage ratio of the controller 100 by the sum value and multiplying the ratio by the total remaining storage capacity;

[0106] An expansion target hard disk that satisfies the storage capacity allocated to the controller 100 this time is determined from the hard disks whose current usage status is idle in the storage resource table, and the expansion target hard disk is allocated to the controller 100 as an extended storage resource through ZONE configuration.

[0107] For example, in a storage system, controllers A and B need to be expanded. The current raw storage resource usage ratios of the two controllers are 0.8 and 0.9 respectively. Assuming that the number of free hard disks in the storage resource table saved locally by controller C is 10, the storage capacity allocated by controller C to controller A is 0.8*10 / (0.8+0.9)=5 hard disks, and the storage capacity allocated to controller B is 0.9*10 / (0.8+0.9)=5 hard disks.

[0108] In some embodiments, the first controller 101 is further configured to:

[0109] When it is detected that the user interface triggers the controller shrinking operation, for each controller 100 selected for shrinking, the following operations are executed:

[0110] According to the hard disk ID corresponding to the target hard disk selected for shrinkage this time, the cabinet identifier of the storage expansion cabinet 300 and the identifier of the controller 100, the access permission of the controller 100 to the target hard disk is revoked through the ZONE configuration, the current usage status of the target hard disk in the storage resource table is updated to idle, and the mapping relationship between the identifier of the controller 100 and the target hard disk is deleted.

[0111] By allowing operators to scale down the controllers that need to be scaled down, the scaling needs in more scenarios can be met, such as when communication between controllers is abnormal or the network status is poor.

[0112] In some embodiments, the controllers 100 are connected to each other via a network; when the remaining storage capacity of the original storage resource of the other controller 102 is at least greater than the storage capacity of a hard disk in the occupied extended storage resource, the other controller 102 determines the target hard disk to be shrunk this time according to the remaining storage capacity of the original storage resource and the occupied storage capacity of each hard disk in the extended storage resource, transfers the data stored in the target hard disk to the remaining storage space of the original storage resource, and then sends a request to reduce storage resources to the first controller 101;

[0113] The first controller 101 is also used to: based on the hard disk ID corresponding to the target hard disk carried in the request to reduce storage resources, the cabinet identifier of the storage expansion cabinet 300 and the identifier of the requested controller 102, release the controller 102's access rights to the target hard disk through ZONE configuration, update the current usage status of the target hard disk in the storage resource table to idle, and delete the mapping relationship between the identifier of the controller 102 and the target hard disk.

[0114] For example, in the storage system, the extended storage resources of controller A are composed of some hard disks on two storage expansion cabinets. The number of hard disks occupied by controller A in storage expansion cabinet 1 and storage expansion cabinet 2 are 5 and 8 respectively. The original storage resources of controller A have vacated the storage space of 2 hard disks. Then, controller A can select any two hard disks in the extended storage resources for capacity reduction, transfer the data stored on the two hard disks to the remaining storage space of the original storage resources, delete the data of the two hard disks, and then send the slot numbers of the two hard disks and the storage expansion cabinet number (assuming that the two hard disks of storage expansion cabinet 1 are selected) to the controller that manages storage expansion cabinet 1, and initiate a capacity reduction request to the controller.

[0115] The controller can shrink once when the storage space of one hard disk is freed up in the original storage resource, that is, reduce one hard disk of the extended storage resource; the controller can also shrink once by transferring the data stored on all hard disks of a storage expansion cabinet occupied by the controller in the storage space freed up in the original storage resource. For example, if the original storage resource of the controller A above vacates the storage space of 5 hard disks, the 5 hard disks of the storage expansion cabinet 1 can be released at one time. The embodiment of the present application does not impose any limitation on this.

[0116] In some embodiments, the first controller 101 is further configured to:

[0117] When it is detected that the remaining storage capacity of the original storage resource is at least greater than the storage capacity of one hard disk in the occupied extended storage resource, the target hard disk to be shrunk is determined according to the remaining storage capacity of the original storage resource and the occupied storage capacity of each hard disk in the extended storage resource;

[0118] After transferring the data stored in the shrinking target hard disk to the remaining storage space of the original storage resource, the current usage status of the shrinking target hard disk in the storage resource table is updated to idle, and the mapping relationship between the identifier of the first controller 101 and the shrinking target hard disk is deleted.

[0119] In some embodiments, the first controller 101 is further configured to:

[0120] According to the set cycle, based on the cabinet identifier of each storage expansion cabinet 300 in the storage resource table, when it is determined that the current usage status of all hard disks of a storage expansion cabinet 300 is idle, based on the SMP protocol, through the expander 200 connected to the storage expansion cabinet 300, the enable ZONE function of the storage expansion cabinet 300 is turned off, and the storage expansion cabinet 300 is controlled to enter a sleep state.

[0121] When the hard disk of a storage expansion cabinet is not allocated to any controller for use, that is, when the current controllers do not need to expand capacity, the storage expansion cabinet can be controlled to go offline.

[0122] In some embodiments, the storage expansion cabinet 300 is used to: upon detecting that a new storage expansion cabinet 300 is connected, or upon receiving a new storage expansion cabinet access message reported by other connected storage expansion cabinets 300, send a new storage expansion cabinet access message to the connected expander 200;

[0123] The expander 200 is further configured to: upon receiving the new storage expansion cabinet access message sent by the directly connected storage expansion cabinet 300, report an interrupt signal to the first controller 101 having the right to access the hard disk of the new storage expansion cabinet 300;

[0124] The first controller 101 is also used for: when there are multiple storage expansion cabinets 300 connected to the expander 200 in series, setting the storage expansion cabinet 300 directly connected to the expander 200 to have the highest cascade level, and setting the cascade levels of other storage expansion cabinets 300 to decrease in sequence according to the serial connection order, and saving the corresponding cascade level of each storage expansion cabinet 300 in the storage resource table; when allocating extended storage resources to the controller 100 that needs to be expanded, selecting the hard disk whose current use status of the corresponding storage expansion cabinet 300 is idle as the target hard disk according to the order of the cascade levels of each storage expansion cabinet 300 in the storage resource table from high to low.

[0125] For example, the storage system is connected to three storage expansion cabinets 1, 2, and 3, and storage expansion cabinet 1 is connected to the expander, storage expansion cabinet 2 is connected to storage expansion cabinet 1, and storage expansion cabinet 3 is connected to storage expansion cabinet 2. Then, the cascade level of storage expansion cabinet 1 is the highest, and the cascade level of storage expansion cabinet 3 is the lowest. When expanding the capacity of the controller that needs to be expanded, the idle hard disk on storage expansion cabinet 1 is preferentially selected and allocated to the controller that needs to be expanded as the expansion target hard disk. When the idle hard disks on storage expansion cabinet 1 are all allocated, the idle hard disks on storage expansion cabinet 2 are selected, and finally the idle hard disks on storage expansion cabinet 3 are selected.

[0126] In some embodiments, after allocating the extended storage resource to the controller 100 that needs to be expanded through ZONE configuration each time, the first controller 101 is further configured to:

[0127] The parameters characterizing the enabled ZONE function status of the storage expansion cabinet 300 and the configuration parameters of the number of hard disks allocated this time, the hard disk ID of each hard disk, and the identifier of the controller 100 to be expanded are saved in the non-volatile storage medium of the storage expansion cabinet 300 .

[0128] The non-volatile storage medium is, for example, a flash chip or an EEPROM (Electrically Erasable Programmable Read Only Memory) of a storage expansion cabinet.

[0129] The following is an example Figure 4 The storage system with ZONE function shown in the figure illustrates the expansion and reduction of the controller of the above storage system (Example 1 to Example 6). Controller A and controller B are connected to the same expander. Controller A manages the hard disks (original storage resources) of hard disk group A through the expander. Controller B manages the hard disks of hard disk group B through the expander. A storage expansion cabinet is connected to a storage area of ​​the expander. The storage area is managed by controller A. The storage capacity of the hard disks connected to each storage expansion cabinet is the same.

[0130] Embodiment 1:

[0131] See also Figure 5 , a specific step of expanding the capacity of a controller of a storage system provided in an embodiment of the present application includes:

[0132] The network communication between controller A and controller B is interrupted. The storage expansion cabinet is connected to 24 hard disks. The administrator chooses to add 8 hard disks to the storage resources of controller A and 5 hard disks to the storage resources of controller B on the user interface.

[0133] Step S501: The administrator detects that the original storage resources of controllers A and B have reached the upper limit of usage, and connects a storage expansion cabinet to the expander through a SAS wide port line;

[0134] Step S502: After detecting that the storage expansion cabinet is online, the expander reports an interrupt signal to the controller A;

[0135] Step S503: After receiving the interrupt signal, controller A enables the ZONE function of the storage expansion cabinet through the expander based on the SMP protocol, and forms a ZONE area with the expander;

[0136] Step S504: Controller A identifies storage resources on the storage expansion cabinet, and generates a storage resource table including at least a cabinet identifier of the storage expansion cabinet, a slot number of each hard disk in the storage expansion cabinet, a storage capacity of each hard disk, and a current usage status of each hard disk;

[0137] Step S505: The administrator performs capacity expansion operations on controllers A and B on the user interface;

[0138] Step S506: Controller A detects that the user interface triggers the controller expansion operation. According to the expansion capacity selected by the user for controllers A and B respectively, controller A selects hard disks with slot numbers 01-13 from the storage resource table as expansion target hard disks. Through ZONE configuration, hard disks 01-08 and 09-13 are used as expansion storage resources and are allocated to itself and controller B respectively.

[0139] Step S507: Controller A updates the current usage status of the hard disks with slot numbers 01-13 in the storage resource table as occupied, and establishes mapping relationships between the hard disks with slot numbers 01-08 and itself, and between the hard disks with slot numbers 09-13 and controller B, and saves them to the storage resource table;

[0140] Step S508: Controller A saves the parameters representing the enabled ZONE function status of the storage expansion cabinet, the number of hard disks allocated this time, the slot number of each hard disk, and the configuration parameters of the identifier of the controller to be expanded into the flash chip of the storage expansion cabinet.

[0141] Embodiment 2:

[0142] See also Figure 6 Another specific step of expanding the capacity of a controller of a storage system provided in an embodiment of the present application includes:

[0143] Assume that controller A is connected to controller B through a network, the storage expansion cabinet has been pre-connected to the expander, and the number of hard disks connected to the storage expansion cabinet can meet the expansion requirements of controllers A and B;

[0144] Step S601: After detecting that the storage expansion cabinet is online, the expander reports an interrupt signal to the controller A;

[0145] Step S602: After receiving the interrupt signal, controller A enables the ZONE function of the storage expansion cabinet through the expander based on the SMP protocol, and forms a ZONE area with the expander;

[0146] Step S603: Controller A identifies storage resources on the storage expansion cabinet, and generates a storage resource table including at least a cabinet identifier of the storage expansion cabinet, a slot number of each hard disk in the storage expansion cabinet, a storage capacity of each hard disk, and a current usage status of each hard disk;

[0147] Step S604: Controller A sends a notification message carrying the remaining storage resource capacity to controller B according to the locally stored storage resource table at a set period;

[0148] Step S605: Controller B detects that the remaining storage capacity of its original storage resources is less than a threshold value, and sends a request to controller A to increase storage resources according to the notification message received most recently;

[0149] Step S606: Controller A receives the request for increasing storage resources sent by controller B, and simultaneously detects that the remaining storage capacity of its own original storage resources is less than a threshold, determines that it needs to increase storage resources, and calculates a sum value according to its own original storage resource usage ratio and the original storage resource usage ratio of controller B carried in the request for increasing storage resources;

[0150] Step S607: Controller A determines the sum of remaining storage capacities according to the storage capacities of the hard disks that are currently in idle state in the storage resource table;

[0151] It should be noted that step S606 and step S607 can be performed successively or simultaneously.

[0152] Step S608: Controller A calculates the storage capacity allocated to controller B and itself respectively according to its own original storage resource usage ratio, controller B's original storage resource usage ratio, the sum value, and the sum of the remaining storage capacity;

[0153] The storage capacity allocated to controller A = the original storage resource usage ratio of controller A / the sum of the value*the sum of the remaining storage capacity; the storage capacity allocated to controller B = the original storage resource usage ratio of controller B / the sum of the value*the sum of the remaining storage capacity;

[0154] For example, if the original storage resources of controller A are 10 hard disks, and 8 hard disks are in use, the original storage resource usage ratio of controller A is 0.80; the original storage resources of controller B are 12 hard disks, and 10 hard disks are in use, the original storage resource usage ratio of controller B is 0.83, and the sum is 0.80+0.83=1.63; there are 15 hard disks in the current usage status of the storage resource table that are idle, and the number of hard disks allocated to controller A and controller B is 8 and 7 respectively.

[0155] Step S609: Controller A determines the expansion target hard disk of the storage capacity allocated to controller B from the hard disks currently in use and in idle state in the storage resource table, allocates the expansion target hard disk as an extended storage resource to controller B through ZONE configuration, and allocates the remaining idle hard disks in the storage resource table except those allocated to controller B as extended storage resources to itself;

[0156] Step S610: Controller A updates the current usage status of the hard disks currently allocated to itself and controller B in the storage resource table as occupied, and establishes a mapping relationship between the hard disk currently allocated to itself and itself, and between the hard disk allocated to controller B and controller B, and saves the mapping relationship to the storage resource table;

[0157] Step S611, controller A saves the parameters representing the enabled ZONE function status of the storage expansion cabinet, the number of hard disks allocated this time, the slot number of each hard disk, and the configuration parameters of the identifier of the controller to be expanded into the flash chip of the storage expansion cabinet.

[0158] Embodiment three:

[0159] See also Figure 7 Another specific step of expanding the capacity of a controller of a storage system provided in an embodiment of the present application includes:

[0160] Controller A and controller B are connected through the network. Two storage expansion cabinets have been pre-connected to the storage system, namely storage expansion cabinet 1 and 2. Storage expansion cabinet 2 is connected to storage expansion cabinet 1, and storage expansion cabinet 1 is connected to the expander ( Figure 4 (not shown), controller A has identified the storage resources of storage expansion cabinet 1, but has not yet identified the storage resources of storage expansion cabinet 2; the number of hard disks in storage expansion cabinets 1 and 2 are 10 and 12 respectively;

[0161] Step S701: Storage expansion cabinet 1 detects that a new storage expansion cabinet is connected, and sends a new storage expansion cabinet access message to the expander;

[0162] Step S702: When receiving a message indicating that a new storage expansion cabinet has been connected, the expander reports an interrupt signal to the controller A.

[0163] Step S703: After receiving the interrupt signal, controller A enables the ZONE function of storage expansion cabinet 2 through the expander based on the SMP protocol, and forms a ZONE area with the expander and storage expansion cabinet 1;

[0164] Step S704: Controller A identifies the storage resources on the storage expansion cabinet 2, adds the storage resources of the storage expansion cabinet 2 to the locally stored storage resource table, and sets the cascading level of the storage expansion cabinet 1 to level 1 and the cascading level of the storage expansion cabinet 2 to level 2 in the storage resource table;

[0165] Step S705: Controller A sends a heartbeat message carrying a locally stored storage resource table to controller B according to a set period;

[0166] Step S706: Controller B detects that its original storage resources have reached the upper limit, determines the size of storage resources to be increased based on the storage resource table recently received, and sends a request to controller A to increase 10 hard disks;

[0167] In this step, controller B may determine the number of hard disks to be added according to the usage ratio of the original storage resources and the total storage capacity of the remaining idle hard disks in the storage resource table and in accordance with preset rules.

[0168] Step S707: Controller A detects that its original storage resources have reached the upper limit of usage, and determines that it needs to add 8 hard disks according to the locally stored storage resource table;

[0169] Step S708: Controller A determines that the number of idle hard disks at the first cascade level is 10 according to the storage resource table, and allocates these 10 hard disks as extended storage resources to controller B through ZONE configuration, and selects 8 idle hard disks at the second cascade level to allocate to itself;

[0170] In this step, you can also select 8 free hard disks with a cascade level of one and assign them to yourself, and the remaining 2 to controller B, and then select 8 free hard disks with a cascade level of two and assign them to controller B. This application does not impose any restrictions on this.

[0171] Step S709: Controller A updates the current usage status of the hard disk allocated this time in the storage resource table as occupied, and establishes mapping relationships between the identifiers of controllers A and B and the hard disk allocated this time, and saves them to the storage resource table;

[0172] Step S710: Controller A saves the parameters representing the enabled ZONE function status of the storage expansion cabinet, the number of hard disks allocated this time, the slot number of each hard disk, and the configuration parameters of the identifier of the controller to be expanded into the flash chip of the storage expansion cabinet.

[0173] Embodiment 4:

[0174] See also Figure 8 , a specific step of reducing the capacity of a controller of a storage system provided in an embodiment of the present application includes:

[0175] Through the above Figure 5 In the specific steps of reducing the capacity of the controller of the storage system shown in the figure, the administrator has added 8 hard disks of extended storage resources to controller A and 5 hard disks of extended storage resources to controller B on the user interface;

[0176] Step S801: The administrator monitors that the remaining storage capacity of the original storage resource of controller B is at least greater than the storage capacity of one hard disk in the occupied extended storage resource, and determines the target hard disk to be shrunk this time according to the remaining storage capacity of the original storage resource of controller B and the occupied storage capacity of each hard disk in the extended storage resource;

[0177] Step S802: The administrator performs a data transfer operation on the controller B on the user interface, and the controller B transfers the data stored in the reduced target hard disk to the remaining storage space of the original storage resource;

[0178] Step S803: The administrator performs a scaling operation on controller B on the user interface;

[0179] Step S804, controller A detects that the user interface triggers the controller shrinking operation, and according to the slot number corresponding to the shrinking target hard disk selected for shrinking this time, the cabinet ID of the storage expansion cabinet and the ID of controller B, controller B is released from access to the shrinking target hard disk through ZONE configuration, the current usage status of the shrinking target hard disk in the storage resource table is updated to idle, and the mapping relationship between the ID of controller B and the shrinking target hard disk is deleted;

[0180] Step S805, controller A polls each hard disk in the storage resource table according to the set cycle. When the current usage status of all hard disks is idle, based on the SMP protocol, the controller A turns off the enable ZONE function of the storage expansion cabinet through the expander and controls the storage expansion cabinet to enter the sleep state.

[0181] Embodiment five:

[0182] See also Fig. 9 Another specific step of reducing the capacity of a controller of a storage system provided in an embodiment of the present application includes:

[0183] Through the above Figure 6 or Figure 7 In the specific steps of reducing the capacity of the controller of the storage system shown, controller A has added extended storage resources to controller B;

[0184] Step S901, controller B detects that the remaining storage capacity of its original storage resource is at least greater than the storage capacity of one hard disk in the occupied extended storage resource, and determines the target hard disk to be shrunk this time according to the remaining storage capacity of the original storage resource and the occupied storage capacity of each hard disk in the extended storage resource;

[0185] Step S902: After the controller B transfers the data stored in the target hard disk to the remaining storage space of the original storage resource, it sends a request to reduce the storage resource to the controller A;

[0186] Step S903, controller A releases controller B's access to the target hard disk through ZONE configuration according to the slot number corresponding to the target hard disk for shrinking carried in the storage resource reduction request sent by controller B, the cabinet identifier of the storage expansion cabinet, and the identifier of controller B, updates the current usage status of the target hard disk for shrinking in the storage resource table to idle, and deletes the mapping relationship between the identifier of controller B and the target hard disk for shrinking;

[0187] Step S904, controller A polls each hard disk in the storage resource table according to the set cycle. When the current usage status of all hard disks is idle, based on the SMP protocol, the enable ZONE function of the storage expansion cabinet is turned off through the expander, and the storage expansion cabinet is controlled to enter the sleep state.

[0188] Embodiment six:

[0189] See also Fig.10 Another specific step of reducing the capacity of a controller of a storage system provided in an embodiment of the present application includes:

[0190] Through the above Figure 6 or Figure 7 In the specific steps of reducing the capacity of the controller of the storage system shown, controller A has added extended storage resources to itself;

[0191] Step S1001, controller A detects that the remaining storage capacity of its original storage resource is at least greater than the storage capacity of one hard disk in the occupied extended storage resource, and determines the target hard disk to be shrunk this time according to the remaining storage capacity of the original storage resource and the occupied storage capacity of each hard disk in the extended storage resource;

[0192] Step S1002: After controller A transfers the data stored in the target hard disk to the remaining storage space of the original storage resource, it updates the current usage status of the target hard disk in the storage resource table to idle, and deletes the mapping relationship between its own identifier and the target hard disk;

[0193] Step S1003, controller A polls each hard disk in the storage resource table according to the set cycle. When the current usage status of all hard disks is idle, based on the SMP protocol, the enable ZONE function of the storage expansion cabinet is turned off through the expander, and the storage expansion cabinet is controlled to enter a dormant state.

[0194] Embodiment seven:

[0195] For example Fig.11 The storage system shown includes controllers A, B, and C, expanders A, B, and C, storage expansion cabinets A and B, controller A is connected to expander A, controller B is connected to expander B, controller C is connected to expander C, storage expansion cabinet A is connected to expander A, and storage expansion cabinet B is connected to expander B; controller A has pre-identified the storage resources of storage expansion cabinet A and generated storage resource table A; controller B has pre-identified the storage resources of storage expansion cabinet B and generated storage resource table B; controllers A, B, and C are connected via a network; there are 5 free hard disks remaining in storage resource table A, and there are 24 free hard disks remaining in storage resource table, to illustrate the expansion and reduction of the controller of the storage system.

[0196] See also Fig.12 The embodiment of the present application provides a specific step of expanding or shrinking the capacity of a controller of a storage system, including:

[0197] Step S1101, controller C detects that the remaining storage capacity of its original storage resources is less than a threshold value, and determines that it needs to increase its storage resources by 12 hard disks according to the latest storage resource tables A and B received from controllers A and B;

[0198] Step S1102: Controller C sends a storage resource request for adding 5 hard disks to controller A, and sends a storage resource request for adding 7 hard disks to controller B;

[0199] Step S1103: Controller A determines five idle hard disks from the hard disks whose current use status is idle in storage resource table A according to the storage capacity requested by controller C, allocates the five idle hard disks as extended storage resources to controller C through ZONE configuration, updates the current use status of the five hard disks in storage resource table A to occupied, establishes a mapping relationship between the identifier of controller C and the five hard disks, and saves it to storage resource table A;

[0200] Step S1104: Controller B determines 7 free hard disks from the hard disks currently in use status as free in storage resource table B according to the storage capacity requested by controller C, allocates these 7 free hard disks as extended storage resources to controller C through ZONE configuration, updates the current use status of these 7 hard disks in storage resource table B as occupied, establishes a mapping relationship between the identifier of controller C and these 7 hard disks, and saves it to storage resource table B;

[0201] Step S1105: Controller A sends the updated storage resource table A to controllers B and C, and saves the configuration parameters of the number of hard disks allocated this time, the slot number of each hard disk, and the identifier of controller C to the flash chip of storage expansion cabinet A; Controller B sends the updated storage resource table B to controllers A and C, and saves the configuration parameters of the number of hard disks allocated this time, the slot number of each hard disk, and the identifier of controller C to the flash chip of storage expansion cabinet B;

[0202] Step S1106: Controller A detects that the remaining storage capacity of its original storage resources is less than a threshold value, and determines that it needs to increase its storage resources by 10 hard disks according to the latest storage resource table C sent by controller B and the locally stored resource table A;

[0203] Step S1107: Controller A sends a storage resource request for adding 10 hard disks to controller B;

[0204] Step S1108: Controller B determines 10 idle hard disks from the hard disks currently in use status as idle in storage resource table B according to the storage capacity requested by controller A, allocates these 10 idle hard disks as extended storage resources to controller A through ZONE configuration, updates the current use status of these 10 hard disks in storage resource table B to occupied, establishes a mapping relationship between the identifier of controller A and these 10 hard disks, and saves it to storage resource table B;

[0205] Step S1109: Controller B sends the updated storage resource table B to controllers A and C, and saves the configuration parameters of the number of hard disks allocated this time, the slot number of each hard disk, and the identifier of controller A into the flash chip of storage expansion cabinet B;

[0206] Step S1110: Controller C detects that the remaining storage capacity of its original storage resource is at least greater than the storage capacity of one hard disk in the occupied extended storage resource, and determines that the five hard disks in the extended storage resource need to be reduced in capacity according to the remaining storage capacity of the original storage resource and the occupied storage capacity of each hard disk in the extended storage resource.

[0207] Step S1111: After transferring the data stored in the five hard disks to the remaining storage space of the original storage resources, the controller C sends a request to the controller A to apply for reducing the storage resources of the five hard disks;

[0208] Controller C previously applied for expanded storage resources of 5 hard disks from controller A, and can just release the storage space of these 5 hard disks.

[0209] Step S1112: Controller A, based on the slot numbers corresponding to the five hard disks, the cabinet identifier of the storage expansion cabinet, and the identifier of controller C carried in the storage resource reduction request received from controller C, releases controller C's access rights to the five hard disks through ZONE configuration, updates the current usage status of the five hard disks in the storage resource table to idle, and deletes the mapping relationship between the identifier of controller C and the five hard disks.

[0210] It should be noted that after completing the update of storage resource table A, controller A will send the updated storage resource table A to controllers B and C respectively.

[0211] Step S1113, controller A polls each hard disk in storage resource table A according to a set period, and when it is determined that all hard disks are idle, based on the SMP protocol, through expander A, turns off the enable ZONE function of storage expansion cabinet A, and controls storage expansion cabinet A to enter a sleep state; and controller B polls each hard disk in storage resource table B according to a set period, and when it is determined that all hard disks are idle, based on the SMP protocol, through expander B, turns off the enable ZONE function of storage expansion cabinet B, and controls storage expansion cabinet B to enter a sleep state.

[0212] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A storage system, characterized in that: include: at least one controller, at least one expander; Each of the controllers is connected to the corresponding expander via a SAS port; all the expanders form a ZONE area by enabling the ZONE function, and any controller accesses the storage resources in the ZONE area through the ZONE configuration; The expander is used to: when detecting that a storage expansion cabinet is connected, report an interrupt signal to a first controller that has the right to access the hard disk of the storage expansion cabinet; The first controller is used to: after receiving the interrupt signal, based on the SMP protocol, enable the ZONE function of the storage expansion cabinet through the expander that reports the interrupt signal, so that the storage expansion cabinet is added to the ZONE area, so that any controller has the right to access the corresponding hard disk in the storage expansion cabinet allocated to it as an extended storage resource; and The first controller also generates a storage resource table including at least a cabinet identifier of the storage expansion cabinet, a hard disk ID of each hard disk in the storage expansion cabinet, a storage capacity of each hard disk, and a current usage status of each hard disk; The first controller determines the expansion target hard disk from the hard disks whose current usage status is idle based on the storage resource table saved locally, uses the expansion target hard disk as the extended storage resource, and allocates the extended storage resource to the controller that needs to be expanded through the ZONE configuration; updates the current usage status of the target hard disk in the storage resource table to occupied, and establishes a mapping relationship between the identifier of the controller to be expanded and the allocated expansion target hard disk, and saves it to the storage resource table.

2. The system according to claim 1, characterized in that The first controller allocates the extended storage resource to the controller that needs to be expanded through ZONE configuration, specifically including: When the user interface is detected to trigger a controller expansion operation, for each controller selected for expansion, based on the expansion capacity selected for the controller, an expansion target hard disk that meets the storage capacity required by the controller is determined from the hard disks whose current usage status is idle in the locally saved storage resource table, and the expansion target hard disk is allocated to the controller as an expanded storage resource through ZONE configuration.

3. The system according to claim 1, characterized in that The controllers are connected via a network; The first controller is further used to: send a heartbeat message to other controllers according to a set period, carrying the storage resource table stored locally; When the original storage resources are insufficient, other controllers determine the size of the storage resources to be increased according to the storage resource table; and send a request to increase the storage resources to the first controller; The first controller allocates the extended storage resource to the controller that needs to be expanded through ZONE configuration, specifically including: When its own original storage resources are insufficient and / or when receiving a request to increase storage resources from other controllers, based on its own storage capacity that needs to be expanded and / or the storage capacity requested by the requesting controller, an expansion target hard disk that meets the expansion requirements is determined from the hard disks that are currently idle in the storage resource table, and the expansion target hard disk is allocated as an extended storage resource to itself and / or the requesting controller through ZONE configuration.

4. The system according to claim 1, characterized in that The controllers are connected via a network; The first controller is further configured to: send a notification message carrying the remaining storage resource capacity to other controllers according to the locally stored storage resource table at a set period; When the original storage resources of other controllers are insufficient, they send a request to the first controller to increase storage resources; The first controller allocates the extended storage resource to the controller that needs to be expanded through ZONE configuration, specifically including: When the original storage resources are insufficient and / or when a request for increasing storage resources is received from other controllers, a sum is calculated based on the original storage resource usage ratios carried in the requests of the controllers that need to be expanded; and a total remaining storage capacity is calculated based on the storage capacity of the hard disks that are currently in use and are idle in the storage resource table; For each controller that needs to be expanded, execute: The original storage resource usage ratio of the controller is divided by the sum value to obtain a ratio, and the ratio is multiplied by the total remaining storage capacity to obtain the storage capacity allocated to the controller this time; An expansion target hard disk that satisfies the storage capacity allocated to the controller this time is determined from the hard disks whose current usage status is idle in the storage resource table, and the expansion target hard disk is allocated to the controller as an extended storage resource through ZONE configuration.

5. The system according to claim 1, characterized in that The first controller is also used for: When the user interface triggers the controller scaling down operation, for each selected controller to be scaled down, execute the following: According to the hard disk ID corresponding to the target hard disk selected for shrinkage this time, the cabinet ID of the storage expansion cabinet and the ID of the controller, the controller's access permission to the target hard disk is revoked through ZONE configuration, the current usage status of the target hard disk in the storage resource table is updated to idle, and the mapping relationship between the controller's ID and the target hard disk is deleted.

6. The system according to claim 1, characterized in that The controllers are connected via a network; When the remaining storage capacity of the original storage resource of the other controller is at least greater than the storage capacity of one hard disk in the occupied extended storage resource, the other controller determines the target hard disk to be shrunk this time according to the remaining storage capacity of the original storage resource and the occupied storage capacity of each hard disk in the extended storage resource, transfers the data stored in the target hard disk to the remaining storage space of the original storage resource, and then sends a request to reduce storage resources to the first controller; The first controller is also used to: based on the hard disk ID corresponding to the target hard disk carried in the request to reduce storage resources, the cabinet identifier of the storage expansion cabinet and the identifier of the requested controller, release the controller's access rights to the target hard disk through ZONE configuration, update the current usage status of the target hard disk in the storage resource table to idle, and delete the mapping relationship between the controller's identifier and the target hard disk.

7. The system according to claim 1, characterized in that The first controller is also used for: When it is detected that the remaining storage capacity of the original storage resource is at least greater than the storage capacity of one hard disk in the occupied extended storage resource, the target hard disk to be shrunk is determined according to the remaining storage capacity of the original storage resource and the occupied storage capacity of each hard disk in the extended storage resource; After transferring the data stored in the shrinking target hard disk to the remaining storage space of the original storage resource, the current usage status of the shrinking target hard disk in the storage resource table is updated to idle, and the mapping relationship between the identifier of the first controller and the shrinking target hard disk is deleted.

8. The system according to any one of claims 5 to 7, characterized in that: The first controller is also used for: According to the set cycle, based on the cabinet identifier of each storage expansion cabinet in the storage resource table, when it is determined that the current usage status of all hard disks of a storage expansion cabinet is idle, based on the SMP protocol, through the expander connected to the storage expansion cabinet, the enable ZONE function of the storage expansion cabinet is turned off, and the storage expansion cabinet is controlled to enter a sleep state.

9. The system according to claim 1, characterized in that The storage expansion cabinet is used to: when detecting that a new storage expansion cabinet is connected, or receiving a new storage expansion cabinet access message reported by other connected storage expansion cabinets, send a new storage expansion cabinet access message to the connected expander; The expander is further used to: upon receiving the new storage expansion cabinet access message sent by the directly connected storage expansion cabinet, report an interrupt signal to the first controller having the right to access the hard disk of the new storage expansion cabinet; The first controller is further used for: when multiple storage expansion cabinets are connected to the expander in series, setting the storage expansion cabinet directly connected to the expander to have the highest cascade level, setting the cascade levels of other storage expansion cabinets to decrease in sequence according to the serial connection order, and saving the corresponding cascade level of each storage expansion cabinet in the storage resource table; When allocating expansion storage resources for the controller that needs to be expanded, according to the cascade levels of the storage expansion cabinets in the storage resource table from high to low, select the hard disk whose current usage status is idle in the corresponding storage expansion cabinet as the target hard disk.

10. The system according to claim 1, characterized in that After allocating the extended storage resource to the controller that needs to be expanded through ZONE configuration each time, the first controller is further configured to: The parameters characterizing the enabled ZONE function status of the storage expansion cabinet and the configuration parameters of the number of hard disks allocated this time, the hard disk ID of each hard disk, and the identifier of the controller to be expanded are saved in the non-volatile storage medium of the storage expansion cabinet.

Citation Information

Patent Citations

  • Memory system as well as access method and access device thereof

    CN105786414A

  • Double-controller storage extension cabinet cascade method

    CN107315541A

  • Storage expansion cabinet

    CN109614353A

  • Hard disk protection device, method and system

    CN110674539A

  • Cluster system control method and cluster system

    CN111045602A