A hard disk testing method and device, electronic equipment and medium

By creating separate disk arrays for different regions of the shingled hard disk and adopting an adaptive data block processing approach, the problems of insufficient accuracy and stability in shingled hard disk testing are solved, achieving efficient performance testing and data block management.

CN116312719BActive Publication Date: 2026-03-31SUGON INFORMATION IND
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-28
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing hard drive testing solutions lack comprehensive testing methods for shingled disk drives (SLDs), resulting in insufficient testing accuracy and stability.

Method used

For the shingled magnetic recording (SMR) region and the conventional magnetic recording (CMR) region in shingled hard disks, disk arrays were created separately, and performance tests were conducted using adaptive data block distribution and reading methods, including sequential and random writes. Combined with cache area management, read and write commands were adjusted through the database system to improve the test success rate.

Benefits of technology

It improves the accuracy and stability of shingled hard disk testing, ensures adaptability testing of magnetic recording characteristics in different areas, solves the problem of the write head affecting data on other tracks, and realizes separate management of each disk array and efficient writing of data blocks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116312719B_ABST
    Figure CN116312719B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a hard disk testing method and device, electronic equipment and medium. The method comprises: creating a disk array for a shingled magnetic recording (SMR) area and a conventional magnetic recording (CMR) area in a shingled hard disk; issuing data blocks to the disk array and / or reading data blocks; wherein the way of issuing data blocks to the disk array corresponding to the SMR area does not include a random way; and performing performance testing on the disk array issuing data blocks and / or reading data blocks. The technical solution can adaptively create a disk array for different areas of a shingled hard disk, and then perform testing respectively, thereby improving the accuracy and stability of shingled hard disk performance testing through a scheme suitable for shingled hard disk testing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of hard disk testing technology, and in particular to a hard disk testing method, apparatus, electronic device and medium. Background Technology

[0002] Shingled Magnetic Recording (SMR) hard drives are high-capacity hard drives that utilize a novel magnetic storage technology. SMR hard drives overlap the data tracks on the platters, much like roof tiles, hence the name "Shingled Magnetic Recording." This technology requires very little change in the manufacturing process but can significantly increase disk storage density. In today's world of rapidly growing data, SMR technology can effectively reduce the cost per unit capacity of disk storage and represents the future trend of high-density disk storage technology.

[0003] Existing hard drive stability stress tests and disk array creation stability tests are usually for Perpendicular Magnetic Recording (PMR) hard drives or Horizontal Magnetic Recording (LMR) hard drives. When testing hard drive read and write, testing tools are usually used to perform sequential, random, or mixed read and write tests on the test disk. When testing disk array creation stability, the method of creating disk arrays for non-shingled hard drives is still used. There is no perfect testing scheme for SMR hard drives. Summary of the Invention

[0004] This application provides a hard disk testing method, apparatus, electronic device, and medium to provide a comprehensive testing solution for shingled hard disks (SHDs) and improve the accuracy of SHD testing.

[0005] According to one aspect of this application, a hard disk testing method is provided, the method comprising:

[0006] Create separate disk arrays for the shingled magnetic recording (SMR) region and the conventional magnetic recording (CMR) region in shingled hard disks;

[0007] Sending data blocks and / or reading data blocks to the disk array; wherein, the method of sending data blocks to the disk array corresponding to the SMR region does not include random methods;

[0008] Perform performance tests on the disk array that sends and / or reads data blocks.

[0009] The above technical solution creates disk arrays for different areas of the shingled hard disk, thereby adaptively creating disk arrays for performance testing based on the magnetic recording characteristics of different areas. This provides a complete testing solution for shingled hard disks, making the testing solution fully applicable to the testing of shingled hard disks and improving the accuracy and stability of shingled hard disk testing.

[0010] Optionally, separate disk arrays may be created for the shingled magnetic recording (SMR) region and the conventional magnetic recording (CMR) region in the shingled hard disk, including:

[0011] Obtain disk array parameters issued by the database system; wherein, the disk array parameters include the size of the disk array, the number of disk arrays, and the form of the disk array; the form of the disk array includes at least one of Raid0 to Raid7 and variations of Raid0 to Raid7;

[0012] For the SMR and CMR regions in a shingled hard disk, disk arrays are created respectively based on the disk array parameters.

[0013] The above technical solution improves the accuracy of testing by creating disk arrays for SMR and CMR regions based on disk array parameters, and the disk arrays can take various forms. This allows for testing the performance of shingled hard drives applied to specific disk array types (such as RAID 0, RAID 1, RAID 5, RAID 6, RAID 10, RAID 60, etc.).

[0014] Optionally, for the SMR and CMR regions in the shingled magnetic disk drive, disk arrays are created separately based on the disk array parameters, including:

[0015] Combining the size, number, and format of the disk array yields at least two methods for creating a disk array;

[0016] For the SMR and CMR regions in shingled hard disks, create disk arrays based on at least two disk array creation methods.

[0017] The above technical solution combines the creation conditions of disk arrays to obtain at least two disk array creation methods, and creates at least two types of disk arrays for SMR and CMR regions, thereby enriching the forms of disk arrays. It can test the performance of shingled hard disks when applied to different disk arrays or multiple disk arrays, and improve the comprehensiveness and accuracy of shingled hard disk testing.

[0018] Optionally, before creating disk arrays for the shingled magnetic recording (SMR) region and the conventional magnetic recording (CMR) region in a shingled hard disk, the method further includes:

[0019] The SMR and CMR regions in the shingled magnetic disk are identified by a region identification tool, and the identification information is reported to the database system. The database then determines the logical block address based on the identification information.

[0020] Logically partition the SMR and CMR regions based on the logical block addresses issued by the database;

[0021] Disk arrays were created separately for the shingled magnetic recording (SMR) region and the conventional magnetic recording (CMR) region in shingled magnetic disks, including:

[0022] Create disk arrays based on the logical partitions of the SMR region and the CMR region, respectively.

[0023] The above technical solution determines the logical block address of the logical partition through the database system, and then, based on the logical block address, enables the logical partition to meet the requirements for disk array creation, avoiding the problem that the server system where the shingled hard disk is located cannot customize the disk array creation form due to its own partitioning.

[0024] Optionally, create a disk array for the SMR region, including:

[0025] For each of the at least one disk array created, a cache region is created to cache the data to be processed in each disk array.

[0026] The above technical solution creates cache areas in the disk arrays within the SMR region to cache the unprocessed areas in each disk array. This can meet the data writing requirements of shingled magnetic recording, solve the problem that a large write head affects the data of other tracks, and avoid the problem of chaos caused by centralized management of data in each disk array. It achieves separate management of each disk array and improves the writing efficiency of data blocks.

[0027] Optionally, sending data blocks to and / or reading data blocks from the disk array includes:

[0028] Receive at least one data block read / write method issued by the database system; wherein, at least one data block read / write method is obtained by combining different read / write forms and different data block sizes;

[0029] Data blocks are sent to and / or read from the disk array according to at least one data block read / write method.

[0030] The above technical solution achieves effective testing of shingled hard disk drives by issuing at least one data block read / write method, and can also customize and determine multiple data block read / write methods. By testing shingled hard disk drives through multiple read / write methods, the performance of shingled hard disk drives in handling various data processing operations can be tested more comprehensively.

[0031] Optionally, sending data blocks to and / or reading data blocks from the disk array includes:

[0032] If sending a data block to the disk array fails and / or reading a data block from the disk array fails, a failure code is generated;

[0033] The failure code is reported to the database system so that the database system can adjust the data block read / write instructions according to the failure code and reissue them.

[0034] If the database system adjusts the number of times the data block read / write command is reissued to reach the preset number, and sending data blocks to the disk array still fails and / or reading data blocks from the disk array still fails, then the steps of creating disk arrays for the SMR region and CMR region of the shingled hard disk and sending and / or reading data blocks to the disk array are re-executed.

[0035] The above technical solution improves the success rate of data block read and write by promptly sending a failure code to the database system when data block read / write fails, enabling the database system to adjust and reissue the read / write command. This timely adjustment when problems occur with the data block read / write command improves the success rate of data block read and write.

[0036] According to another aspect of this application, a hard disk testing apparatus is provided, comprising:

[0037] The disk array creation module is used to create disk arrays for the shingled magnetic recording (SMR) region and the conventional magnetic recording (CMR) region in shingled hard disks, respectively.

[0038] The data block processing module is used to send data blocks to and / or read data blocks from the disk array; wherein, the method of sending data blocks to the disk array corresponding to the SMR region does not include random methods;

[0039] The performance testing module is used to perform performance tests on disk arrays that send and / or read data blocks.

[0040] According to another aspect of this application, an electronic device is provided, the electronic device comprising:

[0041] At least one processor; and

[0042] A memory that is communicatively connected to at least one processor; wherein,

[0043] The memory stores a computer program that can be executed by at least one processor, such that the at least one processor is able to execute the hard disk testing method of any embodiment of this application.

[0044] According to another aspect of this application, a computer-readable storage medium is provided, which stores computer instructions for causing a processor to execute and implement the hard disk testing method of any embodiment of this application.

[0045] The technical solution of this application embodiment creates disk arrays for the shingled magnetic recording (SMR) region and the conventional magnetic recording (CMR) region in a shingled hard disk drive (SHD); it then sends and / or reads data blocks to the disk arrays; wherein the method of sending data blocks to the disk array corresponding to the SMR region does not include a random method; and it performs performance testing on the disk arrays that send and / or read data blocks. This technical solution, by creating disk arrays for different regions of the shingled hard disk drive, adaptively creates disk arrays for performance testing based on the magnetic recording characteristics of different regions, providing a comprehensive testing scheme for shingled hard disk drives. This makes the testing scheme fully applicable to the testing of shingled hard disk drives, improving the accuracy and stability of shingled hard disk drive testing.

[0046] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description

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

[0048] Figure 1 This is a flowchart of a hard disk testing method according to Embodiment 1 of this application;

[0049] Figure 2 This is a flowchart of a hard disk testing method according to Embodiment 2 of this application;

[0050] Figure 3 This is a flowchart of a hard disk testing method according to Embodiment 3 of this application;

[0051] Figure 4 This is a schematic diagram of a hard disk testing device according to Embodiment 4 of this application;

[0052] Figure 5 This is a schematic diagram of the structure of the electronic device provided in Embodiment 5 of this application. Detailed Implementation

[0053] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0054] It should be noted that the terms "first," "second," "target," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0055] Example 1

[0056] Figure 1 This is a flowchart illustrating a hard disk testing method provided in Embodiment 1 of this application. This embodiment is applicable to testing hard disks, typically shingled magnetic resonance (SMR) hard disks. The method can be executed by a hard disk testing device, which can be implemented in hardware and / or software and can be configured in an electronic device with target determination capabilities. Figure 1 As shown, the method includes:

[0057] S110. Create disk arrays for the shingled magnetic recording (SMR) region and the conventional magnetic recording (CMR) region in the shingled hard disk.

[0058] Shingled Magnetic Recording (SMR) disks are magnetic recording hard disks where data tracks on the platters are overlapped. An SMR disk includes a Shingled Magnetic Recording (SMR) area and a Conventional Magnetic Recording (CMR) area. The SMR area uses SMR recording and only supports sequential writes, used to store actual data. The CMR area uses conventional magnetic recording and supports both sequential and random writes, used to store metadata. Generally, the capacity of the CMR area is smaller than that of the SMR area.

[0059] Because shingled magnetic resonance (SMR) hard drives contain two distinct regions—SMR and CMR—each with its own characteristics, using a single disk array creation and testing method may result in low test reliability and fail to accurately reflect the true performance of the SMR hard drive. Therefore, in this embodiment, disk arrays are adaptively created separately for the SMR and CMR regions. This allows for separate testing of the disk arrays in the SMR and CMR regions, thereby improving the accuracy and reliability of the tests. For distinction, the disk array created for the SMR region can be referred to as a primary disk array, and the disk array created for the CMR region can be referred to as a secondary disk array.

[0060] In one feasible approach, the disk arrays created in the SMR and CMR regions can be of the same type, such as RAID 0, RAID 1, RAID 5, RAID 6, RAID 10, or RAID 60. After testing one type of disk array, the shingled hard drive is reformatted, and other types of disk arrays are recreated and tested again, thus evaluating the performance of shingled hard drives when applied to various types of disk arrays. In another feasible approach, the disk arrays created in the SMR and CMR regions can be of different types, for example, a RAID 0 disk array can be created in the SMR region, and a RAID 1 disk array can be created in the CMR region, thus evaluating the performance of shingled hard drives when applied to different types of disk arrays. In another feasible solution, a Raid0 disk array can be created in the SMR area first, and a Raid1 disk array can be created in the CMR area for testing. After the test is completed, the shingled hard disk is formatted, and then a Raid5 disk array is created in the SMR area, and a Raid6 disk array is created in the CMR area for testing. After the test is completed, the shingled hard disk is formatted again to create other types of disk arrays for testing. There are no restrictions on the combination of disk array types or the number of tests.

[0061] In this embodiment, S110 can be executed by the system of the server where the shingled hard disk drive (SMR) is located. S110 can be executed when a disk array creation command is received from the data system. In this embodiment, the database system sends a disk array creation command to the server where the SMR is located. The server system executes the command, creating disk arrays for both the SMR and CMR regions, and then sends creation information back to the database system. The database system can also send a query command to the server to check the disk array creation status. The database system and the server system can be deployed in the same electronic device or in different electronic devices. If the database system and the server system are deployed in the same electronic device, the hard drive used by the database system cannot be the SMR hard drive being tested; another hard drive must be used.

[0062] S120, Sending data blocks to and / or reading data blocks from the disk array; wherein, the method of sending data blocks to the disk array corresponding to the SMR region does not include random method.

[0063] A data block is a unit of data used for data transmission between electronic devices. The specific content and size of a data block are not specifically limited. Tests can be conducted by sending data blocks only to the disk array to test its data block storage performance, reading data blocks only from the disk array to test its data block output performance, or both sending and reading data blocks from the disk array to test its data block storage and output performance.

[0064] In this embodiment, since the SMR region is recorded using shingled magnetic recording (SMR), which does not support random writing, sequential writing is used instead of random writing when sending data blocks to the disk array corresponding to the SMR region. When sending data to the disk array corresponding to the CMR region, either random writing or sequential writing can be used.

[0065] In this embodiment of the application, the database system can predetermine the relevant parameters for sending and / or reading data blocks to the disk array, such as the following method, reading method, data block size, etc., and execute the process of sending and / or reading data blocks to the disk array according to the relevant parameters determined by the database system.

[0066] In this embodiment of the application, sending data blocks to and / or reading data blocks from the disk array includes steps A1-A3:

[0067] A1: If sending a data block to the disk array fails and / or reading a data block from the disk array fails, a failure code is generated;

[0068] A2: Report the failure code to the database system so that the database system can adjust the data block read / write instructions according to the failure code and reissue them;

[0069] A3: If the database system adjusts the number of times the data block read / write command is reissued to reach the preset number, and sending data blocks to the disk array still fails and / or reading data blocks from the disk array still fails, then the steps of creating disk arrays for the SMR region and CMR region of the shingled hard disk and sending and / or reading data blocks to the disk array are re-executed.

[0070] In this embodiment, a handshake mechanism can be set to improve the effectiveness of data transmission. Specifically, if sending a data block to the disk array fails, and / or reading a data block from the disk array fails, the server system generates a failure code and reports it to the database system. The reporting process can be performed by a preset identification and restoration device. After receiving the failure code, the database system analyzes the failure code to determine the cause of the failure, adjusts the data block read / write instructions according to the cause, and sends the adjusted data block read / write instructions to the server system. The above process can be repeated. If the database adjusts the data block read / write instructions and reissues them a preset number of times, but sending a data block to the disk array still fails and / or reading a data block from the disk array still fails, then the read / write failure may not be caused by the data block read / write instructions. The entire test process needs to be restarted, i.e., the test steps need to be re-executed starting from creating disk arrays for the SMR and CMR regions of the shingled magnetic disk drive. It should be noted that if disk array creation fails after the database system issues a disk array creation command, the above solution can be used to adjust and reissue the disk array creation command. If multiple adjustments and reissues fail, the SMR and CMR regions in the shingled magnetic disk drive (SMDD) can be re-identified, and the disk array can be created separately for each region. This technical solution improves the success rate of data block read / write operations by promptly sending failure codes to the database system when data block read / write operations fail, allowing the database system to adjust and reissue the read / write commands.

[0071] S130. Perform performance testing on the disk array that issues and / or reads data blocks.

[0072] For example, performance tests can be performed on the disk array that receives and / or reads data blocks to assess the performance of shingled disk drives (SLDs) when applied to the array. I / O testing tools (such as FIO testing tools) can be used to test the read and write pressure of the disk array and obtain the test results. Automated tools can also be used to obtain logs from the SLDs and the server hosting the SLDs, and the logs can be analyzed to obtain the test results. The obtained logs can also be stored in a database system according to a preset format for easy viewing at any time.

[0073] In this embodiment of the application, there is no specific limit to the number of tests. Multiple tests can be performed. For example, multiple repeated tests can be performed on the same or different types of disk arrays. Multiple non-repeating tests can also be performed. Non-repeating tests can refer to changing parameters such as data block distribution and / or reading methods, data block size, etc., and then performing the test again. This achieves comprehensive testing from multiple perspectives and improves the accuracy and reliability of testing shingled hard disks.

[0074] The technical solution of this application embodiment creates disk arrays for the shingled magnetic recording (SMR) region and the conventional magnetic recording (CMR) region in a shingled hard disk drive (SHD); it then sends and / or reads data blocks to the disk arrays; wherein the method of sending data blocks to the disk array corresponding to the SMR region does not include a random method; and it performs performance testing on the disk arrays that send and / or read data blocks. This technical solution, by creating disk arrays for different regions of the shingled hard disk drive, adaptively creates disk arrays for performance testing based on the magnetic recording characteristics of different regions, providing a comprehensive testing scheme for shingled hard disk drives. This makes the testing scheme fully applicable to the testing of shingled hard disk drives, improving the accuracy and stability of shingled hard disk drive testing.

[0075] Example 2

[0076] Figure 2 This is a flowchart of a hard disk testing method provided in Embodiment 2 of this application. This embodiment is an optimization based on the above embodiment. Figure 2 As shown, the method in this embodiment specifically includes the following steps:

[0077] S210. Obtain disk array parameters issued by the database system; wherein, the disk array parameters include the size of the disk array, the number of disk arrays, and the form of the disk array; the form of the disk array includes at least one of Raid0 to Raid7 and variations of Raid0 to Raid7.

[0078] For example, a database system can send a disk array creation command to the server hosting the shingled disk drive (SLD). This command can include disk array parameters, allowing the server system to create the disk array based on these parameters. The disk array parameters include the size of the disk array, the number of disks in the array, and the array configuration. The size of the disk array is the number of disks in the array. The number of disks is the number of arrays to be created. The array configuration includes at least one of RAID 0 to RAID 7 and its variations. It can be RAID 0 to RAID 7, or a variation of the above configurations, such as RAID 10 or RAID 60. Obtaining the disk array parameters from the database system facilitates subsequent disk array creation, ensuring the created array matches the testing methods within the database system, thus improving testing efficiency and accuracy.

[0079] S220. Create disk arrays for the SMR region and CMR region in the shingled hard disk based on the disk array parameters.

[0080] After receiving the disk array parameters from the database system, the server hosting the shingled hard disks executes the disk array creation instructions from the database system according to the disk array parameters, creating disk arrays for the SMR and CMR regions respectively.

[0081] In this embodiment of the application, disk arrays are created based on the disk array parameters for the SMR region and CMR region in the shingled magnetic disk, including steps B1-B2:

[0082] B1: Combine the size, number, and format of the disk array to obtain at least two disk array creation methods;

[0083] B2: For the SMR and CMR regions in shingled hard disks, create disk arrays based on at least two disk array creation methods.

[0084] For example, to conduct more comprehensive testing of shingled disk drives (SMDs), at least two types of disk arrays can be created on the same SMD drive, and tests can be performed based on these at least two types of disk arrays to test the performance of the SMD drive in various application scenarios. Specifically, at least two disk array creation methods can be obtained by combining the disk array size, the number of disk arrays, and the disk array type. These combinations can be based on preset combinations of the data system or can be randomized. For example, the disk array size can include 256GB or 512GB, the number of disk arrays can include 3, 4, or 5, and the disk array type can include at least one of RAID 0 to RAID 7 and variations thereof. The following are at least two possible ways to create a disk array: a disk array of 256GB size with 3 disk arrays in Raid0, Raid1, and Raid5 configurations; a disk array of 256GB size with 4 disk arrays in Raid1, Raid5, Raid6, and Raid60 configurations; and a disk array of 512GB size with 5 disk arrays in Raid0, Raid1, Raid5, Raid6, and Raid60 configurations, etc. For the SMR and CMR regions, disk arrays can be created based on at least two disk array creation methods. For example, a disk array can be created in the SMR region using the first disk array creation method and in the CMR region using the second disk array creation method. Alternatively, disk arrays can be created in both the SMR and CMR regions using at least two different methods. Furthermore, the disk array creation methods can be arbitrarily assigned between the SMR and CMR regions, as long as there are at least two methods for creating disk arrays in both regions. This technical solution combines disk array creation conditions to obtain at least two disk array creation methods and creates at least two types of disk arrays for both the SMR and CMR regions. This enriches the forms of disk arrays and enables performance testing of shingled hard drives applied to different disk arrays or multiple disk arrays, improving the comprehensiveness and accuracy of shingled hard drive testing.

[0085] In this embodiment of the application, before creating disk arrays for the shingled magnetic recording (SMR) region and the conventional magnetic recording (CMR) region in the shingled hard disk, the method further includes C1-C2:

[0086] C1: Identify the SMR and CMR regions in the shingled magnetic disk using a region identification tool, and report the identification information to the database system. The database then determines the logical block address based on the identification information.

[0087] C2: Logically partition the SMR and CMR regions based on the logical block addresses issued by the database.

[0088] Accordingly, disk arrays are created separately for the shingled magnetic recording (SMR) region and the conventional magnetic recording (CMR) region in the shingled magnetic disk, including:

[0089] Create disk arrays based on the logical partitions of the SMR region and the CMR region, respectively.

[0090] The region identification tool can be the blkzone tool. This tool identifies SMR and CMR regions in a shingled magnetic resonance (SMR) hard drive and reports the identification information to the database system. This information may include the starting addresses of the SMR and CMR regions. The database system can then determine logical block addresses based on the identification information for logical partitioning of the SMR and CMR regions. These logical block addresses can be the logical addresses of each region within the SMR and CMR partitions. The database system sends these logical block addresses to the server, where the system performs further logical partitioning based on these addresses, resulting in refined partitions. Each partition can be represented by a drive letter, with different partitions using different drive letters. Furthermore, separate disk arrays can be created for the logical partitions within the SMR and CMR regions. For example, a RAID 0 array can be created for the logical partitions C and D drives within the SMR region, and a RAID 1 array can be created for the logical partitions E and F drives within the SMR region. The same logic applies to the CMR region. The above technical solution determines the logical block address of the logical partition through the database system, and then, based on the logical block address, enables the logical partition to meet the requirements for disk array creation, avoiding the problem that the server system where the shingled hard disk is located cannot customize the disk array creation form due to its own partitioning.

[0091] In this embodiment of the application, creating a disk array for the SMR region includes:

[0092] For each of the at least one disk array created, a cache region is created to cache the data to be processed in each disk array.

[0093] The magnetic recording method in the SMR region is shingled magnetic recording, with overlapping tracks and a large write head. When modifying data in the SMR region, the written data can overwrite the data in the next track, causing data corruption in that track. In this embodiment, a cache area is created for each disk array to cache the data to be processed in the disk array. When modifying data in the SMR region, the data of the next track is first placed in the cache area, new data is written to the current track, then the data of the track after that is placed in the cache area, and so on, thus modifying the SMR region data, meeting the write requirements of shingled magnetic recording, and solving the problem of the large write head affecting data in other tracks. In this embodiment, a separate cache area is created for each disk array, avoiding the chaos caused by centralized data management of each disk array, realizing separate management of each disk array, and improving the write efficiency of data blocks.

[0094] S230. Receive at least one data block read / write method issued by the database system; wherein, at least one data block read / write method is obtained by combining different read / write forms and different data block sizes.

[0095] For example, a database system can pre-configure at least one data block read / write method, which is obtained by combining different read / write formats and different data block sizes. Different read / write formats include sequential read / write, random read / write, direct read / write, etc., and different data block sizes can include 16k, 32k, 64k, 128k, 256k, 512k, 1M, 4M, 8M, etc. Combining the read / write format and the data block size yields at least one data block read / write method. For example, combining sequential read / write with 256k means sequentially writing and / or reading 256k data blocks into the disk array; combining random read / write with 4M means randomly writing and / or reading 4M data blocks into the disk array. It should be noted that because the SMR region uses shingled magnetic recording, it does not support random writing; therefore, data block read / write methods including random writing are not used when reading and writing data blocks into the SMR region.

[0096] S240. Distribute data blocks and / or read data blocks to the disk array according to at least one data block read / write method.

[0097] For example, data blocks are sent to and / or read from the disk array according to at least one data block read / write method. For instance, data blocks can be sent to and / or read from the disk array in both the SMR and CMR regions using one data block read / write method. Alternatively, data blocks can be sent to and / or read from the SMR region using the first data block read / write method, and then sent to and / or read from the CMR region using the second data block read / write method. Furthermore, data blocks can be sent to and / or read from the SMR region using the first data block read / write method and then, after performance testing, sent to and / or read from the SMR region using the second data block read / write method and performed performance testing again. This technical solution achieves effective testing of shingled hard disk drives (SHDs) by sending at least one data block read / write method and allows for the customization of multiple data block read / write methods. By testing SHDs using various read / write methods, a more comprehensive performance test of SHDs can be conducted when handling various data processing operations.

[0098] S250, Perform performance testing on the disk array that issues and / or reads data blocks.

[0099] In this embodiment, disk array parameters issued by the database system are obtained for the SMR and CMR regions of the shingled disk drive (SMD). Disk arrays are created based on these parameters, specifically for the SMR and CMR regions. The disk arrays can take various forms, thereby improving the performance of the SMD under specific disk array configurations and enhancing test accuracy. By issuing at least one data block read / write method, effective testing of the SMD is achieved, and multiple data block read / write methods can be customized. Testing the SMD using these various methods provides a more comprehensive assessment of its performance in handling various data processing operations.

[0100] Example 3

[0101] Figure 3 The flowchart below shows a specific implementation of a hard disk testing method provided in Embodiment 3 of this application. Based on the above embodiments, a preferred embodiment is provided as follows:

[0102] S310. Use the blkzone tool to query the SMR and CMR regions on the shingled magnetic disk, determine the identification information, and report the identification information to the database system.

[0103] S320: Based on the identification information, the database system further performs logical partitioning of the SMR and CMR regions, determines the logical block addresses, and sends the logical block addresses to the server where the shingled hard disk is located.

[0104] S330: The server logically partitions the SMR and CMR regions based on logical block addresses and mounts these partitions onto the server's system. After partitioning, the server can send the pointer offset address of the logical partition back to the database system for verification, or the database system can send a logical partition verification command to the server, prompting the server to return a pointer offset address for verification. If the verification determines that the logical partition is inaccurate (i.e., the pointer offset address returned by the server does not match the logical block address in the database system), a new command is issued instructing the server to re-partition the logical partition.

[0105] S340: The database system sends a disk array creation command to the server. The system on the server executes the disk array creation command and, based on the disk array parameters carried in the command, creates a primary disk array for the SMR region and a secondary disk array for the CMR region. A cache region is then created for each disk array in the SMR region.

[0106] S350: The database system sends at least one data block read / write method to the server, which is a combination of different read / write formats and different data block sizes. Random write is not included in the data block read / write methods sent to the SMR area. Different read / write formats and different data block sizes can be arranged and combined to obtain multiple data block read / write methods. Data blocks are read and written to the disk array according to multiple data block read / write methods, and performance tests are performed separately. The performance of the shingled hard disk drive (SHD) in various data processing operations was tested previously.

[0107] The S360 uses the FIO tool to test the IO read / write pressure of the shingled hard drive and generates test results.

[0108] S370 uses automated tool scripts to collect logs from shingled hard disks and servers, and stores the collected logs in a database according to a preset format, so as to facilitate performance analysis of shingled hard disks and servers based on the logs.

[0109] S380: Reset the pointer of the shingled hard disk to the hard disk's factory state, that is, the starting position of the logical block address of the SMR region and CMR region.

[0110] The above steps are executed sequentially until all data block read and write operations issued by the database system are tested. The test results of sequential read, sequential write, random read, and random write operations on the shingled hard disk are obtained, along with the corresponding shingled hard disk logs and server system logs. These are then uploaded to the database system, and the performance test results of the shingled hard disk are generated through a result comparison program.

[0111] The embodiments of this application have the same beneficial effects as the embodiments described above.

[0112] Example 4

[0113] Figure 4 This is a schematic diagram of a hard disk testing device provided in Embodiment 4 of this application. This device can execute the hard disk testing method provided in any embodiment of this application, and possesses the corresponding functional modules and beneficial effects for executing the method. Figure 4 As shown, the device includes:

[0114] The disk array creation module 410 is used to create disk arrays for the shingled magnetic recording (SMR) region and the conventional magnetic recording (CMR) region in a shingled hard disk.

[0115] Data block processing module 420 is used to send data blocks to and / or read data blocks from the disk array; wherein, the method of sending data blocks to the disk array corresponding to the SMR region does not include random method;

[0116] The performance testing module 430 is used to perform performance testing on the disk array that issues and / or reads data blocks.

[0117] In this embodiment of the application, the disk array creation module 410 includes:

[0118] The disk array parameter acquisition unit is used to acquire disk array parameters issued by the database system; wherein, the disk array parameters include the size of the disk array, the number of disk arrays, and the form of the disk array; the form of the disk array includes at least one of Raid0 to Raid7 and variations of Raid0 to Raid7;

[0119] A creation unit is used to create disk arrays for the SMR and CMR regions in a shingled hard disk, respectively, based on the disk array parameters.

[0120] In this embodiment of the application, the creation unit includes:

[0121] Combination subunits are used to combine the size, number, and form of disk arrays to obtain at least two disk array creation methods.

[0122] The array creation sub-unit is used to create disk arrays for the SMR and CMR regions in shingled hard disks, based on at least two disk array creation methods.

[0123] In this embodiment of the application, the device further includes:

[0124] The reporting module is used to identify the SMR and CMR regions in the shingled magnetic disk using a region identification tool, and report the identification information to the database system, whereby the database determines the logical block address based on the identification information.

[0125] The logical partitioning module is used to logically partition the SMR and CMR regions based on the logical block addresses issued by the database.

[0126] Accordingly, the disk array creation module 410 is specifically used for:

[0127] Create disk arrays based on the logical partitions of the SMR region and the CMR region, respectively.

[0128] In this embodiment of the application, the device further includes:

[0129] The cache area creation module is used to create cache areas for each of the at least one created disk array, so as to cache the data to be processed in each disk array.

[0130] In this embodiment of the application, the data block processing module 420 includes:

[0131] The data block read / write mode receiving unit is used to receive at least one data block read / write mode issued by the database system; wherein, at least one data block read / write mode is obtained by combining different read / write forms and different data block sizes;

[0132] The sending unit is used to send data blocks to and / or read data blocks from the disk array according to at least one data block read / write method.

[0133] In this embodiment of the application, the data block processing module 420 includes:

[0134] A failure code generation unit is used to generate a failure code if it fails to send a data block to the disk array and / or fails to read a data block from the disk array.

[0135] The reissue unit is used to report the failure code to the database system, so that the database system can adjust the data block read / write instructions according to the failure code and reissue them.

[0136] The re-execution unit is used to re-execute the steps of creating disk arrays for the SMR region and CMR region of the shingled hard disk and sending and / or reading data blocks from the disk array if the database system adjusts the number of times the data block read / write instructions are re-issued to a preset number, and sending data blocks to the disk array still fails and / or reading data blocks from the disk array still fails.

[0137] The hard disk testing device provided in this application embodiment can execute a hard disk testing method provided in any embodiment of this application, and has the corresponding functional modules and beneficial effects of executing the method.

[0138] Example 5

[0139] Figure 5 A schematic diagram of an electronic device 10, which can be used to implement embodiments of this application, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the application described and / or claimed herein.

[0140] like Figure 5 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0141] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0142] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as hard disk testing methods.

[0143] In some embodiments, the hard disk testing method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the hard disk testing method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the hard disk testing method by any other suitable means (e.g., by means of firmware).

[0144] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0145] Computer programs used to implement the methods of this application may be written in any combination of one or more programming languages. These computer programs may be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable target-determining device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0146] In the context of this application, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0147] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0148] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0149] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0150] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this application can be executed in parallel, sequentially, or in different orders, as long as the desired information of the technical solution of this application can be achieved, and this is not limited herein.

[0151] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A hard disk testing method characterized by comprising: The method comprises: For the shingled magnetic recording SMR region and the conventional magnetic recording CMR region in the shingled hard disk, disk arrays are respectively created; Data blocks are issued to the disk arrays and / or read from the disk arrays; wherein the way of issuing data blocks to the disk array corresponding to the SMR region does not include a random way, and a sequential writing way is adopted, and the way of issuing data blocks to the disk array corresponding to the CMR region adopts a random writing way or a sequential writing way; The disk arrays issuing data blocks and / or reading data blocks are tested for performance; Data blocks are issued to the disk arrays and / or read from the disk arrays, comprising: If the issuing of data blocks to the disk array and / or the reading of data blocks from the disk array fails, the server system generates a failure code, and reports the failure code to the database system; After receiving the failure code, the database system analyzes the failure code to determine the failure cause, adjusts the data block read / write instruction according to the failure cause, and issues the adjusted data block read / write instruction to the server system; If the execution number of the data block read / write instruction issued by the database system reaches a preset number, and the issuing of data blocks to the disk array and / or the reading of data blocks from the disk array still fails, the step of creating disk arrays for the SMR region and the CMR region in the shingled hard disk and issuing data blocks to the disk arrays and / or reading data blocks from the disk arrays is re-executed.

2. The method of claim 1, wherein, For the shingled magnetic recording SMR region and the conventional magnetic recording CMR region in the shingled hard disk, disk arrays are respectively created, comprising: Obtaining disk array parameters issued by the database system; wherein the disk array parameters include the size of the disk array, the number of the disk array, and the form of the disk array; the form of the disk array includes at least one of Raid0 to Raid7 and the deformation form of Raid0 to Raid7; Based on the disk array parameters, disk arrays are respectively created for the SMR region and the CMR region in the shingled hard disk.

3. The method of claim 2, wherein, Based on the disk array parameters, disk arrays are respectively created for the SMR region and the CMR region in the shingled hard disk, comprising: Combining the size of the disk array, the number of the disk array, and the form of the disk array to obtain at least two disk array creation ways; Based on the at least two disk array creation ways, disk arrays are respectively created for the SMR region and the CMR region in the shingled hard disk.

4. The method according to any one of claims 1 to 3, characterized in that, Before the disk arrays are respectively created for the shingled magnetic recording SMR region and the conventional magnetic recording CMR region in the shingled hard disk, the method further comprises: Identifying the SMR region and the CMR region in the shingled hard disk by a region identification tool, and reporting the identification information to the database system, and determining the logical block address by the database according to the identification information; According to the logical block address issued by the database, logically partitioning the SMR region and the CMR region; For the shingled magnetic recording SMR region and the conventional magnetic recording CMR region in the shingled hard disk, disk arrays are respectively created, comprising: According to logical partitioning of the SMR area and logical partitioning of the CMR area, disk arrays are respectively created.

5. The method according to any one of claims 1-3, characterized in that, The disk arrays are created for the SMR area, including: For the created at least one disk array, a cache area is respectively created for caching data to be processed in each disk array.

6. The method of claim 1, wherein, The data block is issued to the disk array and / or read, including: At least one data block read-write mode issued by the database system is received; wherein the at least one data block read-write mode is obtained by combining different read-write forms and different data block sizes; According to the at least one data block read-write mode, the data block is issued to the disk array and / or read.

7. A hard disk testing apparatus characterized by comprising: The device includes: A disk array creation module is configured to create disk arrays for the SMR area and the CMR area in the shingled hard disk, respectively. A data block processing module is configured to issue the data block to the disk array and / or read the data block; wherein the way of issuing the data block to the disk array corresponding to the SMR area does not include a random way, and the sequential writing way is adopted; the way of issuing the data block to the disk array corresponding to the CMR area adopts the random writing way or the sequential writing way. A performance test module is configured to perform performance test on the disk array of issuing the data block and / or reading the data block. The data block processing module includes: A failure code generation unit is configured to issue the data block to the disk array and / or read the data block, including: if the data block fails to be issued to the disk array and / or the data block fails to be read from the disk array, the server system generates a failure code, and reports the failure code to the database system; A re-issuing unit is configured to analyze the failure code to determine the failure reason after the database system receives the failure code, adjust the data block read-write instruction according to the failure reason, and issue the adjusted data block read-write instruction to the server system; A re-execution unit is configured to re-execute the steps of creating disk arrays for the SMR area and the CMR area in the shingled hard disk and issuing the data block to the disk array and / or reading the data block from the disk array, if the execution number of the adjusted data block read-write instruction issued by the database system reaches a preset number, and the data block still fails to be issued to the disk array and / or the data block still fails to be read from the disk array.

8. An electronic device, comprising: The device includes: At least one processor; and The memory is in communication connection with the at least one processor; wherein The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the hard disk test method in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for enabling the processor to execute the hard disk test method in any one of claims 1-6 when executed.

Citation Information

Patent Citations

  • RAID creation method based on SMR, data writing method for RAID and RAID recovery method

    CN113419685A

  • Partition identification method, system and equipment for hard disk and storage medium

    CN113742149A