A hard disk management method, a hard disk control method and related equipment
By obtaining the available physical capacity after the hard drive is connected and adjusting the OP capacity according to business configuration requirements, the problem of wasted solid-state drive capacity is solved, and more efficient space utilization and performance optimization are achieved.
Patent Information
- Application Number
- CN202311498586.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-29
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2042-09-29
AI Technical Summary
In existing technologies, the amount of open capacity (OP) in solid-state drives is fixed and determined by hardware and manufacturer strategies, resulting in wasted capacity and inefficient utilization.
After the hard drive is connected, the available physical capacity is obtained, the OP capacity is flexibly adjusted according to the business configuration requirements, and setting instructions are generated to partition the drive, ensuring that the OP capacity meets the business needs.
It improves hard drive space utilization, reduces capacity waste, optimizes hard drive performance and lifespan, and meets different business needs.
Smart Images

Figure CN117519590B_ABST
Abstract
Description
[0001] This application is a divisional application. The application number of the original application is 202211204997.3, and the original application date is September 29, 2022. The entire contents of the original application are incorporated into this application by reference. Technical Field
[0002] The present application relates to the field of solid-state hard disks, and in particular to a hard disk management method, a hard disk control method, and related equipment. Background Art
[0003] The hard disk space of a solid state disk (SSD) is divided into hard disk available capacity space and reserved space (OP). The hard disk available capacity space is the space area reported by the SSD hard disk to the user, which is visible and accessible to the user; the capacity of the reserved space is the actual physical flash memory available capacity minus the hard disk available capacity. This area is generally used for SSD disk optimization, including wear leveling, GC and bad block mapping. The reserved space sacrifices user data space, but also brings many benefits: improve write performance: due to the existence of reserved space, garbage collection is not required frequently when writing data, which speeds up the writing speed; reduce write amplification; increase the life of flash memory: reduce data relocation, that is, reduce the number of read and write times of NAND flash memory, and increase the life of the flash memory; data protection: mainly provides data protection other than error checking and correction (error-correcting code memory, ECC).
[0004] Currently, the OP size of SSD hard drives is fixed and is determined by the hardware and manufacturer's policies. It is invisible and unusable to the storage system and can only be used by the internal logic of the SSD hard drive, resulting in a waste of capacity. Summary of the invention
[0005] The embodiments of the present application provide a hard disk management method, a hard disk control method and related devices for improving hard disk space utilization and reducing capacity waste.
[0006] In a first aspect, the present application provides a hard disk management method, comprising:
[0007] Get the available physical capacity of the hard disk. The hard disk space includes the hard disk available space and OP. The OP capacity is the available physical capacity minus the hard disk available capacity. To make reasonable use of the hard disk capacity, you first need to get the available physical capacity of the hard disk, that is, the actual capacity of the hard disk.
[0008] According to the configuration requirements of the services configured by the hard disk, the hard disk reserved space OP capacity is allocated to the hard disk. When the hard disk is connected to the storage system of the computer or the main control, the hard disk is configured to process the relevant services on the computer or the main control. Different services have different configuration requirements. According to the configuration requirements of the services configured by the hard disk, the size of the hard disk OP can be estimated to determine a suitable hard disk OP capacity.
[0009] Generate a setting instruction, the setting instruction is used to instruct the hard disk to divide the available physical capacity into the hard disk available capacity and the hard disk OP capacity. After the hard disk OP is determined, the hard disk is partitioned, wherein the hard disk available capacity is the available physical capacity minus the hard disk OP capacity.
[0010] Send a setup instruction to the hard disk. After partitioning the hard disk, a setup instruction is generated and sent to the hard disk, so that the hard disk partitions the hard disk according to the hard disk available capacity and hard disk OP capacity in the instruction.
[0011] The hard disk management method provided in the embodiment of the present application obtains the available physical capacity of the hard disk after the hard disk is connected, and then determines the OP capacity of the hard disk according to the service configured by the hard disk, so that the OP capacity of the hard disk can be flexibly adjusted according to the configuration requirements of the service. Since the hard disk OP is directly set when the hard disk leaves the factory in the prior art, the pre-set hard disk OP capacity may have excessive redundancy. Therefore, compared with the prior art, the method provided by the present application does not need to reserve too much hard disk OP, which improves the space utilization rate of the hard disk and solves the problem of hard disk capacity waste caused by the inability to reasonably utilize the hard disk OP capacity.
[0012] In a possible implementation method, the method further includes:
[0013] In response to the hard disk event reported by the hard disk, determining whether the OP capacity of the hard disk needs to be adjusted;
[0014] If so, the hard disk OP capacity and the hard disk available capacity are adjusted according to the hard disk event, and a setting instruction is regenerated, wherein the sum of the hard disk OP capacity and the hard disk available capacity remains unchanged.
[0015] In a possible implementation method, the method further includes:
[0016] Periodically obtaining status information of the hard disk;
[0017] According to the status information, determining whether the OP capacity of the hard disk needs to be adjusted;
[0018] If so, the hard disk OP capacity and the hard disk available capacity are adjusted according to the status information, and a setting instruction is regenerated, wherein the sum of the hard disk OP capacity and the hard disk available capacity remains unchanged.
[0019] In a possible implementation method, the method further includes:
[0020] Dividing the available capacity of the hard disk into user available capacity and system capacity according to the system information of the storage system;
[0021] The setting instruction is specifically used to instruct the hard disk to divide the available physical capacity into the user available capacity, the system capacity and the hard disk OP capacity;
[0022] When the hard disk OP capacity needs to be adjusted, the hard disk OP capacity and the hard disk available capacity are adjusted, and a setting instruction is regenerated, specifically including:
[0023] According to the system information, the hard disk OP capacity and the system capacity are adjusted, and the setting instruction is regenerated, wherein the sum of the hard disk OP capacity and the system capacity remains unchanged.
[0024] In one possible implementation,
[0025] The system capacity includes system data capacity and system OP capacity;
[0026] The setting instruction is specifically used to instruct the hard disk to divide the available physical capacity into the user available capacity, the system data capacity, the system OP capacity and the hard disk OP capacity;
[0027] When the hard disk OP capacity needs to be adjusted, the hard disk OP capacity and the hard disk available capacity are adjusted, and a setting instruction is regenerated, specifically including:
[0028] According to the system information, the hard disk OP capacity and the system OP capacity are adjusted, and the setting instruction is regenerated, wherein the sum of the hard disk OP capacity and the system OP capacity remains unchanged.
[0029] In a possible implementation method, before obtaining the available physical capacity of the hard disk, the method further includes:
[0030] A query instruction is sent to the hard disk, wherein the query instruction is used to instruct the hard disk to send available physical capacity.
[0031] In a possible implementation method, the method further includes:
[0032] Write data to the hard disk;
[0033] When the write capacity of the hard disk exceeds the available capacity of the hard disk, write error information of the hard disk is received.
[0034] In a second aspect, the present application provides a hard disk control method, comprising:
[0035] Sending the available physical capacity of the hard disk to the hard disk management device;
[0036] In response to the setting instruction sent by the hard disk management device, the available physical capacity of the hard disk is divided, and the setting instruction is used to divide the available physical capacity into the hard disk available capacity and the hard disk OP capacity.
[0037] In a possible implementation method, the method further includes:
[0038] Report hard disk events of the hard disk to the hard disk management device.
[0039] In a possible implementation method, the method further includes:
[0040] In response to the query instruction sent by the hard disk management device, the status information of the hard disk is sent to the hard disk management device.
[0041] In a possible implementation method, the method further includes:
[0042] Receiving data written by the hard disk management device;
[0043] If the write capacity of the hard disk exceeds the available capacity of the hard disk after the data is written, a write error message is returned.
[0044] In a third aspect, the present application provides a hard disk management device, including:
[0045] An acquisition module is used to obtain the available physical capacity of the hard disk;
[0046] A configuration module, configured to allocate hard disk reserved space OP capacity to the hard disk according to the configuration requirements of the service configured by the hard disk;
[0047] A setting module, used for generating a setting instruction, wherein the setting instruction is used for instructing the hard disk to divide the available physical capacity into the hard disk available capacity and the hard disk OP capacity;
[0048] The sending module is also used to send the setting instruction to the hard disk.
[0049] In a possible implementation method, the method further includes:
[0050] A processing module, configured to determine whether the OP capacity of the hard disk needs to be adjusted in response to the hard disk event reported by the hard disk;
[0051] The setting module is further used to adjust the hard disk OP capacity and the hard disk available capacity according to the hard disk event, and regenerate a setting instruction, wherein the sum of the hard disk OP capacity and the hard disk available capacity remains unchanged.
[0052] In a possible implementation method, the method further includes:
[0053] The acquisition module is further used to periodically acquire the status information of the hard disk;
[0054] A processing module, used for determining whether the OP capacity of the hard disk needs to be adjusted according to the status information;
[0055] The setting module is further used to adjust the hard disk OP capacity and the hard disk available capacity according to the status information, and regenerate a setting instruction, wherein the sum of the hard disk OP capacity and the hard disk available capacity remains unchanged.
[0056] In a possible implementation method, before obtaining the available physical capacity of the hard disk, the method further includes:
[0057] The query module is used to send a query instruction to the hard disk, wherein the query instruction is used to instruct the hard disk to send available physical capacity.
[0058] In a possible implementation method, the method further includes:
[0059] A write module, used to write data to the hard disk;
[0060] The acquisition module is further used to receive write error information of the hard disk when the write capacity of the hard disk exceeds the available capacity of the hard disk.
[0061] In a fourth aspect, the present application provides a hard disk controller, including:
[0062] A sending module, used for sending the available physical capacity of the hard disk to the hard disk management device;
[0063] The partition module is used to divide the available physical capacity of the hard disk in response to the setting instruction sent by the hard disk management device, and the setting instruction is used to divide the available physical capacity into the hard disk available capacity and the hard disk OP capacity.
[0064] In a possible implementation method, the method further includes:
[0065] The reporting module is used to report the hard disk event of the hard disk to the hard disk management device.
[0066] In a possible implementation method, the method further includes:
[0067] A feedback module is used to send the status information of the hard disk to the hard disk management device in response to the query instruction sent by the hard disk management device.
[0068] In a possible implementation method, the method further includes:
[0069] A receiving module, used for receiving data written by the hard disk management device;
[0070] If the write capacity of the hard disk exceeds the available capacity of the hard disk after the data is written, the sending module is further used to return a write error message.
[0071] In a fifth aspect, the present application provides a storage system, the device comprising a memory and a processor; the memory stores code, the processor is configured to execute the code, and when the code is executed, the processor executes the method described in any one of the above aspects.
[0072] In a sixth aspect, the present application provides a computer storage medium, characterized in that the computer storage medium stores one or more instructions, which, when executed by one or more computers, enable the one or more computers to implement the method described in any of the above aspects.
[0073] In a seventh aspect, the present application provides a computer program product, characterized in that the computer program product stores instructions, and when the instructions are executed by a computer, the computer implements the method described in any one of the above aspects.
[0074] It can be seen from the above technical solutions that this application has the following advantages:
[0075] The embodiment of the present application discloses a hard disk management method, including obtaining the available physical capacity of the hard disk; allocating hard disk reserved space OP capacity to the hard disk according to the configuration requirements of the service configured by the hard disk; generating a setting instruction, the setting instruction is used to instruct the hard disk to divide the available physical capacity into hard disk available capacity and hard disk OP capacity; sending the setting instruction to the hard disk. The hard disk management method provided in the embodiment of the present application obtains the available physical capacity of the hard disk after the hard disk is connected, and then determines the hard disk OP according to the service configured by the hard disk, so that the OP of the hard disk is more in line with the configuration requirements of the current service. Since the hard disk OP is set directly when the hard disk leaves the factory in the prior art, the pre-set hard disk OP capacity may have excessive redundancy. Therefore, compared with the prior art, the method provided by the present application does not need to reserve too much hard disk OP space, which improves the space utilization rate of the hard disk and solves the problem of hard disk capacity waste caused by the inability to reasonably utilize the hard disk OP capacity. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] Figure 1 An interactive diagram of a storage system and a hard disk provided in an embodiment of the present application;
[0077] Figure 2 A schematic diagram of hard disk data writing provided by an embodiment of the present application;
[0078] Figure 3A schematic diagram of a capacity adjustment method provided in an embodiment of the present application;
[0079] Figure 4 A schematic diagram of another capacity adjustment method provided in an embodiment of the present application;
[0080] Figure 5 A schematic diagram of the structure of a hard disk management device provided in an embodiment of the present application;
[0081] Figure 6 A schematic diagram of the structure of a hard disk controller provided in an embodiment of the present application;
[0082] Figure 7 A possible structural diagram of a storage system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0083] In order to make the purpose, technical solutions and advantages of the present application more clear, the embodiments of the present application are described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. It is known to those skilled in the art that with the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0084] The terms "first", "second", etc. in the specification and claims of this 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 here can be implemented in an order other than that illustrated or described here. 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 that includes a series of steps or modules is not necessarily limited to those steps or modules clearly listed, but may include other steps or modules that are not clearly listed or inherent to these processes, methods, products or devices. The naming or numbering of steps in this application does not mean that the steps in the method flow must be executed in the time / logical sequence indicated by the naming or numbering. The process steps that have been named or numbered can change the execution order according to the technical purpose to be achieved, as long as the same or similar technical effects can be achieved. The division of units in this application is a logical division. There may be other division methods when it is implemented in actual applications. For example, multiple units can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection between units can be electrical or other similar forms, which are not limited in this application. In addition, the units or sub-units described as separate components may or may not be physically separated, may or may not be physical units, or may be distributed in multiple circuit units, and some or all of the units may be selected according to actual needs to achieve the purpose of the present application.
[0085] A solid state disk (SSD) is a hard disk made of an array of solid-state electronic storage chips. After assembling the SSD, the SSD manufacturer can reserve an additional portion of the total storage capacity of the hard disk for use as over-provisioning (OP) during firmware programming. Over-provisioning sacrifices user data space and also brings many benefits: Improve write performance: Due to the existence of over-provisioning, garbage collection is not required frequently when writing data, which speeds up writing; reduce write amplification; increase flash memory life: reduce data relocation, that is, reduce the number of read and write times of NAND flash memory, and increase life; data protection: mainly provides data protection other than error checking and correction (error-correcting code memory, ECC).
[0086] The OP capacity size set by different SSD manufacturers varies, depending on the application category and total NAND flash storage capacity of the SSD. Drives with larger storage capacity and different application categories are generally configured with proportional OP size, because the requirements for managing more NAND flash resources using garbage collection, spare blocks and enhanced data protection features are also higher.
[0087] In actual applications, in order to ensure the function and life of the hard disk, SSD manufacturers usually choose to reserve as much OP as possible, resulting in a part of OP always having free capacity. Since this free capacity is invisible and unusable to the storage system, it causes capacity waste.
[0088] In order to solve the above problems, on the first aspect, the present application provides a hard disk management method, which can be executed by a storage system, specifically by a hard disk management device in the storage system. The hard disk management device refers to software or hardware in the storage system that reads the status, partitions, and configures the connected hard disk.
[0089] See also Figure 1 , Figure 1 The interaction diagram of the storage system and the hard disk provided in the embodiment of the present application includes:
[0090] 101. Obtain the available physical capacity of the hard disk.
[0091] It is understandable that the available physical capacity of a hard disk is the total capacity of the entire hard disk, including the available capacity of the hard disk and the OP capacity. The OP capacity refers to the capacity in the OP, and the available capacity of the hard disk refers to the capacity that can be used by the storage system or the user. The sum of the OP capacity and the available capacity of the hard disk is the available physical capacity. To make reasonable use of the capacity of the hard disk, after the hard disk is connected, you first need to obtain the available physical capacity of the hard disk, that is, the actual capacity of the hard disk.
[0092] Ways to obtain available physical capacity include but are not limited to the following: for hard disks that have not been set with OP at the factory, directly obtain the entire capacity of the hard disk, that is, the available physical capacity; for hard disks that have been set with OP but are visible at the factory, obtain the OP capacity based on the hard disk information, and then add the OP capacity to the hard disk available capacity sent by the hard disk to obtain the available physical capacity; for hard disks that have been set with OP but are not visible at the factory, send a setting instruction to the hard disk, the setting instruction is used to instruct the hard disk controller of the hard disk to open the OP capacity of the hard disk, make the OP capacity editable, and send the OP capacity and hard disk available capacity information to the storage system.
[0093] In a possible implementation method, before step 101, the method further includes:
[0094] A query command is sent to the hard disk, where the query command is used to instruct the hard disk to send the available physical capacity.
[0095] It is understandable that if the hard disk is connected without actively reporting the available physical capacity of the hard disk, the hard disk management device of the storage system sends a query command to the hard disk, instructing it to send the available physical capacity.
[0096] 102. Allocate OP capacity to the hard disk according to the configuration requirements of the service configured by the hard disk.
[0097] It is understandable that when the hard disk is connected to the storage system of the computer or the main control, the hard disk is configured to process the relevant business on the computer or the main control. According to the processing requirements of different businesses, the hard disk's write performance, write amplification, NAND read and write times and other requirements are different. For businesses with high configuration requirements, the hard disk performance requirements are high and the required OP capacity is also large; for businesses with low configuration requirements, the above hard disk performance requirements can also be appropriately reduced. Therefore, relative to businesses with high performance requirements, the required OP capacity is also small. According to the configuration requirements of the business configured by the hard disk, the size of the hard disk OP can be estimated to determine a suitable hard disk OP. The hard disk has a large OP capacity for businesses with high performance requirements and a small OP capacity for businesses with low performance requirements.
[0098] 103. Generate a setting instruction, where the setting instruction is used to instruct the hard disk to divide the available physical capacity into the hard disk available capacity and the hard disk OP.
[0099] It is understandable that after obtaining the available physical capacity and determining the hard disk OP capacity, the two capacities are subtracted to obtain the hard disk available capacity. The hard disk is partitioned into hard disk available capacity space and OP, where the hard disk available capacity is the available physical capacity minus the OP capacity.
[0100] 104, sending a setting instruction to the hard disk.
[0101] It is understandable that after partitioning the hard disk, a setting instruction is generated and sent to the hard disk, so that the hard disk sets the OP capacity. Since the available capacity of the hard disk is the available physical capacity minus the OP capacity, the setting instruction sent to the hard disk may only include the OP capacity, indicating that this part of the capacity is only used for the optimization of the hard disk itself and is not allowed to be used by the storage system.
[0102] The hard disk management method provided in the embodiment of the present application obtains the available physical capacity of the hard disk after the hard disk is connected, and then determines the hard disk OP according to the service configured by the hard disk, so that the hard disk OP is more in line with the configuration requirements of the current service. Since the hard disk OP is directly set when the hard disk leaves the factory in the prior art, the pre-set hard disk OP capacity may have too much redundancy. Therefore, compared with the prior art, the method provided by the present application does not need to reserve too much hard disk OP space, which improves the space utilization rate of the hard disk and solves the problem of hard disk capacity waste caused by the inability to reasonably utilize the hard disk OP capacity.
[0103] In a possible implementation method, after the hard disk management device of the storage system partitions the capacity, it sends a setting instruction to the hard disk, which is used for the hard disk to set its own OP capacity, so that the hard disk clearly knows the size of the OP capacity configured by the system for the hard disk, and the hard disk management device also ensures that the storage system cannot allocate and use the hard disk OP. For details, please refer to Figure 2 , Figure 2 The hard disk data writing schematic diagram provided in the embodiment of the present application includes:
[0104] 201, hard disk OP is set for the hard disk.
[0105] It can be understood that this step is equivalent to the above step 104, where the hard disk management device of the storage system sends a setting instruction to the hard disk, and the setting instruction is used to instruct the hard disk to set the hard disk OP.
[0106] 202, write data to the hard disk.
[0107] It is understandable that after the hard disk OP is set for the hard disk, the hard disk can be used normally, and the storage system can write data to the hard disk.
[0108] 203. When the write capacity of the hard disk exceeds the available capacity of the hard disk, receive write error information of the hard disk.
[0109] It is understandable that if after writing data to the hard disk, the write capacity of the hard disk exceeds the non-hard disk OP capacity (that is, exceeds the available capacity of the hard disk), it can be understood that the hard disk capacity is full. Even if the hard disk OP still has free capacity, since the hard disk OP is only used for optimization of the hard disk itself, the hard disk sends a write error message to the hard disk management device and the data cannot be written successfully.
[0110] 204 , when the writing capacity of the hard disk does not exceed the available capacity of the hard disk, receiving the writing success information of the hard disk.
[0111] It is understandable that if the write capacity of the hard disk does not exceed the non-hard disk OP capacity (ie, does not exceed the hard disk available capacity), it can be indicated that the hard disk capacity is not full and writing can be successful.
[0112] In a possible implementation method, the business processed by the hard disk will change. For example, when business A with high configuration requirements has been processed, the next business B with low configuration requirements can be processed. At this time, the hard disk OP can be flexibly adjusted to reduce the OP capacity and increase the hard disk available capacity, so that users can use more space. For example, the hard disk management device will adjust the capacity allocation strategy by responding to hard disk events or periodically judging the hard disk status, as follows:
[0113] See also Figure 3 , Figure 3 A schematic diagram of a capacity adjustment method provided in an embodiment of the present application includes:
[0114] 301 , in response to a hard disk event reported by a hard disk, determining whether the hard disk OP needs to be adjusted.
[0115] It is understandable that hard disk events include but are not limited to hard disk service changes, insufficient hard disk available capacity, bad sectors on the hard disk, damaged hard disk partition table, and all other hard disk-related events. After obtaining the hard disk events reported by the hard disk, the hard disk management device determines whether it is necessary to reallocate the capacity. If not, no processing is performed. For example, if the hard disk service sends changes, but the service configuration requirements after the changes are low and the required capacity is also low, even if the OP size is not changed, the hard disk available capacity is sufficient for service use, and the hard disk may not be adjusted at this time.
[0116] 302, if yes, adjust the hard disk OP capacity and the hard disk available capacity according to the hard disk event, and regenerate the setting instruction, wherein the sum of the hard disk OP and the hard disk available capacity remains unchanged.
[0117] It is understandable that after obtaining the hard disk event reported by the hard disk, the hard disk management device determines that the capacity needs to be reallocated, and the hard disk management device dynamically adjusts the capacity partition. For example, if the hard disk available capacity is insufficient, and the hard disk magnification is low at this time, and the OP capacity is surplus, then a certain amount of the hard disk OP capacity quota is reduced and added to the hard disk available capacity, so that the hard disk OP flows to the hard disk available capacity space.
[0118] After the setting instruction is generated, the setting instruction is sent to the hard disk, which is equivalent to the above step 104.
[0119] See also Figure 4 , Figure 4 A schematic diagram of another capacity adjustment method provided in an embodiment of the present application includes:
[0120] 401, periodically obtain hard disk status information.
[0121] It is understandable that the status information includes the capacity usage, performance, lifespan, write amplification, and other status information of each hard disk connected to the storage system. The hard disk management device can also actively and periodically obtain the status information of the hard disk, including periodically sending a query instruction to the hard disk, the query instruction is used to instruct the hard disk to send the above status information. The hard disk management device determines whether the hard disk OP capacity needs to be adjusted based on the acquired status information.
[0122] 402. Determine whether the hard disk OP capacity needs to be adjusted according to the status information.
[0123] It is understandable that after obtaining the hard disk status information, the hard disk management device can determine whether the hard disk OP capacity needs to be adjusted in combination with the service configuration requirements, specifically whether the capacity partition of the hard disk needs to be adjusted.
[0124] 403, if yes, adjust the hard disk OP capacity and the hard disk available capacity according to the status information, and regenerate the setting instruction, wherein the sum of the hard disk OP capacity and the hard disk available capacity remains unchanged.
[0125] It is understandable that if the hard disk write amplification is low and the hard disk OP space is surplus, the hard disk OP capacity quota can be reduced and the hard disk available capacity quota can be increased to allow the capacity to flow from the hard disk OP to the hard disk available capacity space; on the contrary, if the hard disk write amplification is high, it is necessary to reduce the hard disk available capacity and increase the hard disk OP capacity to allow the capacity to flow from the hard disk available capacity space to the hard disk OP.
[0126] After the setting instruction is generated, the setting instruction is sent to the hard disk, which is equivalent to the above step 104.
[0127] In a possible implementation method, after dividing the available physical capacity into the hard disk available capacity and the hard disk OP capacity, the method further includes: dividing the hard disk available capacity into the user available capacity and the system capacity according to the system information of the storage system.
[0128] It is understandable that the available capacity of the hard disk can be further divided into user available capacity and system capacity, wherein user available capacity refers to the visible and available capacity presented by the storage system to the outside world; system capacity refers to the capacity of the storage system to store the data generated by itself and to ensure its own operation, such as metadata and configuration information for storing user data, ensuring system operation, etc. It is understandable that after planning the hard disk OP according to the business configuration requirements, part of the original space used for the hard disk OP flows into the available capacity of the hard disk. If the capacity required to execute the business does not reach the available capacity of the hard disk, part of the available capacity of the hard disk can be used for the storage system to store related data, so as to improve the operation and working capacity of the storage system.
[0129] At this time, the setting instruction is specifically used to instruct the hard disk to divide the available physical capacity into user available capacity, system capacity and hard disk OP capacity.
[0130] When the hard disk OP capacity needs to be adjusted, in the above steps 302 and 403, the hard disk OP capacity and the hard disk available capacity are adjusted, and the setting instruction is regenerated, which specifically includes:
[0131] According to the system information, the hard disk OP capacity and the system capacity are adjusted, and the setting instruction is regenerated, wherein the sum of the hard disk OP capacity and the system capacity remains unchanged.
[0132] It is understandable that in the embodiment of the present application, it is necessary to give priority to the configuration requirements of users for processing related services on the hard disk. Therefore, when the hard disk OP capacity needs to be adjusted, the user available capacity in the hard disk available capacity is not changed, but the system capacity is changed to give priority to ensuring that the business can be processed smoothly and the normal operation of the hard disk. It should be noted that when adjusting the hard disk OP capacity and system capacity, not only the status information of the hard disk should be considered, but also the system information of the storage system should be considered, so that the hard disk OP capacity and system capacity are still in a state of normal operation after adjustment.
[0133] In a possible implementation method, the system capacity includes system data capacity and system OP capacity.
[0134] It can be understood that the system OP is a reserved space of the storage system, similar to the hard disk OP, and the system OP is used for self-optimization of the storage system to ensure the normal operation of the storage system. After the system capacity is divided, the system capacity can be further divided into system data capacity and OP capacity, where the system data capacity is the data generated by the storage system itself, such as metadata of user data, configuration information, etc.
[0135] At this time, the setting instruction is specifically used to instruct the hard disk to divide the available physical capacity into user available capacity, system data capacity, system OP capacity and hard disk OP capacity.
[0136] When the hard disk OP capacity needs to be adjusted, adjust the hard disk OP capacity and hard disk available capacity, and regenerate the setting instructions, including:
[0137] According to the system information, the hard disk OP capacity and the system OP capacity are adjusted, and the setting instruction is regenerated, wherein the sum of the hard disk OP capacity and the system OP capacity remains unchanged.
[0138] It is understandable that in the embodiment of the present application, the system OP and the hard disk OP share traffic, and the OP ratio used by the hard disk and the system is adjusted through dynamic allocation to meet the capacity requirements of both. It should be noted that when adjusting the hard disk OP capacity and the system OP capacity, not only the status information of the hard disk should be considered, but also the system information of the storage system should be considered, so that the hard disk OP capacity and the system OP capacity are still in a state of normal operation after adjustment.
[0139] It is understandable that the above-mentioned division of capacity areas (partitions) is a logical concept of the hard disk management device. In a possible scenario, the storage system needs to access multiple hard disks to jointly process multiple services. When the user configures the service, the storage system can determine the total capacity required to process these services according to the configuration requirements, and then divide the total capacity into multiple capacity partitions for processing different services. Therefore, for a single hard disk, the hard disk available capacity partition may be further divided into sub-functional areas, and different sub-functional areas are used to process different services. The embodiment of this application only describes the main functional areas such as user available capacity, system data capacity, system OP capacity and hard disk OP capacity, and does not limit the partitioning method.
[0140] The method provided in the embodiment of the present application, in actual application, allows the hard disk controller to manage all available physical capacity, including user available capacity and disk OP, through the FTL table, and report it to the storage system through the standard protocol. The hard disk management device of the storage system queries the expanded capacity size, that is, the size of all available physical capacity, and can be operated through the standard protocol. When the number of NAND FLASH inside the hard disk remains unchanged, the user available capacity can be increased by reasonably configuring the OP size: for example, a hard disk with an available physical capacity of 200G usually reserves 25G of hard disk OP, and the user available capacity is 175G. By analyzing the configuration requirements of hard disk performance and business, it is found that 18G of hard disk OP is sufficient for software and hardware operation, and the user available capacity increases to 182G at this time. Similarly, when the hard disk is produced, due to the reasonable configuration of the OP size, the user available capacity of the same size can be composed of a smaller number of NAND FLASH, thereby reducing the hard disk cost: for example, under normal circumstances, the user available capacity is a 200G hard disk, and a 30G OP is configured, that is, the available physical capacity of the hard disk to be produced is 230G. By analyzing the hard disk performance and business configuration requirements, it was found that a 25G hard disk is sufficient for software and hardware operation. If the user's available capacity remains unchanged, the available physical capacity of the hard disk produced only needs to be 225G, thus reducing the hard disk cost.
[0141] On the second aspect, the present application provides a hard disk control method, which can be executed by the hard disk, specifically by the hard disk controller in the hard disk. The hard disk controller refers to the software or hardware that sets the internal logic of the hard disk and processes and feedbacks the instructions issued by the hard disk management device.
[0142] See also Figure 1 , Figure 1 The interaction diagram of the storage system and the hard disk provided in the embodiment of the present application includes:
[0143] 106. Send the available physical capacity of the hard disk to the hard disk management device.
[0144] It can be understood that the hard disk management device is software or hardware that reads the status, partitions, and configures the connected hard disks in the storage system. The available physical capacity of the hard disk is the total capacity of the entire hard disk, which includes the hard disk available capacity and the OP capacity. The OP capacity refers to the capacity in the OP, and the hard disk available capacity refers to the capacity that can be used by the storage system or the user. The sum of the OP capacity and the hard disk available capacity is the available physical capacity. To make reasonable use of the capacity of the hard disk, after the hard disk is connected, it is first necessary to send the available physical capacity of the hard disk to the hard disk management device.
[0145] After the hard disk is connected to the storage system, it can actively send the available physical capacity to the storage system, or send the available physical capacity to the storage system after receiving the query instruction sent by the hard disk management device. The query instruction is used to instruct the hard disk to send the available physical capacity.
[0146] 107 . In response to the setting instruction sent by the hard disk management device, divide the available physical capacity of the hard disk, where the setting instruction is used to divide the available physical capacity into the hard disk available capacity and the hard disk OP capacity.
[0147] It is understandable that the partitioning of the hard disk is performed by the hard disk management device. Therefore, after the hard disk controller obtains the setting instruction sent by the hard disk management device, it divides the capacity of the hard disk according to the partition instruction in the instruction, specifically setting the OP capacity. The available capacity of the hard disk is the available physical capacity minus the OP capacity. The setting instruction can only include the OP capacity, indicating that this part of the capacity is only used for the optimization of the hard disk itself and is not allowed to be used by the storage system.
[0148] The hard disk control method provided in the embodiment of the present application divides the available physical capacity of the hard disk by sending the available physical capacity of the hard disk to the hard disk management device and responding to the setting instruction sent by the hard disk management device. Since the hard disk management device determines the hard disk OP according to the service configured by the hard disk, the OP of the hard disk is more in line with the configuration requirements of the current service, and there is no need to reserve too much hard disk OP space, which improves the space utilization of the hard disk and solves the problem of hard disk capacity waste caused by the inability to reasonably utilize the hard disk OP capacity.
[0149] In a possible implementation method, after the hard disk management device of the storage system partitions the capacity, it sends a setting instruction to the hard disk, which is used for the hard disk to set its own OP capacity, so that the hard disk clearly knows the size of the OP capacity configured by the system for the hard disk, and the hard disk management device also ensures that the storage system cannot allocate and use the hard disk OP. For details, please refer to Figure 2 , Figure 2 The hard disk data writing schematic diagram provided in the embodiment of the present application includes:
[0150] 205, receiving data written by the hard disk management device.
[0151] It can be understood that step 205 is equivalent to step 202 in the above-mentioned first aspect embodiment. After the hard disk OP is set for the hard disk, the hard disk can be used normally, and the storage system can write data to the hard disk.
[0152] 206. If the write capacity of the hard disk exceeds the available capacity of the hard disk after writing the data, a write error message is returned.
[0153] It can be understood that step 206 is equivalent to step 203 in the above-mentioned first aspect embodiment. If after writing data to the hard disk, the write capacity of the hard disk exceeds the non-hard disk OP capacity (that is, exceeds the available capacity of the hard disk), it can be said that the hard disk capacity is full. Even if the hard disk OP still has spare capacity, since the hard disk OP is only used for optimization of the hard disk itself, a write error message is sent to the hard disk management device, and the data cannot be written successfully.
[0154] In a possible implementation method, the business processed by the hard disk will change. For example, when business A with high configuration requirements has been processed, the next business B with low configuration requirements can be processed. At this time, the hard disk OP can be flexibly adjusted to reduce the OP capacity and increase the available capacity of the hard disk, so that users can use more space. For example, the hard disk controller will report the hard disk time or feedback the hard disk status information, so that the hard disk management device can adjust the capacity allocation strategy of the hard disk, as follows:
[0155] Please refer to Figure 3 , Figure 3 A schematic diagram of a capacity adjustment method provided in an embodiment of the present application includes:
[0156] 303, reporting the hard disk event of the hard disk to the hard disk management device.
[0157] It is understandable that hard disk events include, but are not limited to, hard disk service changes, insufficient hard disk available capacity, bad sectors on the hard disk, damage to the hard disk partition table, and all other hard disk-related events. After reporting the hard disk event to the hard disk management device, the hard disk management device determines whether it is necessary to reallocate the capacity. If not, no processing is performed. If it is necessary to reallocate the capacity, the hard disk management device dynamically adjusts the capacity partition, which is specifically manifested in that the hard disk management device sends a setting instruction to the hard disk, and then the hard disk controller partitions the available physical capacity in response to the setting instruction, that is, returns to step 107.
[0158] See also Figure 4 , Figure 4 A schematic diagram of another capacity adjustment method provided in an embodiment of the present application includes:
[0159] 404 , in response to the query instruction sent by the hard disk management device, send the hard disk status information to the hard disk management device.
[0160] It can be understood that step 404 is equivalent to step 401 in the above-mentioned first aspect embodiment, and the status information includes status information such as capacity usage, performance, life, write amplification, etc. of each hard disk connected to the storage system. The hard disk management device can also actively and periodically obtain the status information of the hard disk, including sending a query instruction to the hard disk, and the query instruction is used to instruct the hard disk to send the above status information. After receiving the query instruction sent by the hard disk management device, the hard disk controller feeds back the status information of the hard disk. After the hard disk management device obtains the status information of the hard disk, it can determine whether the OP capacity of the hard disk needs to be adjusted in combination with the business configuration requirements, which is specifically manifested in whether the capacity partition of the hard disk needs to be adjusted. If adjustment is required, the setting instruction is re-issued, and then the hard disk controller partitions the available physical capacity in response to the setting instruction, that is, returns to step 107.
[0161] The method provided in the embodiment of the present application, in actual application, allows the hard disk controller to manage all available physical capacity, including user available capacity and on-disk OP, through the FTL table, and report it to the storage system through the standard protocol. The hard disk management device of the storage system queries the expanded capacity size, that is, the size of all available physical capacity, and can operate through the standard protocol.
[0162] On the third aspect, the present application provides a hard disk management device, which can be deployed in various systems running software, such as DOS operating system, WINDOWS operating system, UNIX operating system, Linux, Netware and other operating systems; it can also be deployed in software systems installed on the system and hardware and software combined devices, so as to be responsible for the capacity management of all SSDs connected to the storage controller, divide the capacity it manages into multiple capacity areas for different users, manage the quota and allocation of capacity space, realize dynamic adjustment of quotas, avoid over-capacity use, and realize dynamic flow of capacity; query hard disk capacity, write amplification and other information through protocol commands, adjust the capacity partition in combination with the system capacity usage, and send commands to the hard disk to set the hard disk OP capacity and operation strategy. The hard disk management device provided in the embodiment of the present application can be a hardware device of the system itself, or a hard disk management device in the system environment, or a processing module or unit specifically used to manage hard disks connected to the system.
[0163] Please refer to Figure 5 As shown, in the embodiment of the present application, the hard disk management device 500 includes: an acquisition module 501, a configuration module 502, a setting module 503 and a sending module 504 connected via a bus. The hard disk management device 500 can be the hard disk management device in the above method embodiment, and can also be configured as one or more chips in the storage system. The hard disk management device 500 can be used to perform some or all of the hard disk management functions in the above method embodiment.
[0164] For example, the acquisition module 501 can be used to execute step 101, step 203, step 204 or step 401 in the above method embodiment and receive and acquire corresponding data. For example, the acquisition module 501 is used to acquire the available physical capacity of the hard disk, and is also used to periodically acquire the status information of the hard disk, and is also used to receive the write error information of the hard disk when the write capacity of the hard disk exceeds the available capacity of the hard disk, and is also used to receive the write success information of the hard disk when the write capacity of the hard disk does not exceed the available capacity of the hard disk; the configuration module 502 is used to execute step 102 in the above method embodiment. For example, the configuration module 502 can be used to allocate hard disk space to the hard disk according to the configuration requirements of the service configured by the hard disk. The disk reserved space OP capacity; the setting module 503 is used to execute step 103, step 302, and step 403 in the above method embodiment, for example, the setting module 503 can be used to generate a setting instruction, the setting instruction is used to instruct the hard disk to divide the available physical capacity into the hard disk available capacity and the hard disk OP capacity, and is also used to adjust the hard disk OP capacity and the hard disk available capacity according to the hard disk event, and regenerate the setting instruction, and is also used to adjust the hard disk OP capacity and the hard disk available capacity according to the status information, and regenerate the setting instruction; the sending module 504 is used to execute step 104 in the above method embodiment, for example, the sending module 504 can be used to send the setting instruction to the hard disk.
[0165] In a possible implementation method, a processing module is also included for executing steps 301 and 402 in the above method embodiment. For example, the processing module can be used to respond to a hard disk event reported by the hard disk to determine whether the OP capacity of the hard disk needs to be adjusted, and also to determine whether the OP capacity of the hard disk needs to be adjusted based on the status information.
[0166] In a possible implementation method, a query module is further included to execute step 100 in the above method embodiment. For example, the query module is used to send a query instruction to the hard disk, and the query instruction is used to instruct the hard disk to send the available physical capacity.
[0167] In a possible implementation method, a writing module is further included, which is used to execute step 202 in the above method embodiment. For example, the writing module is used to write data to a hard disk.
[0168] The device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system. For example, the hard disk management device specifically includes a hard disk management module, a storage configuration management module, a policy control module, etc., wherein the implementation of the configuration steps such as the steps of allocating OP to the hard disk, the steps of dividing the available physical capacity, and the steps of setting the system capacity are completed by the storage configuration management module in the storage system; the steps of judging whether the hard disk OP capacity needs to be adjusted according to the hard disk event, judging whether the hard disk OP capacity needs to be adjusted according to the status information, and the steps of generating setting instructions are implemented by setting a separate policy control module. The hard disk management module and other modules will feedback various information of the system and the hard disk to the policy control module, and it will also collect information, summarize all the information and provide the optimal capacity allocation strategy to the hard disk management module, and the hard disk management module will dynamically adjust the capacity of the system and the hard disk according to the strategy.
[0169] It should be understood that the above Figure 5 The processes executed between the modules of the hard disk management device in the corresponding embodiment are similar to those in the above Figures 1 to 4 The process executed by the storage system in the corresponding method embodiment is similar and will not be repeated here.
[0170] Fourthly, the present application provides a hard disk controller, which can be deployed in various types of hard disks to set the internal logic of the hard disk to realize the reporting and accessibility of all available physical capacity; process the query commands issued by the hard disk management module through the protocol, and feedback the internal capacity of the hard disk, write amplification and other information; process the setting commands issued by the hard disk management module through the protocol, and adjust the disk content allocation and read and write and operation strategies; report hard disk events to the hard disk management module through the protocol, such as hard disk access, capacity changes, performance changes and other events, and the hard disk management module will handle the events accordingly.
[0171] Please refer to Figure 6 As shown, the hard disk controller 600 in the embodiment of the present application includes: a sending module 601 and a partitioning module 602 connected by a bus. The hard disk controller 600 can be the hard disk controller in the above method embodiment, and can also be configured as one or more chips in the hard disk. The hard disk controller can be used to perform some or all of the functions of the hard disk control in the above method embodiment.
[0172] For example, the sending module 601 can be used to execute step 106 and step 206 in the above method embodiment. For example, the sending module 601 is used to send the available physical capacity of the hard disk to the hard disk management device, and is also used to return write error information; the partition module 602 can be used to execute step 107 in the above method embodiment. For example, the partition module 602 can be used to divide the available physical capacity of the hard disk in response to the setting instruction sent by the hard disk management device, and the setting instruction is used to divide the available physical capacity into the hard disk available capacity and the hard disk OP capacity.
[0173] In a possible implementation method, a reporting module is further included, which is used to execute step 303 in the above method embodiment. For example, the reporting module is used to report the hard disk event of the hard disk to the hard disk management device.
[0174] In a possible implementation method, a feedback module is further included to execute step 404 in the above method embodiment. For example, the feedback module is used to send the status information of the hard disk to the hard disk management device in response to the query instruction sent by the hard disk management device.
[0175] In a possible implementation method, a receiving module is further included, which is used to execute step 205 in the above method embodiment. For example, the receiving module is used to receive data written by the hard disk management device.
[0176] It should be understood that the above Figure 6 The processes executed between the modules of the hard disk controller in the corresponding embodiment are similar to those described above. Figures 1 to 4 The process executed by the hard disk in the corresponding method embodiment is similar, and the details will not be repeated here.
[0177] Figure 7 A possible structural diagram of a storage system 700 in an embodiment of the present application is shown, and the storage system 700 can be configured as the aforementioned hard disk management device. The storage system 700 may include: a processor 702, a computer-readable storage medium / memory 703, a transceiver 704, an input device 705 and an output device 706, and a bus 701. Among them, the processor, the transceiver, the computer-readable storage medium, etc. are connected through a bus. The embodiment of the present application does not limit the specific connection medium between the above components.
[0178] The transceiver 704 and the processor 702 can implement the above Figures 1 to 4 The corresponding steps in any of the embodiments will not be described in detail here.
[0179] Understandably, Figure 7Only a simplified design of the storage system is shown. In actual applications, the storage system may include any number of transceivers, processors, memories, etc., and all processing devices that can implement the present application are within the protection scope of the present application.
[0180] The processor 702 involved in the above storage system 700 can be a general-purpose processor, such as a CPU, a network processor (NP), a microprocessor, etc., or an ASIC, or one or more integrated circuits for controlling the execution of the program of the present application. It can also be a digital signal processor (DSP), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The controller / processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of DSP and microprocessors, etc. The processor usually performs logical and arithmetic operations based on program instructions stored in the memory.
[0181] The bus 701 mentioned above may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0182] The computer-readable storage medium / memory 703 mentioned above may also store an operating system and other application programs. Specifically, the program may include a program code, and the program code includes computer operation instructions. More specifically, the above-mentioned memory may be a ROM, other types of static storage devices that can store static information and instructions, RAM, other types of dynamic storage devices that can store information and instructions, disk storage, etc. The memory 703 may be a combination of the above-mentioned storage types. And the above-mentioned computer-readable storage medium / memory may be in the processor, or may be outside the processor, or distributed on multiple entities including a processor or a processing circuit. The above-mentioned computer-readable storage medium / memory may be specifically embodied in a computer program product. For example, a computer program product may include a computer-readable medium in a packaging material.
[0183] Alternatively, the embodiment of the present application also provides a general processing system, such as a chip, which includes: one or more microprocessors that provide processor functions; and an external memory that provides at least a portion of the storage medium, all of which are connected to other supporting circuits through an external bus architecture. When the instructions stored in the memory are executed by the processor, the processor executes the first device in Figures 1 to 4 Part or all of the steps in the hard disk management method in this embodiment, and / or other processes used for the technology described in this application.
[0184] The steps of the method or algorithm described in conjunction with the disclosure of the present application can be implemented in a hardware manner, or can be implemented by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in a RAM memory, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a mobile hard disk, a CD-ROM or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and can write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC. In addition, the ASIC can be located in a terminal. Of course, the processor and the storage medium can also be present in the first communication device as discrete components.
[0185] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0186] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0187] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0188] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0189] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.
Claims
1. A hard disk management method, characterized in that: include: Obtaining the actual capacity of a hard disk, the hard disk being connected to a storage system; Dividing the acquired actual capacity of the hard disk into hard disk available capacity and hard disk OP capacity, wherein the hard disk available capacity includes user available capacity and system capacity, the system capacity includes system data capacity and system OP capacity, the hard disk OP capacity and the system OP capacity are determined according to the status information of the hard disk and the system information of the storage system, the sum of the hard disk OP capacity and the system capacity remains unchanged, and the sum of the hard disk OP capacity and the system OP capacity remains unchanged; A setting instruction is sent to the hard disk, wherein the setting instruction is used to instruct the hard disk to adjust the OP ratio of the hard disk OP capacity and the system OP capacity.
2. The method according to claim 1, characterized in that When the hard disk OP capacity is not set when the hard disk leaves the factory, the actual capacity of the hard disk refers to the total capacity of the hard disk; when the hard disk OP capacity is set when the hard disk leaves the factory, the actual capacity of the hard disk includes the hard disk available capacity and the hard disk OP capacity.
3. The method according to claim 1, characterized in that Also includes: In response to the hard disk event reported by the hard disk, determining whether the OP capacity of the hard disk needs to be adjusted; If yes, the hard disk OP capacity and the system OP capacity are adjusted according to the hard disk event, and a setting instruction is regenerated.
4. The method according to claim 1, characterized in that: Also includes: Periodically obtaining status information of the hard disk; According to the status information, determining whether the OP capacity of the hard disk needs to be adjusted; If so, the hard disk OP capacity and the system OP capacity are adjusted according to the status information, and a setting instruction is regenerated.
5. The method according to claim 1, characterized in that Before obtaining the actual capacity of the hard disk, it also includes: A query instruction is sent to the hard disk, where the query instruction is used to instruct the hard disk to send the actual capacity.
6. A hard disk control method, characterized in that: include: Sending the actual capacity of the hard disk to the hard disk management device, the hard disk has been connected to the storage system, and the actual capacity of the hard disk is divided by the storage system into hard disk available capacity and hard disk OP capacity, wherein the hard disk available capacity includes user available capacity and system capacity, and the system capacity includes system data capacity and system OP capacity; receiving a setting instruction sent by the hard disk management device, wherein the setting instruction is used to instruct the hard disk to adjust the OP ratio of the hard disk OP capacity and the system OP capacity, wherein the hard disk OP capacity and the system OP capacity are determined by the storage system according to the status information of the hard disk and the system information of the storage system, and the sum of the hard disk OP capacity and the system capacity remains unchanged; In response to the setting instruction, the OP ratio of the hard disk OP capacity and the system OP capacity is adjusted.
7. The method according to claim 6, characterized in that Also includes: In response to the query instruction sent by the hard disk management device, the status information of the hard disk is sent to the hard disk management device.
8. A hard disk management device, characterized in that: include: An acquisition module, used to acquire the actual capacity of a hard disk, the hard disk being connected to a storage system; a configuration module, configured to divide the acquired actual capacity of the hard disk into hard disk available capacity and hard disk OP capacity, wherein the hard disk available capacity includes user available capacity and system capacity, the system capacity includes system data capacity and system OP capacity, the hard disk OP capacity and the system OP capacity are determined according to the status information of the hard disk and the system information of the storage system, the sum of the hard disk OP capacity and the system capacity remains unchanged, and the sum of the hard disk OP capacity and the system OP capacity remains unchanged; The sending module is used to send a setting instruction to the hard disk, wherein the setting instruction is used to instruct the hard disk to adjust the OP ratio of the hard disk OP capacity and the system OP capacity.
9. The device according to claim 8, characterized in that When the hard disk OP capacity is not set when the hard disk leaves the factory, the actual capacity of the hard disk refers to the total capacity of the hard disk; when the hard disk OP capacity is set when the hard disk leaves the factory, the actual capacity of the hard disk includes the hard disk available capacity and the hard disk OP capacity.
10. The device according to claim 8, characterized in that The device also includes a processing module and a setting module. The processing module is used to: in response to the hard disk event reported by the hard disk, determine whether the OP capacity of the hard disk needs to be adjusted; The setting module is used to adjust the hard disk OP capacity and the system OP capacity according to the hard disk event and regenerate a setting instruction when the processing module determines that the hard disk OP capacity needs to be adjusted.
11. The device according to claim 8, characterized in that The device also includes a processing module and a setting module. The acquisition module is further used to periodically acquire the status information of the hard disk; The processing module is used to determine whether the hard disk OP capacity needs to be adjusted according to the status information; The setting module is used to adjust the hard disk OP capacity and the system OP capacity according to the status information and regenerate a setting instruction when the processing module determines that the hard disk OP capacity needs to be adjusted.
12. The device according to any one of claims 8 to 11, characterized in that Also includes: The query module is used to send a query instruction to the hard disk, wherein the query instruction is used to instruct the hard disk to send the actual capacity.
13. A hard disk controller, characterized in that: include: A sending module, used for sending the actual capacity of the hard disk to the hard disk management device, the hard disk has been connected to the storage system, and the actual capacity of the hard disk is divided by the storage system into hard disk available capacity and hard disk OP capacity, wherein the hard disk available capacity includes user available capacity and system capacity, and the system capacity includes system data capacity and system OP capacity; a receiving module, configured to receive a setting instruction sent by the hard disk management device, wherein the setting instruction is used to instruct the hard disk to adjust the OP ratio of the hard disk OP capacity and the system OP capacity, wherein the hard disk OP capacity and the system OP capacity are determined by the storage system according to the status information of the hard disk and the system information of the storage system, and the sum of the hard disk OP capacity and the system capacity remains unchanged; and the sum of the hard disk OP capacity and the system OP capacity remains unchanged; The partition module is used to adjust the OP ratio of the hard disk OP capacity and the system OP capacity in response to the setting instruction.
14. The hard disk controller according to claim 13, characterized in that: Also includes: A feedback module is used to send the status information of the hard disk to the hard disk management device in response to the query instruction sent by the hard disk management device.
Citation Information
Patent Citations
Solid hard disk, electronic device with solid hard disk and dynamic capacity control method of solid hard disk
CN103309816A
Configuration method and apparatus and solid-state disk
CN105159839A
Method for formatting PCIE SSD capacity
CN106126117A
Flash memory space dynamic allocation method and solid state disk
CN113093993A
Hard disk pressure testing method, system and equipment and medium
CN114550798A
