A method and device for determining storage software
By determining the target storage software in priority order for multiple controllers in the storage device, ensuring software differentiation of at least two controllers, the reliability problems caused by the deployment of the same software by multiple controllers in the prior art are solved, and the reliability and business continuity of the storage device are improved.
Patent Information
- Application Number
- CN202211056863.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-31
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2042-08-31
AI Technical Summary
Multiple controllers in existing storage devices deploy the same software, resulting in the failure of all controllers if the same exception occurs, resulting in business interruptions and data loss, reducing the reliability of the storage device.
By determining its target storage software for each controller in priority order in the storage device, ensuring that the target storage software of at least two controllers corresponds to different operating systems (OSs), thereby making differences between controllers and avoiding failure of all controllers due to the same exception.
Improve the reliability of storage devices, prevent business interruptions and data loss caused by single point of failure, and ensure the business continuity of storage devices.
Smart Images

Figure CN115391104B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data storage, and in particular to a method and device for determining storage software. Background Art
[0002] High-end storage users have high requirements for the reliability of storage systems. The controller is one of the core components of the storage system, completing key functions such as data transmission and reception, data storage and data protection. Usually, in order to ensure the reliability of storage devices, a storage device is equipped with multiple controllers. When any controller fails, other controllers will take over the business of the failed controller to ensure business continuity.
[0003] In the prior art, storage devices include multiple controllers, such as dual controllers, quad controllers, etc., and the multiple controllers generally deploy the same software to reduce software complexity. However, because the software on the multiple controllers is not differentiated, the same exception may cause all controllers in the storage device to fail to work, further causing business interruption or even data loss, reducing the reliability of the storage device. Summary of the invention
[0004] The present application provides a method and apparatus for determining storage software to improve the reliability of a storage device.
[0005] The technical solutions provided in this application include:
[0006] In a first aspect, an embodiment of the present application provides a method for determining storage software, the method being applied to a management device for managing and controlling a storage device, the storage device comprising N controllers, N being greater than 1, the method comprising:
[0007] Select a controller with the highest priority from the N controllers, and use the selected controller as the current controller; if the number M of current controllers is 1, select the storage software with the highest priority from the storage software associated with the current controller as the target storage software of the current controller; if the number M of current controllers is greater than 1, select M storage software from the storage software associated with the current controller in descending order of priority as the target storage software of the M current controllers;
[0008] Check whether there is a controller among the N controllers that meets the following conditions: the priority of the controller is less than the priority of the current controller and the priority of the controller is closest to the priority of the current controller;
[0009] If so, the controller that meets the conditions is used as the current controller. If the number M of current controllers is 1, then according to the principle that at least the target storage software of the previous controller corresponds to a different OS, select the storage software that meets the principles and has the highest priority from the storage software associated with the current controller as the target storage software of the current controller. If the number M of current controllers is greater than 1, according to the principle that the target storage software of the previous controller corresponds to a different OS, select M storage software that meets the principles from the storage software associated with the current controller in order from high to low priority as the target storage software of the M current controllers respectively, and return to the step of checking whether there is a controller that meets the conditions among the N controllers.
[0010] Optionally, the method further includes: the N controllers are controllers with different priorities; and the target storage software of the N controllers are storage software corresponding to different OSs.
[0011] Optionally, the method further includes: the N controllers are controllers with the same priority;
[0012] If the number K1 of storage software associated with the N controllers is less than N, then if K1 is equal to at least K1 of the target storage software of the N controllers, the target storage software of the K1 controllers corresponds to different OSs, and the priorities of the target storage software of the K1 controllers are different;
[0013] If K1 is equal to N, the target storage software of the N controllers is storage software corresponding to different OS;
[0014] If K1 is greater than N, the target storage software of the N controllers are N storage software selected from the storage software associated with the controller in descending order of priority, and the target storage software of the N controllers correspond to different OSs.
[0015] Optionally, the method further includes:
[0016] If the N controllers include multiple groups of controllers with the same priority, then for each group of controllers with the same priority, if the number of controllers L in the group of controllers is less than the number K2 of storage software associated with the controller, the target storage software of the L controllers is L storage software selected from the storage software associated with the group of controllers in order from high to low priority, and the target storage software of the L controllers corresponds to different OSs;
[0017] If the L is equal to the K2, the target storage software of the L controllers is storage software corresponding to different OS;
[0018] If the L is greater than the K2, the target storage software of at least K2 controllers among the L controllers corresponds to different OSs, and the priorities of the target storage software of the K2 controllers are different.
[0019] Optionally, the N controllers include at least one of a controller on which storage software is not installed and a controller on which storage software is installed and the installed storage software needs to be adjusted.
[0020] In a second aspect, an embodiment of the present application provides a storage software determination device, the device being applied to a management device for managing and controlling a storage device, the storage device comprising N controllers, N being greater than 1, the device comprising:
[0021] A first determination module is used to select a controller with the highest priority from the N controllers, and use the selected controller as the current controller; if the number M of current controllers is 1, then select the storage software with the highest priority from each storage software associated with the current controller as the target storage software of the current controller; if the number M of current controllers is greater than 1, then select M storage software from each storage software associated with the current controller in descending order of priority as the target storage software of the M current controllers;
[0022] A checking module, used for checking whether there is a controller among the N controllers that meets the following conditions: the priority is lower than the priority of the current controller and the priority is closest to the priority of the current controller;
[0023] The second determination module is used to, if yes, use the controller that meets the condition as the current controller; if the number M of current controllers is 1, then according to the principle that at least the target storage software of the previous controller corresponds to a different OS, select the storage software that meets the principle and has the highest priority from the storage software associated with the current controller as the target storage software of the current controller; if the number M of current controllers is greater than 1, according to the principle that the target storage software of the previous controller corresponds to a different OS, and in order from high to low priority, select M storage software that meets the principle from the storage software associated with the current controller as the target storage software of the M current controllers respectively, and return to the step of checking whether there is a controller that meets the condition among the N controllers.
[0024] Optionally, the N controllers are controllers with different priorities; and the target storage software of the N controllers is storage software corresponding to different OSs.
[0025] Optionally, the N controllers are controllers with the same priority, and the device further includes:
[0026] The third determination module is used for:
[0027] If the number K1 of storage software associated with the N controllers is less than N, then the target storage software of at least K1 controllers among the N controllers corresponds to different OSs, and the priorities of the target storage software of the K1 controllers are different;
[0028] If K1 is equal to N, the target storage software of the N controllers is storage software corresponding to different OS;
[0029] If K1 is greater than N, the target storage software of the N controllers are N storage software selected from the storage software associated with the controller in descending order of priority, and the target storage software of the N controllers correspond to different OSs.
[0030] Optionally, the device further comprises:
[0031] The fourth determination module is used for:
[0032] If the N controllers include multiple groups of controllers with the same priority, then for each group of controllers with the same priority, if the number of controllers L in the group of controllers is less than the number K2 of storage software associated with the controller, the target storage software of the L controllers is L storage software selected from the storage software associated with the group of controllers in order from high to low priority, and the target storage software of the L controllers corresponds to different OSs;
[0033] If the L is equal to the K2, the target storage software of the L controllers is storage software corresponding to different OS;
[0034] If the L is greater than the K2, the target storage software of at least K2 controllers among the L controllers corresponds to different OSs, and the priorities of the target storage software of the K2 controllers are different.
[0035] Optionally, the N controllers include at least one of a controller on which storage software is not installed and a controller on which storage software is installed and the installed storage software needs to be adjusted.
[0036] It can be seen from the above technical scheme that in the present application, the corresponding target storage software is determined for each controller according to the priority order of N controllers. When determining the corresponding target storage software for each controller based on this order, the target storage software corresponding to the controller is determined according to the priority of the storage software associated with the controller and according to the principle of corresponding to a different OS from the target storage software of at least the previous controller. As a result, there are at least two controllers among the N controllers whose target storage software corresponds to different OSs, so that there are differences between the N controllers in the storage device, avoiding the same exception causing all controllers in the storage device to fail to work, thereby improving the reliability of the storage device. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A schematic diagram of an implementation environment involved in a method for determining storage software provided in the present application;
[0038] Figure 2 A flowchart of a method for determining storage software provided by the present application;
[0039] Figure 3 A flowchart for determining the priorities of N controllers provided in this application;
[0040] Figure 4 A schematic diagram of storage software associated with the controller provided in the present application;
[0041] Figure 5 A schematic diagram of the structure of a storage software determination device provided by the present application;
[0042] Figure 6 A schematic diagram of the structure of an electronic device provided in this application. DETAILED DESCRIPTION
[0043] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0044] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0045] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0046] The method provided in the present application is applied to a management device for managing and controlling a storage device. Here, the storage device may include N controllers, where N is greater than 1. As an embodiment, the N controllers may be the same controllers (for example, the hardware architecture information is the same). As another embodiment, the N controllers may also be N heterogeneous controllers, or at least two heterogeneous controllers.
[0047] In this embodiment, the so-called heterogeneous controller can be characterized by the differentiated design of the controller. For example, controllers using different design schemes are heterogeneous controllers. Optionally, the differentiated design of the controller can be reflected by different hardware architecture information or other means, which is not specifically limited in this embodiment. As for controllers with different hardware architecture information, they can be controllers based on processors (CPUs) from different manufacturers.
[0048] In this application, the above-mentioned management device is named for the convenience of description and is not used for limitation. When the management device is specifically implemented, it can be an electronic device. The electronic device can be a user computer, a notebook, etc. Here, the management device is only exemplarily described and is not specifically limited.
[0049] Optionally, the management device may be a device for managing the storage device.
[0050] In application, the management device can be connected to the storage device through an Ethernet switch to manage all controllers in the connected storage device. Figure 1 As shown in the example, the management device 11 is connected to the controller 13 , the controller 14 , the controller 15 and the controller 16 respectively through the Ethernet switch 12 .
[0051] As another embodiment, when storage software has been installed in multiple controllers of the storage device, the management device may also be any controller in the storage device in which the storage software has been installed. This embodiment does not specifically limit the management device.
[0052] The method provided in the embodiments of the present application is described below.
[0053] See also Figure 2 , Figure 2 1 is a flowchart of a method for determining storage software shown in an exemplary embodiment of the present application. The method is applied on a management device and includes the following steps:
[0054] Step 101: Select a controller with the highest priority from N controllers, and use the selected controller as the current controller.
[0055] In one embodiment, the priority order of the controllers may be preset by a developer, for example, a storage device has N controllers, namely controller 1, controller 2, controller 3, and controller 4. The priority order of controller 1, controller 2, controller 3, and controller 4 is: controller 1>controller 2>controller 3>controller 4. This embodiment does not limit the priority order of the controllers.
[0056] In another embodiment, the priority order of the controllers can also be obtained by sorting according to a preset rule. The preset rule sorting here is, for example, the priority corresponding to the preset hardware architecture information of the controller, where the hardware architecture information is used to represent the hardware characteristics of the controller. How to obtain the priority of the controller by the priority corresponding to the preset hardware architecture information of the controller, as shown below Figure 3 Steps 201-202 are described in detail and will not be repeated here.
[0057] Based on the priority order of the controllers, as an embodiment, this step 101 can select the controller with the highest priority from the N controllers and use the selected controller as the current controller. Then, the following step 102 is performed.
[0058] Step 102: If the number M of the current controllers is 1, then the storage software with the highest priority is selected from the storage software associated with the current controller as the target storage software of the current controller.
[0059] In this embodiment, any controller will have associated storage software. Here, the storage software associated with the controller refers to the storage software that can be run on the controller. In this embodiment, the storage software associated with the controller will also be set with a corresponding priority.
[0060] In one embodiment, the priority order of storage software associated with the controller may be preset by a developer. For example, the priority order of storage software associated with the controller preset by the developer is as follows: Figure 4 As shown, the priority order of storage software associated with controller 1 is: storage software A1>A2>…>Am>…, the priority order of storage software associated with controller 2 is: storage software B1>B2>…>Bm>…; …the priority order of storage software associated with controller n is: storage software n1>n2>…>nm>….
[0061] In another embodiment, the storage software priority order associated with the controller can be set based on a pre-set arrangement order of the storage software corresponding to each hardware architecture information, for example: obtaining the storage software priority order corresponding to the hardware architecture information of the current controller from a pre-configured storage software priority sequence table corresponding to each hardware architecture information.
[0062] For example, if the storage software priority sequence table associated with the controller corresponding to the hardware architecture information A is A1>A2>...>Am>...; the storage software priority sequence table associated with the controller corresponding to the hardware architecture information B is B1>B2>...>Bm>...; ... the storage software priority sequence table associated with the controller corresponding to the hardware architecture information n is n1>n2>...>nm>.... If the hardware architecture information corresponding to controller 1, controller 2, ...controller n is A, B, ...n respectively, then: Figure 4 As shown, the priority order of storage software associated with controller 1 is: storage software A1>A2>…>Am>…, the priority order of storage software associated with controller 2 is: storage software B1>B2>…>Bm>…; …the priority order of storage software associated with controller n is: storage software n1>n2>…>nm>….
[0063] As described in step 102, if the number M of current controllers is 1, then the storage software with the highest priority is selected from the storage software associated with the current controller as the target storage software of the current controller. Figure 4 In the controller 1 shown, the storage software associated with the controller 1 are arranged in descending order of priority as follows: storage software A1, A2...Am..., and the storage software A1 with the highest priority is used as the target storage software of the controller 1. Figure 4 The priority order of storage software associated with the controller in the example may be preset by a developer, or may be determined based on preset information of each hardware architecture.
[0064] Step 103 : if the number M of current controllers is greater than 1, then M storage software are selected from the storage software associated with the current controllers in descending order of priority as target storage software of the M current controllers.
[0065] For example: the current number of controllers is 2, if they are controller 1 and controller 2, the storage software associated with controller 1 and controller 2 are sorted from high to low in priority as follows: storage software A1, A2...Am..., then the first two storage software A1 and A2 with the highest to lowest priority are used as the target storage software of controller 1 and controller 2 respectively.
[0066] It should be noted that there is no fixed time sequence between step 103 and the above step 102.
[0067] The above describes an example of the process of determining the target storage software by the controller with the highest priority among N controllers. It is also necessary to determine whether there are controllers with other priorities except the controller with the highest priority. Therefore, the following step 104 needs to be executed.
[0068] Step 104, check whether there is a controller among the N controllers that meets the following conditions: the priority is less than the priority of the current controller and the priority is closest to the priority of the current controller. If so, execute step 105 and use the controller that meets the conditions as the current controller. If not, execute step 108.
[0069] It should be noted that storage software is allocated to the N controllers in turn according to the priorities of the N controllers. Therefore, after determining the target storage software corresponding to the controller with the highest priority, it is necessary to determine the target storage software for the controller whose priority is less than the highest priority and whose priority is closest to the highest priority. As for how to determine the target storage software for the controller whose priority is not the highest, the following step 105 needs to be performed.
[0070] Step 105: Use the controller that meets the conditions as the current controller.
[0071] Step 106, if the number M of current controllers is 1, then according to the principle that the target storage software of at least the previous controller corresponds to a different OS, select the storage software that complies with the principle and has the highest priority from the storage software associated with the current controller as the target storage software of the current controller, and return to execute step 104.
[0072] The OS is identified by the number corresponding to the storage software. The OS corresponding to each storage software associated with the current controller is different. For example, the storage software associated with the current controller is storage software B1, storage software B2, and storage software B3. The storage software is identified by the numbers 1, 2, and 3 corresponding to the storage software. Then, storage software B1 corresponds to OS1, and storage software B2 corresponds to OS2. OS1 and OS2 are different OSs. For each storage software associated with multiple controllers, the same storage software number corresponds to the same OS. For example, the OS corresponding to number 1 is OS1, the OS corresponding to number 2 is OS2, and so on.
[0073] The following is a specific example to illustrate the process of determining the target storage software corresponding to the controller.
[0074] For example, if the target storage software of the previous controller is A1, then the OS corresponding to the target storage software is OS1. If the priorities of the storage software associated with the current controller are B1 and B2 from high to low, then the OS corresponding to storage software B1 is OS1, and the OS corresponding to storage software B2 is OS2. If the number M of the current controller is 1, then according to the principle of corresponding to a different OS from at least the target storage software of the previous controller, the storage software B2 that complies with the principle and has the highest priority is selected from the storage software associated with the current controller.
[0075] Step 107, if the number M of current controllers is greater than 1, then according to the principle that the target storage software of the previous controller corresponds to a different OS, and in order of priority from high to low, select M storage software that meet the principle from the storage software associated with the current controller as the target storage software of the M current controllers, and return to execute step 104.
[0076] As described in step 107, if the number M of current controllers is greater than 1, and the target storage software of the previous controller is A1, then the OS corresponding to the target storage software is OS1. If the priorities of the storage software associated with the current controller are B1, B2, and B3 from high to low, then the OS corresponding to storage software B1 is OS1, the OS corresponding to storage software B2 is OS2, and the OS corresponding to storage software B3 is OS3. Then, according to the principle of corresponding to a different OS from the target storage software of the previous controller, and in order of priority from high to low, the target storage software that meets the principle is selected from the storage software associated with the current controller as B2 and B3.
[0077] In the present application, the number of current controllers M and the number of storage software related to the current controllers are different, and the target storage software obtained for the M current controllers is also different. As for the results of the target storage software obtained in different situations, please refer to the step of determining the corresponding target storage software for each group of controllers with the same priority when the N controllers include multiple groups of controllers with the same priority.
[0078] It should be noted that step 104 is used to check whether there are controllers with other priorities except the controller with the highest priority. If so, a controller with a priority lower than that of the current controller and closest to that of the current controller needs to be used as the current controller, and execution starts again from step 105 to determine the corresponding target storage software for the current controller, until the corresponding target storage software is determined for N controllers, and then step 108 is executed.
[0079] Step 108, end.
[0080] This is done Figure 1Description shown.
[0081] It can be seen from the above technical solutions that in this application, in this embodiment, by using at least two heterogeneous controllers in the storage device, through the differentiated design of the controllers, it is avoided that each controller in the storage device is abnormal at the same time, thereby ensuring business continuity;
[0082] Furthermore, in this embodiment, the corresponding target storage software is determined for each controller according to the priority order of the N controllers. When determining the corresponding target storage software for each controller based on the order, the target storage software corresponding to the controller is determined according to the priority of the storage software associated with the controller and according to the principle of corresponding to a different OS from the target storage software of at least the previous controller. As a result, at least two of the N controllers have target storage software corresponding to different OSes, which makes it possible for the N controllers in the storage device to be different from each other, thereby avoiding the same exception causing all controllers in the storage device to fail to work, thereby improving the reliability of the storage device.
[0083] It should be noted that the N controllers may include at least one of a controller without storage software installed and a controller with storage software installed and requiring adjustment of the installed storage software.
[0084] Initially, the controller does not have storage software installed. Figure 1 The process shown is that each controller determines the corresponding target storage software, and installs the determined target storage software on the corresponding controller.
[0085] When a storage device needs to expand the controller, a new controller needs to be added to the storage device. The new controller will be pre-installed with the default storage software. When the new controller is added to the storage device, Figure 1 The process shown is to determine the corresponding target storage software for the newly added controller, wherein the number of the newly added controllers can be set according to actual conditions.
[0086] When different storage devices exchange controllers, the hardware architecture information of the storage devices will also change. Figure 1 The process shown is for each controller to determine the corresponding target storage software.
[0087] It should be noted that after the corresponding target storage software is determined for the controller, the controller will record the current storage software of the controller and the determined target storage software. As an embodiment, if the current storage software of the controller is different from the determined target storage software, it can be upgraded according to the target storage software to achieve the purpose of re-adjusting the storage software corresponding to the controller.
[0088] When the controller is a controller that has already installed storage software, the identifier of the current storage software (which can be represented by a corresponding numerical value) is determined based on the storage software installed on the controller, and the value of the target storage software is empty. Figure 1 The process shown determines the target storage software corresponding to the controller and records the identifier of the target storage software.
[0089] When the controller is a controller without storage software installed, at this time, the value of the current storage software corresponding to the controller and the identifier of the target storage software are both empty, and it is necessary to pass Figure 1 The process shown determines the target storage software corresponding to the controller and records the identifier of the target storage software.
[0090] In one embodiment, when determining the priority order of N controllers, it is considered that the hardware architecture information corresponding to different controllers may be different. Therefore, the priority of the controller is determined by the hardware architecture information corresponding to the controller. In one embodiment, Figure 3 , the priority order of N controllers is determined through steps 201-202:
[0091] Step 201: Obtain hardware architecture information of N controllers.
[0092] Step 202: sorting the priorities of the N controllers according to the priorities corresponding to the preset hardware architecture information, and using the sorted order of the N controllers as the priority order of the N controllers.
[0093] In the present application, the priority corresponding to the pre-set hardware architecture information can be determined according to the number of storage software corresponding to the hardware architecture information, for example: the priority of the hardware architecture information corresponding to the least number of storage software is set to the highest; the priority of the hardware architecture information corresponding to the most number of storage software is set to the lowest. When the number of storage software corresponding to multiple hardware architecture information is the same, the corresponding priority can also be determined comprehensively according to factors such as performance and efficiency when different storage software is deployed on the controller corresponding to the hardware architecture information.
[0094] Assume that N is 4, and the hardware architecture information of 4 controllers is obtained in step 201, and the hardware architecture information corresponding to controller 1, controller 2, controller 3, and controller 4 is A, B, A, and C respectively; the priority corresponding to the preset hardware architecture information is A>B>C, then, the priority order of the N controllers is: controller 1 and controller 3 have the same priority and controller 3>controller 2>controller 4. It should be noted that the priority order of the N controllers is used to control the order of allocating storage software to the N controllers, for example: the controller with the highest priority among the N controllers is first allocated the corresponding storage software; the controller with the lowest priority among the N controllers is last allocated the corresponding storage software.
[0095] In one embodiment, in order to ensure that the target storage software of the N controllers is storage software corresponding to different OSs, step 105 further includes the following steps based on the principle that the target storage software of at least the previous controller corresponds to a different OS:
[0096] According to the principle of corresponding a different OS to the target storage software of the previous controller and selecting the target storage software corresponding to the target OS, the target OS is the OS with the least total number of the same OS among the OSes corresponding to the target storage software of all controllers before the priority of the current controller.
[0097] Among them, the step of determining the target OS includes: pre-generating an OS list, the OS list including: the total number of each OS in the OS corresponding to the target storage software of the controller whose priority is before the current controller among N controllers; determining the OS with the smallest total number from the OS list, and taking the OS with the smallest total number as the target OS.
[0098] The following takes N controllers as controllers with different priorities as an example, and illustrates the specific process of determining the target storage software corresponding to the N controllers through Example 1.
[0099] Example 1:
[0100] The N controllers with different priorities are: controller 1, controller 2, controller 3 and controller 4. The priorities corresponding to the N controllers are: controller 2, controller 1, controller 4, controller 3 from high to low.
[0101] The priority order of each storage software related to each controller is as follows:
[0102] Controller 2, storage software priority order A1>A2;
[0103] Controller 1, storage software priority order B1>B2>B3>B4;
[0104] Controller 4, storage software priority order C1>C2>C3>C4;
[0105] Controller 3, storage software priority order D1>D2>D3>D4.
[0106] First, initialize the OS list, which includes: the OS corresponding to the storage software and the number of times each OS is selected. The OS corresponding to the storage software and the number of times each OS is selected are both empty by default;
[0107] Select storage software for each controller in order of priority as follows:
[0108] For controller 2 with the highest priority, determine the corresponding target storage software for controller 2: select storage software A1 according to the priority order of the storage software, and record OS1 in the OS list (at this time, the number of times OS1 is selected is 1, which is recorded as number 1);
[0109] For controller 1, which has a lower priority than controller 2, determine the corresponding target storage software for controller 1: OS1 corresponding to storage software B1 with the highest priority corresponding to controller 1 has been selected, so storage software B2 is selected, and OS1 (times 1) and OS2 (times 1) are recorded in the OS list;
[0110] For controller 4, which has a priority lower than controller 1, the corresponding target storage software is determined for controller 4: OS1 and OS2 have been selected, so storage software C3 is selected according to the priority of the storage software, and OS1 (times 1), OS2 (times 1), and OS3 (times 1) are recorded in the OS list;
[0111] For controller 3, which has a lower priority than controller 4, the corresponding target storage software is determined for controller 3: OS1, OS2, and OS3 have been selected, so D4 is selected according to the priority of the storage software, and the selected OS list records OS1 (times 1), OS2 (times 1), OS3 (times 1), and OS4 (times 1).
[0112] Through the above operations, the target storage software corresponding to controller 2, controller 1, controller 4, and controller 3 are storage software A1, storage software B1, storage software C1, and storage software D1, respectively.
[0113] When determining target storage software for N controllers with different priorities in the above manner, in one embodiment, the N controllers are controllers with different priorities; and the target storage software of the N controllers are storage software corresponding to different OSs.
[0114] The above example 1 illustrates the process of determining the target storage software by N controllers with different priorities. The following specifically describes the process of determining the target storage software when the N controllers have the same priority.
[0115] In one embodiment, when N controllers are controllers with the same priority, if the number K1 of storage software associated with the N controllers is less than N, then the target storage software of at least K1 of the N controllers corresponds to different OSes, and the priorities of the target storage software of the K1 controllers are different; if K1 is equal to N, the target storage software of the N controllers are storage software corresponding to different OSes; if K1 is greater than N, the target storage software of the N controllers are N storage software selected from the storage software associated with the controller in order of priority from high to low, and the target storage software of the N controllers correspond to different OSes.
[0116] The following example 2 specifically illustrates the situation where the number K1 of storage software associated with the N controllers in the above steps is less than N when the N controllers have the same priority.
[0117] Example 2:
[0118] N controllers with the same priority are: controller 1, controller 2, controller 3 and controller 4, and the priority order of each storage software associated with the controller of this priority is: storage software priority order A1>A2; initialize the OS list, which includes: the OS corresponding to the storage software and the number of times each OS is selected, and the OS corresponding to the storage software and the number of times each OS is selected are both empty by default;
[0119] Select the target storage software for each controller in turn as follows:
[0120] Select storage software A1 for controller 1, and record OS1 (times 1) in the OS list;
[0121] Select storage software for controller 2. OS1 has been selected. Therefore, A2 is selected according to the priority order of storage software. OS1 (number 1) and OS2 (number 1) are recorded in the OS list.
[0122] Select storage software OS1 and OS2 for controller 3. They have been selected and have been selected the same number of times. Therefore, A1 is selected according to the priority of the storage software. OS1 (number of times 2) and OS2 (number of times 1) are recorded in the OS list.
[0123] When selecting storage software for controller 4, OS1 and OS2 have been selected, and OS2 has been selected less frequently, so A2 is selected, and OS1 (times 2) and OS2 (times 2) are recorded in the OS list.
[0124] In this way, the target storage software corresponding to controller 1, controller 2, controller 3 and controller 4 are divided into: storage software A1, storage software A2, storage software A1, storage software A2, then the target storage software of at least two of the four controllers corresponds to different OS, and the priority of the target storage software of the two controllers is different. Therefore, when the number K1 of storage software associated with N controllers is less than N, M storage software are cyclically selected from the storage software associated with the current controller in order of priority from high to low as the target storage software of the M current controllers.
[0125] It should be noted that when the number K1 of storage software associated with N controllers is greater than the number N of controllers, it means that there are at least N different storage software, and the target storage software of the N controllers can be N different storage software selected from the storage software associated with the controller in order of priority from high to low, so that the target storage software of the N controllers corresponds to different OS.
[0126] The above introduces the determination result of the target storage software corresponding to N controllers with the same priority. In addition to being controllers with the same priority, the N controllers can also include multiple groups of controllers with the same priority. The following specifically describes the target storage software corresponding to the multiple groups of controllers with the same priority among the N controllers.
[0127] As an embodiment, if N controllers include multiple groups of controllers with the same priority, then for each group of controllers with the same priority, if the number L of controllers in the group of controllers is less than the number K2 of storage software associated with the controller, the target storage software of the L controllers are L storage software selected from the storage software associated with the group of controllers in order of priority from high to low, and the target storage software of the L controllers correspond to different OSes; if the L is equal to K2, the target storage software of the L controllers are storage software corresponding to different OSes; if the L is greater than K2, the target storage software of at least K2 of the L controllers corresponds to different OSes, and the priorities of the target storage software of the K2 controllers are different.
[0128] It should be noted that the number of controllers with the same priority in each group and the number of storage software related to the controller are different, and the target storage software of the controllers obtained is also different. If N controllers include multiple groups of controllers with the same priority, the method of determining the corresponding target storage software for each group of controllers with the same priority can refer to the method of determining the corresponding target storage software for N controllers with the same priority, that is, each group of controllers with the same priority is regarded as N controllers with the same priority.
[0129] The following example 3 specifically illustrates the process of determining target storage software for N controllers when the N controllers include multiple groups of controllers with the same priority.
[0130] Example 3:
[0131] The N controllers are: controller 1, controller 2, controller 3, controller 4, controller 5, controller 6 and controller 7; the priorities corresponding to the N controllers are determined from high to low as follows: controller 2, controller 5 and controller 7 have the same priority and are the highest priority; controller 1; controller 4 and controller 6 have the same priority; controller 3;
[0132] The priority order of each storage software related to each controller is determined as follows: for controller 2, controller 5 and controller 7, the storage software priority order is A1>A2; for controller 1, the storage software priority order is B1>B2>B3>B4; for controller 4 and controller 6, the storage software priority order is C1>C2>C3>C4; for controller 3, the storage software priority order is D1>D2>D3>D4.
[0133] Initialize the OS list, which includes: the OS corresponding to the storage software and the number of times each OS is selected, and the OS corresponding to the storage software and the number of times each OS is selected are both empty by default;
[0134] Select storage software for each controller in order of priority as follows:
[0135] First, the corresponding target storage software is determined for the controller 2, controller 5, and controller 7 with the highest priority. When the controller with the highest priority is the controller with the same priority in the group, the number of controllers L in the group is 3, and the number of storage software associated with the controller K2 is 2. At this time, the number of controllers L is greater than K2. The process of determining the target storage software corresponding to the group of controllers and obtaining the target storage software corresponding to different OSs of L controllers are described below by way of example.
[0136] For example: determine the corresponding target storage software for controller 2: select storage software A1 according to the priority order of storage software, and record OS1 (times 1) in the OS list; determine the corresponding target storage software for controller 5: select storage software A2 according to the priority order of storage software, and record OS1 (times 1) and OS2 (times 1) in the OS list; determine the corresponding target storage software for controller 7: select storage software A1 according to the priority order of storage software, and record OS1 (times 2) and OS2 (times 1) in the OS list; thus determine that the target storage software corresponding to controller 2, controller 5 and controller 7 are: A1, A2 and A1 respectively;
[0137] When determining the corresponding target storage software for controller 1, in order to ensure that the target storage software selected between controllers are as different as possible, an OS different from the OS corresponding to the selected target storage software or an OS with the least number of identical OSs among the OSs corresponding to the selected target storage software can be used as the target OS, thereby selecting the target storage software corresponding to the target OS for controller 1. The process of determining the target storage software corresponding to controller 1 is explained below by way of example.
[0138] For example: determine the corresponding target storage software for controller 1: the OS corresponding to the storage software B1 and B2 with the highest priority corresponding to controller 1 has been selected, so storage software B3 is selected, and OS1 (times 2), OS2 (times 1), and OS3 (times 1) are recorded in the OS list.
[0139] If controller 4 and controller 6 are controllers with the same priority in the group, the number of controllers L in the group is 2, and the number of storage software associated with the controllers K2 is 4. At this time, the number of controllers L is less than K2. The following is an example to illustrate the process of determining the target storage software corresponding to the group of controllers and obtaining the target storage software of L controllers corresponding to different OSs;
[0140] Determine the corresponding target storage software for controller 4 and controller 6: OS1, OS2, and OS3 have been selected, so storage software C4 is selected according to the priority column of the storage software, and OS1 (times 2), OS2 (times 1), OS3 (times 1), and OS4 (times 1) are recorded in the OS list. Based on the principle that the OS corresponding to the selected target storage software has the least number of identical OSs, it is determined that the target OS may be: OS2, OS3, and OS4, and then storage software C2 corresponding to OS2 is selected according to the priority of the storage software. Therefore, the target storage software corresponding to controller 4 and controller 6 are C4 and C2 respectively, and OS1 (times 2), OS2 (times 2), OS3 (times 1), and OS4 (times 1) are recorded in the OS list.
[0141] Determine the corresponding target storage software for controller 3: OS1, OS2, OS3, and OS4 have all been selected. Therefore, based on the principle of the OS with the least number of identical OSs among the OSs corresponding to the selected target storage software and according to the priority of the storage software, D3 is selected, and OS1 (times 2), OS2 (times 2), OS3 (times 2), and OS4 (times 1) are recorded in the selected OS list.
[0142] In this way, the target storage software corresponding to controller 2, controller 5, controller 7, controller 1, controller 4, controller 6, and controller 3 are divided into: storage software A1, storage software A2, storage software A1, storage software B2, storage software C4, storage software C2, and storage software D3.
[0143] It should be noted that when selecting the corresponding target storage software for the controller, the corresponding target storage software can generally be determined for N controllers in the manner of Example 3, so as to select different target storage software for each controller as much as possible, so as to increase the differences between the N controllers, thereby ensuring that the OS corresponding to the target storage software of at least two of the N controllers is different.
[0144] The method provided in the embodiment of the present application is described above. The device provided in the embodiment of the present application is described below:
[0145] See also Figure 5 The embodiment of the present application further provides a storage software determination device 300, which is applied to a management device for managing and controlling a storage device, wherein the storage device includes N controllers, where N is greater than 1, and the device includes:
[0146] The first determination module 301 is used to select a controller with the highest priority from the N controllers, and use the selected controller as the current controller; if the number M of current controllers is 1, then select the storage software with the highest priority from each storage software associated with the current controller as the target storage software of the current controller; if the number M of current controllers is greater than 1, then select M storage software from each storage software associated with the current controller in descending order of priority as the target storage software of the M current controllers;
[0147] The checking module 302 is used to check whether there is a controller among the N controllers that meets the following conditions: the priority is lower than the priority of the current controller and the priority is closest to the priority of the current controller;
[0148] The second determination module 303 is used to, if yes, use the controller that meets the condition as the current controller; if the number M of current controllers is 1, then according to the principle that at least the target storage software of the previous controller corresponds to a different OS, select the storage software that meets the principle and has the highest priority from the storage software associated with the current controller as the target storage software of the current controller; if the number M of current controllers is greater than 1, then according to the principle that the target storage software of the previous controller corresponds to a different OS, and in descending order of priority, select M storage software that meets the principle from the storage software associated with the current controller as the target storage software of the M current controllers respectively, and return to the step of checking whether there is a controller that meets the condition among the N controllers.
[0149] Optionally, the N controllers are controllers with different priorities; and the target storage software of the N controllers is storage software corresponding to different OSs.
[0150] Optionally, the N controllers are controllers with the same priority, and the device further includes:
[0151] The third determination module is used for:
[0152] If the number K1 of storage software associated with the N controllers is less than N, then the target storage software of at least K1 controllers among the N controllers corresponds to different OSs, and the priorities of the target storage software of the K1 controllers are different;
[0153] If K1 is equal to N, the target storage software of the N controllers is storage software corresponding to different OS;
[0154] If K1 is greater than N, the target storage software of the N controllers are N storage software selected from the storage software associated with the controller in descending order of priority, and the target storage software of the N controllers correspond to different OSs.
[0155] Optionally, the device further comprises:
[0156] The fourth determination module is used for:
[0157] If the N controllers include multiple groups of controllers with the same priority, then for each group of controllers with the same priority, if the number of controllers L in the group of controllers is less than the number K2 of storage software associated with the controller, the target storage software of the L controllers is L storage software selected from the storage software associated with the group of controllers in order from high to low priority, and the target storage software of the L controllers corresponds to different OSs;
[0158] If the L is equal to the K2, the target storage software of the L controllers is storage software corresponding to different OS;
[0159] If the L is greater than the K2, the target storage software of at least K2 controllers among the L controllers corresponds to different OSs, and the priorities of the target storage software of the K2 controllers are different.
[0160] Optionally, the N controllers include at least one of a controller on which storage software is not installed and a controller on which storage software is installed and the installed storage software needs to be adjusted.
[0161] It can be seen from the above technical scheme that in the present application, the order of determining the corresponding target storage software for each controller is determined according to the priority order of N controllers. When determining the corresponding target storage software for each controller based on this order, the target storage software corresponding to the controller is determined according to the priority of the storage software associated with the controller and according to the principle of corresponding to a different OS from the target storage software of at least the previous controller. As a result, there are at least two controllers among the N controllers whose target storage software corresponds to different OSs, so that there are differences between the N controllers in the storage device, avoiding the situation where all controllers in the storage device cannot work due to the same exception, thereby improving the reliability of the storage device.
[0162] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0163] The electronic device provided in the embodiment of the present application, from the hardware level, can be seen in the hardware architecture diagram Figure 6 As shown. It includes: a machine-readable storage medium 401 and a processor 402, wherein: the machine-readable storage medium stores machine-executable instructions that can be executed by the processor; the processor is used to execute the machine-executable instructions to implement the determination operation applied to the storage software disclosed in the above example.
[0164] The machine-readable storage medium provided in an embodiment of the present application stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the determination operation applied to the storage software disclosed in the above example.
[0165] Here, the machine-readable storage medium may be any electronic, magnetic, optical or other physical storage device that may contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium may be: RAM (RadomAccess Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as CD, DVD, etc.), or similar storage medium, or a combination thereof.
[0166] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.
[0167] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0168] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the embodiments of the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0169] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0170] Moreover, these computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0171] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0172] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present application. A person of ordinary skill in the art may understand and implement it without creative work.
[0173] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A method for determining storage software, characterized in that: The method is applied to a management device for managing and controlling a storage device, wherein the storage device includes N controllers, where N is greater than 1, and the method includes: Select a controller with the highest priority from the N controllers, and use the selected controller as the current controller; if the number M of current controllers is 1, select the storage software with the highest priority from the storage software associated with the current controller as the target storage software of the current controller; if the number M of current controllers is greater than 1, select M storage software from the storage software associated with the current controller in descending order of priority as the target storage software of the M current controllers; Check whether there is a controller among the N controllers that meets the following conditions: the priority of the controller is less than the priority of the current controller and the priority of the controller is closest to the priority of the current controller; If so, the controller that meets the conditions is used as the current controller. If the number M of current controllers is 1, then according to the principle that at least the target storage software of the previous controller corresponds to a different OS, select the storage software that meets the principles and has the highest priority from the storage software associated with the current controller as the target storage software of the current controller. If the number M of current controllers is greater than 1, according to the principle that the target storage software of the previous controller corresponds to a different OS, select M storage software that meets the principles from the storage software associated with the current controller in order from high to low priority as the target storage software of the M current controllers respectively, and return to the step of checking whether there is a controller that meets the conditions among the N controllers.
2. The method according to claim 1, characterized in that The N controllers are controllers with different priorities; and the target storage software of the N controllers are storage software corresponding to different OSs.
3. The method according to claim 1, characterized in that The N controllers are controllers with the same priority, and the method further includes: If the number K1 of storage software associated with the N controllers is less than N, then the target storage software of at least K1 controllers among the N controllers corresponds to different OSs, and the priorities of the target storage software of the K1 controllers are different; If K1 is equal to N, the target storage software of the N controllers is storage software corresponding to different OS; If K1 is greater than N, the target storage software of the N controllers are N storage software selected from the storage software associated with the controller in descending order of priority, and the target storage software of the N controllers correspond to different OSs.
4. The method according to claim 1, characterized in that: The method further comprises: If the N controllers include at least one group of controllers with the same priority, then for each group of controllers with the same priority, if the number of controllers L in the group of controllers is less than the number K2 of storage software associated with the controllers, the target storage software of the L controllers are L storage software selected from the storage software associated with the group of controllers in descending order of priority, and the target storage software of the L controllers correspond to different OSs; If the L is equal to the K2, the target storage software of the L controllers is storage software corresponding to different OS; If the L is greater than the K2, the target storage software of at least K2 controllers among the L controllers corresponds to different OSs, and the priorities of the target storage software of the K2 controllers are different.
5. The method according to claim 1, characterized in that The N controllers include at least one of a controller on which storage software is not installed and a controller on which storage software is installed and the installed storage software needs to be adjusted.
6. A device for determining storage software, characterized in that: The device is applied to a management device for managing and controlling a storage device, wherein the storage device includes N controllers, where N is greater than 1, and the device includes: A first determination module is used to select a controller with the highest priority from the N controllers, and use the selected controller as the current controller; if the number M of current controllers is 1, then select the storage software with the highest priority from each storage software associated with the current controller as the target storage software of the current controller; if the number M of current controllers is greater than 1, then select M storage software from each storage software associated with the current controller in descending order of priority as the target storage software of the M current controllers; A checking module, used for checking whether there is a controller among the N controllers that meets the following conditions: the priority is lower than the priority of the current controller and the priority is closest to the priority of the current controller; The second determination module is used to, if yes, use the controller that meets the condition as the current controller; if the number M of current controllers is 1, then according to the principle that at least the target storage software of the previous controller corresponds to a different OS, select the storage software that meets the principle and has the highest priority from the storage software associated with the current controller as the target storage software of the current controller; if the number M of current controllers is greater than 1, according to the principle that the target storage software of the previous controller corresponds to a different OS, and in order from high to low priority, select M storage software that meets the principle from the storage software associated with the current controller as the target storage software of the M current controllers respectively, and return to the step of checking whether there is a controller that meets the condition among the N controllers.
7. The device according to claim 6, characterized in that The N controllers are controllers with different priorities; and the target storage software of the N controllers are storage software corresponding to different OSs.
8. The device according to claim 6, characterized in that The N controllers are controllers with the same priority, and the device further includes: The third determination module is used to: If the number K1 of storage software associated with the N controllers is less than N, then the target storage software of at least K1 controllers among the N controllers corresponds to different OSs, and the priorities of the target storage software of the K1 controllers are different; If K1 is equal to N, the target storage software of the N controllers is storage software corresponding to different OS; If K1 is greater than N, the target storage software of the N controllers are N storage software selected from the storage software associated with the controller in descending order of priority, and the target storage software of the N controllers correspond to different OSs.
9. The device according to claim 6, characterized in that The device also includes: The fourth determination module is used for: If the N controllers include multiple groups of controllers with the same priority, then for each group of controllers with the same priority, if the number of controllers L in the group of controllers is less than the number K2 of storage software associated with the controller, the target storage software of the L controllers is L storage software selected from the storage software associated with the group of controllers in order from high to low priority, and the target storage software of the L controllers corresponds to different OSs; If the L is equal to the K2, the target storage software of the L controllers is storage software corresponding to different OS; If the L is greater than the K2, the target storage software of at least K2 controllers among the L controllers corresponds to different OSs, and the priorities of the target storage software of the K2 controllers are different.
10. The device according to claim 6, characterized in that The N controllers include at least one of a controller on which storage software is not installed and a controller on which storage software is installed and the installed storage software needs to be adjusted.
Citation Information
Patent Citations
Information processing device, information processing method, and storage medium storing program for executing information processing method
CN104246711A
Routing storage method and device
CN109257285A