RAID automatic alignment XFS file system storage optimization method and system

By automatically detecting RAID configuration parameters and dynamically calculating the block size and alignment strategy of the XFS file system, the performance loss caused by manual adjustment in RAID configuration is solved, achieving seamless collaboration between the file system and storage hardware, and improving storage performance and system reliability.

CN121387191APending Publication Date: 2026-01-23KYLIN CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511523336.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-23
Publication Date
2026-01-23

AI Technical Summary

Technical Problem

In existing technologies, after configuring RAID, administrators need to manually calculate the stripe size and file system block size, which can easily lead to misalignment due to human error, resulting in performance loss, especially under high load.

Method used

This paper presents a storage optimization method for XFS file system with automatic RAID alignment. By automatically detecting RAID configuration parameters and dynamically calculating the block size and alignment strategy of the XFS file system, it achieves seamless collaboration between the file system and storage hardware, avoiding errors caused by manual configuration.

Benefits of technology

It achieves seamless collaboration between the file system and storage hardware, automatically adjusts parameters, avoids manual intervention, significantly improves storage performance, supports compatibility with hardware RAID and software RAID, and ensures the efficiency and reliability of the storage system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121387191A_ABST
    Figure CN121387191A_ABST
Patent Text Reader

Abstract

The invention discloses an XFS file system storage optimization method and system capable of achieving RAID automatic alignment. The method comprises the steps that the stripe size and the number of data disks of specified block equipment are obtained from RAID configuration; determining a corresponding XFS file system formatting parameter according to the strip size and the number of the data disks; creating and formatting an XFS file system logic disk according to the determined XFS file system formatting parameter; executing automatic mounting configuration for the XFS file system logic disk to realize automatic mounting after the equipment is restarted; mounting an XFS file system logic disk; and verifying the alignment state of the mounted XFS logic disk and outputting a verification result. According to the method, the parameters of the file system are automatically adjusted based on the configuration parameters of the RAID, seamless cooperation of the file system and the storage hardware is achieved, and therefore manual configuration errors are avoided, and the storage performance is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of storage system optimization, and particularly relates to an XFS file system storage optimization method and system with automatic RAID alignment. BACKGROUND

[0002] RAID (Redundant Array of Independent Disks) improves storage performance and reliability through striping, and a file system (such as XFS) needs to adjust its block size and alignment strategy according to the striping parameters (size, width) of the RAID to avoid performance loss caused by cross-striping I / O. In the prior art, after setting the RAID, the administrator needs to manually calculate the striping size and the block size of the file system and configure the XFS parameters, which is prone to misalignment due to human error, causing problems such as read-write amplification and increased latency. If this step is not completed correctly, it will lead to a decrease in RAID performance, especially under high load. SUMMARY

[0003] The technical problem to be solved by the application is to provide an XFS file system storage optimization method and system with automatic RAID alignment to solve the above problems in the prior art, and the application aims to automatically adjust the parameters of the file system based on the configuration parameters of the RAID, realize seamless collaboration between the file system and the storage hardware, and thus avoid manual configuration errors and improve storage performance.

[0004] To solve the above technical problems, the application adopts the following technical scheme: An XFS file system storage optimization method with automatic RAID alignment, comprising the following steps: S101, obtaining the striping size and the number of data disks of a specified block device from the RAID configuration; S102, determining the corresponding XFS file system formatting parameters according to the striping size and the number of data disks; S103, creating and formatting the XFS file system logical disk according to the determined XFS file system formatting parameters; S104, performing automatic mounting configuration for the XFS file system logical disk to realize automatic mounting after device restart; S105, mounting the XFS file system logical disk; S106, verifying the alignment state of the mounted XFS file system logical disk and outputting the verification result.

[0005] Optionally, before step S101, the following step is further included: S201, checking the input parameters in the calling command of the program or interface, the input parameters being used to obtain the path and mounting point of the specified block device, and if the input parameters exist, jumping to step S202, otherwise ending and exiting; S202, parse the input parameters to obtain the path and mounting point of the specified block device, and determine whether the specified block device exists according to the obtained path and mounting point, if the specified block device exists, jump to step S101, otherwise end and exit.

[0006] Optionally, the step S101 of obtaining the stripe size and the number of data disks of the specified block device from the RAID configuration comprises: S301, determine the RAID type in the RAID configuration, if the RAID type is soft RAID, jump to step S302, otherwise if the RAID type is hard RAID, jump to step S303; S302, parse the soft RAID device state file / proc / mdstat to obtain the stripe size and the number of data disks of the specified block device, and jump to step S102; S303, execute the following command to obtain the stripe size and the number of data disks of the specified block device: sudo storcli / c0 / vall show all | grep -iE "strip size\|span" Wherein, sudo indicates that the administrator permission is used to execute, storcli is a storage controller management tool, / c0 / vall is the specified block device, show all is to display all disk information, " | " is a pipe symbol used to take the output of the previous command as the input of the next command, grep is a text filtering tool, -iE indicates to ignore case and use extended regular expressions, strip size is used to obtain the stripe size from all disk information, " \| " indicates or, span is used to obtain the number of data disks from all disk information.

[0007] Optionally, in the step S102, when the XFS file system formatting parameters are determined according to the stripe size and the number of data disks, the XFS file system formatting parameters include XFS stripe size and XFS stripe width, and the calculation function expression is: sunit=stripe_size, swidth=stripe_size * stripe_width, Wherein, sunit is the XFS stripe size, stripe_size is the stripe size of the specified block device, swidth is the XFS stripe width, and stripe_width is the stripe width of the specified block device.

[0008] Optionally, when the XFS file system logical disk is created and formatted according to the determined XFS file system formatting parameters in step S103, the creating and formatting of the XFS file system logical disk refers to invoking the mkfs.xfs command or kernel API to create and format the XFS file system logical disk, and the command format for invoking the mkfs.xfs command to create and format the XFS file system logical disk is as follows: mkfs.xfs -b size=bs -d sunit=stripe_size,swidth=stripe_width / dev / md0, wherein mkfs.xfs is the mkfs.xfs command, -b size=bs is to set the block size of the file system to bs bytes, -d sunit=stripe_size,swidth=stripe_width is to specify the XFS stripe size and XFS stripe width, and / dev / md0 is the XFS file system logical disk to be created and formatted.

[0009] Optionally, the automatic mounting configuration for the XFS file system logical disk in step S104 includes: S401, defining the mounting point path of the XFS file system logical disk; S402, using the blkid command to obtain the global number UUID of the XFS file system logical disk; S403, constructing a mounting entry for the XFS file system logical disk based on the mounting point path and the global number UUID of the XFS file system logical disk; S404, outputting the constructed mounting entry information, and then appending the constructed mounting entry information to the configuration file / etc / fstab used to define the mounting information of the file system.

[0010] Optionally, when the alignment state of the mounted XFS file system logical disk is verified and the verification result is output in step S106, the alignment state of the mounted XFS file system logical disk is verified by at least one of two ways, i.e., metadata checking and performance testing. The metadata checking refers to using the information viewing tool xfs_info of the XFS file system to obtain the XFS stripe size and XFS stripe width of the XFS file system logical disk, and determining whether the XFS stripe size and the number of data disks of the specified block device are aligned, respectively. The performance testing refers to performing read-write performance testing on the XFS file system logical disk, and if the result of the read-write performance testing is greater than a preset threshold, it is determined that the XFS file system logical disk has been aligned, and the preset threshold is greater than the read-write performance testing value in the unaligned state of the XFS file system logical disk.

[0011] Further, the present application also provides a RAID automatic alignment XFS file system storage optimization system, comprising a microprocessor and a memory connected to each other, the microprocessor being programmed or configured to execute the RAID automatic alignment XFS file system storage optimization method.

[0012] Further, the present application also provides a computer readable storage medium, wherein a computer program or instructions are stored, the computer program or instructions being programmed or configured to execute the RAID automatic alignment XFS file system storage optimization method by a processor.

[0013] Further, the present application also provides a computer program product, comprising a computer program or instructions, the computer program or instructions being programmed or configured to execute the RAID automatic alignment XFS file system storage optimization method by a processor.

[0014] Compared with the prior art, the present application mainly has the following beneficial effects: 1、The RAID automatic alignment XFS file system storage optimization method automatically detects the strip parameters (such as strip size and strip width) of the underlying RAID configuration, dynamically calculates and configures the block size, directory block size and alignment strategy of the XFS file system, realizes seamless collaboration of the file system and the storage hardware, and enables the system to automatically detect the configuration parameters (such as strip size and strip width) of the underlying RAID when creating the XFS file system, and automatically adjusts the block size, alignment mode and other settings of the XFS according to these parameters without manual intervention, thereby avoiding manual configuration errors and significantly improving the storage performance.

[0015] 2、The RAID automatic alignment XFS file system storage optimization method supports the compatibility of hardware RAID and software RAID, and through intelligent parameter matching, exception handling and verification mechanism, ensures the efficiency and reliability of the storage system. BRIEF DESCRIPTION OF DRAWINGS

[0016] Figure 1 The figure is a basic flowchart of the embodiment method of the present application. DETAILED DESCRIPTION

[0017] The object of the present application is to enable the system to automatically detect the configuration parameters (such as strip size and strip width) of the underlying RAID when creating the XFS file system, and automatically adjust the block size, alignment mode and other settings of the XFS according to these parameters without manual intervention. In order to enable the personnel in the technical field to better understand the technical scheme of the present application, the technical scheme of the present application will be further described in detail below in combination with the drawings in the embodiment of the present application.

[0018] As Figure 1As shown, the RAID auto-aligned XFS file system storage optimization method in this embodiment includes the following steps: S101, obtain the stripe size and number of data disks (stripe_width, i.e., span size) of the specified block device from the RAID configuration. S102, determine the corresponding XFS file system formatting parameters based on the stripe size and the number of data disks; S103, Create and format the XFS file system logical disk according to the determined XFS file system formatting parameters; S104 enables automatic mounting configuration for logical disks with the XFS file system, allowing automatic mounting after device reboot. S105, mounted as a logical disk with the XFS file system; S106, verify the alignment status of the mounted XFS file system logical disk and output the verification result.

[0019] like Figure 1 As shown, this embodiment further includes the following steps before step S101: S201, check the input parameters in the calling command of this program or interface. The input parameters are used to obtain the path and mount point of the specified block device. If the input parameters exist, jump to step S202; otherwise, end and exit. S202, parse the input parameters to obtain the path and mount point of the specified block device, and determine whether the specified block device exists based on the obtained path and mount point. If the specified block device exists, jump to step S101; otherwise, end and exit.

[0020] Retrieving the stripe size and number of data disks for a specific block device from a RAID configuration may involve communication with the RAID controller or reading system files (such as / proc / mdstat for software RAID) to extract the stripe size and stripe width from the RAID configuration. For example, a RAID 5 stripe size might be 64KB, with a stripe width of 4 disks. Figure 1 As shown, in this embodiment, step S101, obtaining the stripe size and number of data disks of the specified block device from the RAID configuration includes: S301, Determine the RAID type in the RAID configuration. If the RAID type is software RAID, proceed to step S302; otherwise, if the RAID type is hardware RAID, proceed to step S303. S302, parse the soft RAID device status file / proc / mdstat to obtain the stripe size and the number of data disks of the specified block device, and jump to step S102; the stripe size and the number of data disks of the specified block device can be obtained by executing the command cat / proc / mdstat to read the soft RAID device status file / proc / mdstat; S303, execute the following command to obtain the stripe size and the number of data disks of the specified block device: sudo storcli / c0 / vall show all | grep -iE "strip size\|span" Wherein, sudo indicates that the administrator permission is used to execute, storcli is a storage controller management tool, / c0 / vall is the specified block device, show all is to display all disk information, " | " is a pipe symbol used to take the output of the previous command as the input of the next command, grep is a text filtering tool, -iE indicates to ignore case and use extended regular expressions, strip size is used to obtain the stripe size from all disk information, " \| " indicates or, span is used to obtain the number of data disks (stripe_width, i.e. span size) from all disk information. The output example of the above command in this embodiment is: # Strip Size = 256KB # Number of Drivesper span = 2 (RAID10) That is, the stripe size is 256KB, and the number of data disks is 2.

[0021] In step S102 of this embodiment, when the corresponding XFS file system formatting parameters are determined according to the stripe size and the number of data disks, the XFS file system formatting parameters include XFS stripe size and XFS stripe width, and the calculation function expression is: sunit=stripe_size, swidth=stripe_size * stripe_width, Wherein, sunit is XFS stripe size, stripe_size is stripe size of specified block device, swidth is XFS stripe width, and stripe_width is stripe width of specified block device. In addition, as an optional implementation, the XFS file system formatting parameters further include optimal block size of XFS file system, directory block size, etc. Generally, the block size and directory block size of XFS should match or be integer multiples of the stripe size stripe_size of the RAID, so as to ensure that each IO operation completely fills a stripe and avoids read-write amplification caused by partial writing.

[0022] In the step S103 of the embodiment, when the XFS file system logical disk is created and formatted according to the determined XFS file system formatting parameters, the XFS file system logical disk is created and formatted by invoking the mkfs.xfs command or kernel API, so as to ensure that the XFS file system formatting parameters are correctly applied, and the command format for invoking the mkfs.xfs command to create and format the XFS file system logical disk is as follows: mkfs.xfs -b size=bs -d sunit=stripe_size,swidth=stripe_width / dev / md0, Wherein, mkfs.xfs is the mkfs.xfs command, -b size=bs is to set the block size of the file system to bs bytes, -d sunit=stripe_size,swidth=stripe_width is to specify the XFS stripe size and XFS stripe width, and / dev / md0 is the XFS file system logical disk to be created and formatted.

[0023] In the step S104 of the embodiment, the automatic mounting configuration for the XFS file system logical disk is implemented to automatically mount after device restart, which includes: S401, defining the mounting point path of the XFS file system logical disk, the command of which is: mkdir -p "$MOUNT_POINT", Wherein, mkdir is a command for creating a directory. -p indicates recursive directory path creation. If the parent directory does not exist, mkdir will automatically create the required parent directory, ensuring that the target path can be successfully created. "$MOUNT_POINT" indicates the directory path to be created. If $MOUNT_POINT is a complete path (for example, / mnt / mydir), mkdir -p will ensure that / mnt and / mnt / mydir are created (if they do not exist); S402, use the blkid command to obtain the Global Identifier (UUID) of the XFS file system logical disk. The command is as follows: UUID=$(blkid -s UUID -o value "$DEVICE"), The `blkid` command is a tool for finding and displaying attributes of block devices (such as hard disk partitions). `-s UUID` specifies that only the UUID attribute of the device should be extracted. `-o value` indicates that only the UUID value should be output, instead of the complete key-value pair. `$DEVICE` is the path to the device being queried (e.g., ` / dev / sda1` or ` / dev / md0`). `UUID=$(...)` assigns the output of the `blkid` command (i.e., the device's UUID) to the global UUID. S403, based on the mount point path and global unique identifier (UUID) of the XFS file system logical disk, construct a mount entry for the XFS file system logical disk. The command is as follows: FSTAB_ENTRY="UUID=$UUID $MOUNT_POINT xfs defaults,noatime 0 0"; In this configuration, FSTAB_ENTRY is the mount entry, UUID=$UUID is the global identifier (UUID) of the XFS file system logical disk, $MOUNT_POINT is the mount point path of the XFS file system logical disk, and xfs indicates that the file system type is XFS. Defaults and noatime are mount options; defaults indicates using the default mount options, and noatime indicates not updating file access timestamps. 0 0 indicates that this file system does not require dump backup and will not be checked at startup.

[0024] S404 outputs the constructed mount entry information and then appends it to the configuration file / etc / fstab, which defines the mount information for the file system. The command is: echo "Added fstab entry: $FSTAB_ENTRY" echo "$FSTAB_ENTRY" | tee -a / etc / fstab> / dev / null The first command displays the output of the mounting entry $FSTAB_ENTRY through echo, and the second command appends the mounting entry $FSTAB_ENTRY to the configuration file / etc / fstab used to define the mounting information of the file system. The echo "$FSTAB_ENTRY" is to output the mounting entry $FSTAB_ENTRY, and the pipe operator "|" is to pass the output of the echo command to the next command: tee -a / etc / fstab. The tee command is used to output the input content to the standard output (terminal) and the specified file at the same time. The -a option means that the content is written to the file in append mode (append) instead of overwriting the file. / etc / fstab is the target file, and the tee command appends the content of $FSTAB_ENTRY to this file. > / dev / null is to redirect the standard output of the tee command to / dev / null, i.e., discard the terminal output to avoid displaying the content on the screen.

[0025] In the step S106 of the embodiment, when verifying the alignment state of the mounted XFS file system logical disk and outputting the verification result, at least one of the following two ways is used to verify the alignment state of the mounted XFS file system logical disk: metadata checking and performance testing. The metadata checking refers to obtaining the XFS stripe size and XFS stripe width of the XFS file system logical disk using the information viewing tool xfs_info of the XFS file system (for example, executing xfs_info / dev / md0), and determining whether the XFS file system logical disk is aligned with the stripe size and the number of data disks of the specified block device, respectively. The performance testing refers to performing read-write performance testing on the XFS file system logical disk. If the result of the read-write performance testing is greater than a preset threshold value, it is determined that the XFS file system logical disk has been aligned. The preset threshold value is greater than the read-write performance testing value in the unaligned state of the XFS file system logical disk.

[0026] As an optional implementation, the embodiment also provides a packaged automatic script to execute the RAID automatic alignment XFS file system storage optimization method of the embodiment, and the command is: sudo. / xfs_auto_align.sh<block device path><mount point>[RAID valid data disk number] Wherein, xfs_auto_align.sh is a packaged automatic script, and <block device path><mount point>[RAID valid data disk number] is an input parameter, wherein <block device path><mount point> is used to specify the block device, and [RAID valid data disk number] is used to directly give the number of data disks to reduce the time spent on detection.

[0027] In summary, the XFS file system storage optimization method with RAID automatic alignment of the embodiment can be compatible with hardware / software RAID by intelligently detecting RAID parameters, dynamically obtain striping configuration, generate block size and alignment offset according to RAID rules through dynamic calculation of XFS parameters, seamlessly call system tools to create optimized XFS file system through automated file system construction, ensure parameter correctness through closed-loop verification mechanism and feedback configuration results. Compared with the prior art, the XFS file system storage optimization method with RAID automatic alignment of the embodiment has the following advantages: (1) full automation: eliminating manual intervention and reducing the risk of configuration errors; (2) cross-platform compatibility: supporting hardware RAID, software RAID and hybrid storage architecture; (3) dynamic adaptation: adapting to parameter calculation rules of different RAID levels (such as RAID0 / 5 / 6 / 10); (4) closed-loop verification: double protection of alignment effect through metadata inspection and performance test; (5) industrial applicability: the present application can be applied to cloud computing, big data storage, high-performance computing and other fields, significantly improving the I / O efficiency of distributed storage systems, and being suitable for storage scenarios that require rapid deployment and are sensitive to performance.

[0028] In addition, the embodiment also provides an XFS file system storage optimization system with RAID automatic alignment, which comprises a microprocessor and a memory connected with each other, and the microprocessor is programmed or configured to execute the XFS file system storage optimization method with RAID automatic alignment.

[0029] In addition, the embodiment also provides a computer readable storage medium, which stores a computer program or instructions programmed or configured to execute the XFS file system storage optimization method with RAID automatic alignment by a processor.

[0030] In addition, the embodiment also provides a computer program product, which comprises a computer program or instructions programmed or configured to execute the XFS file system storage optimization method with RAID automatic alignment by a processor.

[0031] Those skilled in the art will appreciate that the technology provided herein is not limited to any particular form of implementation. The technology provided herein can be implemented in hardware, software, or a combination thereof. Those skilled in the art will appreciate that the technology provided herein can be implemented in a number of different embodiments, including method embodiments, system embodiments, and computer program product embodiments. The technology provided herein can be implemented in any combination of hardware, software, or a combination thereof. The technology provided herein can be implemented in a number of different ways, including as a computer program product stored on a computer readable storage medium, as a system on chips (SOCs), as an application specific integrated circuit (ASIC), or as a combination of the above. The technology provided herein can be implemented using any suitable hardware, software, firmware, or combination thereof. The technology provided herein can be implemented in one or more computer programs or one or more articles of manufacture that contain computer readable program code. The technology provided herein can be implemented using any suitable computer readable storage medium, including storage devices that are external or internal to a computer. Suitable computer readable storage mediums can include, but are not limited to, volatile memory, non-volatile memory, removable storage, and non-removable storage. Suitable computer readable storage mediums can include, but are not limited to, RAM, ROM, EEPROM, flash memory, or any other memory technology. Suitable computer readable storage mediums can include, but are not limited to, magnetic cassettes, magnetic tapes, magnetic disks, memory cards or sticks, optical storage media, or any other storage medium suitable for storing computer readable program code. The computer readable program code can be executed using any suitable computer processor, including a general purpose computer, a special purpose computer, an embedded computer, or any other computer. The computer readable program code can be executed using any suitable operating system, including a UNIX operating system, a LINUX operating system, a WINDOWS operating system, a MAC OS operating system, or any other operating system. The computer readable program code can be executed using any suitable computer programming language, including a high level programming language, a low level programming language, an object oriented programming language, a visual programming language, or any other computer programming language. Figure 1 one or more functions specified in the flow or flows and / or blocks Figure 1 one or more functions specified in the flow or flows and / or blocks Figure 1 one or more functions specified in the flow or flows and / or blocks Figure 1 one or more functions specified in the flow or flows and / or blocks Figure 1 one or more functions specified in the flow or flows and / or blocks Figure 1 one or more functions specified in the flow or flows and / or blocks

[0032] The above description is only preferred embodiments of the application. The protection scope of the application is not limited to the above-mentioned embodiments. Any technical scheme falling within the concept of the application is within the protection scope of the application. It should be noted that some improvements and refinements made by those skilled in the art without departing from the principles of the application are also considered to be within the protection scope of the application.

Claims

1. A method for RAID auto-alignment XFS file system storage optimization, characterized in that, The method comprises the following steps: S101, obtaining the stripe size and the number of data disks of the specified block device from the RAID configuration; S102, determining the corresponding XFS file system formatting parameters according to the stripe size and the number of data disks; S103, creating and formatting the XFS file system logical disk according to the determined XFS file system formatting parameters; S104, performing automatic mounting configuration for the XFS file system logical disk to realize automatic mounting after device restart; S105, mounting the XFS file system logical disk; S106, verifying the alignment state of the mounted XFS file system logical disk and outputting the verification result.

2. The RAID auto-alignment XFS file system storage optimization method of claim 1, wherein, Before step S101, the method further comprises the following steps: S201, checking the input parameters in the calling command of the program or interface, the input parameters being used to obtain the path and mounting point of the specified block device, if the input parameters exist, jumping to step S202, otherwise ending and exiting; S202, parsing the input parameters to obtain the path and mounting point of the specified block device, and judging whether the specified block device exists according to the obtained path and mounting point, if the specified block device exists, jumping to step S101, otherwise ending and exiting.

3. The RAID auto-alignment XFS file system storage optimization method of claim 1, wherein, In step S101, obtaining the stripe size and the number of data disks of the specified block device from the RAID configuration comprises the following steps: S301, judging the RAID type in the RAID configuration, if the RAID type is soft RAID, jumping to step S302, otherwise if the RAID type is hard RAID, jumping to step S303; S302, parsing the soft RAID device state file / proc / mdstat to obtain the stripe size and the number of data disks of the specified block device, and jumping to step S102; S303, executing the following command to obtain the stripe size and the number of data disks of the specified block device: sudo storcli / c0 / vall show all | grep -iE "strip size\|span" Wherein, sudo indicates that the administrator permission is used to execute, storcli is a storage controller management tool, / c0 / vall is the specified block device, show all is used to display all information of the disk, " | " is a pipe symbol used to take the output of the previous command as the input of the next command, grep is a text filtering tool, -iE indicates to ignore case and use extended regular expressions, strip size is used to obtain the stripe size from all information of the disk, " \| " indicates or, span is used to obtain the number of data disks from all information of the disk.

4. The RAID auto-alignment XFS file system storage optimization method of claim 1, wherein, In step S102, when determining the corresponding XFS file system formatting parameters according to the stripe size and the number of data disks, the XFS file system formatting parameters comprise XFS stripe size and XFS stripe width, and the calculation function expression is: sunit = stripe_size, swidth = stripe_size * stripe_width, Wherein, sunit is XFS stripe size, stripe_size is stripe size of specified block device, swidth is XFS stripe width, and stripe_width is stripe width of specified block device.

5. The RAID auto-alignment XFS file system storage optimization method of claim 1, wherein, In step S103, when creating and formatting the XFS file system logical disk according to the determined XFS file system formatting parameters, the creating and formatting of the XFS file system logical disk refers to calling the mkfs.xfs command or kernel API to create and format the XFS file system logical disk, and the command format for calling the mkfs.xfs command to create and format the XFS file system logical disk is as follows: mkfs.xfs -b size=bs -d sunit=stripe_size,swidth=stripe_width / dev / md0, Wherein, mkfs.xfs is the mkfs.xfs command, -b size=bs is to set the block size of the file system to bs bytes, -d sunit=stripe_size,swidth=stripe_width is to specify the XFS stripe size and XFS stripe width, and / dev / md0 is the XFS file system logical disk to be created and formatted.

6. The RAID auto-alignment XFS file system storage optimization method of claim 1, wherein, In step S104, the automatic mounting configuration for the XFS file system logical disk to achieve automatic mounting after device restart includes: S401, defining the mounting point path of the XFS file system logical disk; S402, using the blkid command to obtain the global number UUID of the XFS file system logical disk; S403, constructing a mounting entry for the XFS file system logical disk based on the mounting point path and the global number UUID of the XFS file system logical disk; S404, outputting the constructed mounting entry information, and then appending the constructed mounting entry information to the configuration file / etc / fstab used to define the mounting information of the file system.

7. The RAID auto-alignment XFS file system storage optimization method of claim 1, wherein, In step S106, when verifying the alignment state of the mounted XFS file system logical disk and outputting the verification result, at least one of the two ways of metadata checking and performance testing is used to verify the alignment state of the mounted XFS file system logical disk, the metadata checking refers to using the information viewing tool xfs_info of the XFS file system to obtain the XFS stripe size and XFS stripe width of the XFS file system logical disk, and judging whether they are respectively aligned with the stripe size of the specified block device and the number of data disks; the performance testing refers to performing read-write performance testing on the XFS file system logical disk, and if the result of the read-write performance testing is greater than a preset threshold, it is determined that the XFS file system logical disk has been aligned, and the preset threshold is greater than the read-write performance testing value in the unaligned state of the XFS file system logical disk.

8. A RAID auto-alignment XFS file system storage optimization system comprising a microprocessor and a memory interconnected, characterized in that, The microprocessor is programmed or configured to perform the RAID automatic alignment XFS file system storage optimization method of any one of claims 1-7. The microprocessor is programmed or configured to perform the RAID automatic alignment XFS file system storage optimization method of any one of claims 1-7.

9. A computer-readable storage medium having stored therein a computer program or instructions, characterized in that, The computer program or instructions are programmed or configured to perform the RAID auto-alignment XFS file system storage optimization method of any one of claims 1-7 by a processor.

10. A computer program product comprising computer programs or instructions, characterized in that, The computer program or instructions are programmed or configured to perform the RAID auto-alignment XFS file system storage optimization method of any one of claims 1-7 by a processor.