A method, apparatus, device, and medium for upgrading a distributed storage operating system.
By pre-building and distributing upgrade packages before the upgrade, the problem of low efficiency in upgrading distributed storage systems is solved, enabling rapid and automated operating system upgrades and reducing labor costs.
Patent Information
- Application Number
- CN202211295626.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-21
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2042-10-21
AI Technical Summary
In existing technologies, operating system upgrades for distributed storage systems are inefficient, time-consuming, and have low automation, resulting in high labor costs, which is unacceptable, especially when upgrading large-scale clusters online.
Before the upgrade, an upgrade package is pre-built and distributed to each node, including the software packages and kernel boot files that the operating system to be upgraded depends on. The default boot kernel of the node is modified and restarted. The software packages are then migrated to the system disk using the kernel boot files to complete the upgrade.
It reduces upgrade time, saves labor costs, and improves the automation level of upgrades, making it suitable for online upgrades of large-scale clusters.
Smart Images

Figure CN115495131B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a method, apparatus, device, and medium for upgrading a distributed storage operating system. Background Technology
[0002] With the rise of big data, cloud computing, and high-performance applications, distributed storage systems have become the de facto backend storage. Early distributed systems, due to their older operating system versions, suffered from stability and security vulnerabilities, leading customers to demand upgrades to domestically developed operating systems for all field nodes. In scenarios involving offline upgrades across operating systems, since distributed storage is mostly located in intranet environments, upgrades typically involve reinstalling the operating system. This method is extremely inefficient, time-consuming, error-prone, and consumes significant manpower. For minor version upgrades, such as upgrading from CentOS 7.4 to 7.8, a yum repository can be created on the local network, and `yum update` can be used to upgrade the operating system. This method is complex to configure and may require manual intervention to resolve package dependencies, resulting in low automation. For major version upgrades, such as upgrading from CentOS 7.4 to CentOS 8.4 or a domestically developed operating system, upgrade tools are typically used. These tools are similar to `yum update`, requiring a yum repository. The entire upgrade process includes three steps: pre-upgrade assessment, upgrade, and post-reboot verification. This method also suffers from complex configuration, long upgrade times, and low automation, making it unacceptable for large-scale online cluster upgrades.
[0003] Therefore, how to reduce the time spent on operating system upgrades and save manpower costs is an urgent problem to be solved in this field. Summary of the Invention
[0004] In view of this, the purpose of this invention is to provide a method, apparatus, device, and medium for upgrading a distributed storage operating system, which can reduce upgrade time and save labor costs. The specific solution is as follows:
[0005] In a first aspect, this application discloses a method for upgrading a distributed storage operating system, comprising:
[0006] The pre-built upgrade package is distributed to each node; wherein the upgrade package includes the software packages and kernel boot files that the operating system to be upgraded to the target operating system depends on.
[0007] Modify the default boot kernel of each node and restart the node;
[0008] Based on the kernel boot file, the software package in the upgrade data package is migrated to the system disk in order to upgrade the operating system to be upgraded to the target operating system.
[0009] Optionally, distributing the pre-built upgrade package to each node includes:
[0010] The pre-built upgrade package is distributed to the first directory of each node, the kernel boot file in the upgrade package is distributed to the second directory of each node, and decompression is performed after distribution is completed;
[0011] Accordingly, migrating the software package in the upgrade data package to the system disk based on the kernel boot file includes:
[0012] Based on the kernel boot file in the second directory, the software package in the first directory is migrated to the system disk.
[0013] Optionally, before distributing the pre-built upgrade data package to each node, the process further includes:
[0014] By scanning the operating system to be upgraded, the configuration information of the operating system to be upgraded is obtained;
[0015] Based on the configuration information of the operating system to be upgraded, the software packages required to upgrade the operating system to the target operating system are determined.
[0016] Optionally, determining the software packages required to upgrade the operating system to the target operating system based on the configuration information of the operating system to be upgraded includes:
[0017] The configuration information of the operating system to be upgraded is compared with that of the target operating system, and the software packages that the operating system to be upgraded depends on are determined based on the comparison results.
[0018] Optionally, after determining the software packages required to upgrade the operating system to the target operating system based on the comparison results, the method further includes:
[0019] The software package is downloaded from a pre-defined software management repository, and the kernel boot file is generated based on the software package. Then, the upgrade data package is generated based on the software package and the kernel boot file.
[0020] Optionally, before obtaining the configuration information of the operating system to be upgraded by scanning the operating system to be upgraded, the method further includes:
[0021] Configure a software management repository based on the target operating system.
[0022] Optionally, after migrating the software package in the upgrade data package to the system disk based on the kernel boot file, the process further includes:
[0023] Delete the kernel boot file.
[0024] Secondly, this application discloses a distributed storage operating system upgrade device, comprising:
[0025] An upgrade data packet distribution module is used to distribute pre-built upgrade data packets to each node; wherein, the upgrade data packet includes software packages and kernel boot files that the operating system to be upgraded to the target operating system depends on.
[0026] The node restart module is used to modify the default boot kernel of each node and restart the node;
[0027] The upgrade module is used to migrate the software package in the upgrade data package to the system disk based on the kernel boot file, so as to upgrade the operating system to be upgraded to the target operating system.
[0028] Thirdly, this application discloses an electronic device, including:
[0029] Memory, used to store computer programs;
[0030] A processor is used to execute the computer program to implement the aforementioned disclosed distributed storage operating system upgrade method.
[0031] Fourthly, this application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned distributed storage operating system upgrade method.
[0032] As can be seen, this application proposes a method for upgrading a distributed storage operating system, comprising: distributing a pre-built upgrade data package to each node; wherein the upgrade data package includes software packages and kernel boot files that the operating system to be upgraded to the target operating system depend on; modifying the default boot kernel of each node and restarting the node; and migrating the software packages in the upgrade data package to the system disk based on the kernel boot file, so as to upgrade the operating system to be upgraded to the target operating system. It is evident that traditional distributed storage operating systems perform pre-upgrade assessment and upgrade data package construction for each node during storage system upgrades, and then perform the upgrade. In contrast, this application pre-completes the pre-upgrade and upgrade data package construction before upgrading the storage system, and distributes the upgrade data package to each node to further complete the storage system upgrade. This reduces upgrade time and saves manpower costs. Attached Figure Description
[0033] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0034] Figure 1 This is a flowchart of a distributed storage operating system upgrade method disclosed in this application;
[0035] Figure 2 This application discloses a flowchart of a specific distributed storage operating system upgrade method.
[0036] Figure 3 This is a schematic diagram of the structure of a distributed storage operating system upgrade device disclosed in this application;
[0037] Figure 4 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation
[0038] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0039] Since distributed storage is mostly located in intranet environments, upgrades are typically performed by reinstalling the operating system. This method is extremely inefficient, time-consuming, and prone to errors, consuming significant manpower. For minor version upgrades, such as upgrading from CentOS 7.4 to 7.8, a yum repository can be created on the local area network, and the operating system can be upgraded using `yum update`. This method is complex to configure, and manual intervention may be required to resolve package dependencies, resulting in low automation. For major version upgrades, such as upgrading from CentOS 7.4 to CentOS 8.4 or a domestically developed operating system, upgrade tools are generally used. These tools are similar to `yum update`, requiring the creation of a yum repository. The entire upgrade process includes three steps: pre-upgrade assessment, upgrade, and post-reboot verification. This method also suffers from complex configuration, long upgrade times, and low automation, making it unacceptable for large-scale online cluster upgrades.
[0040] Therefore, this application proposes a distributed storage operating system upgrade scheme, which can reduce upgrade time and save manpower costs.
[0041] This application discloses a method for upgrading a distributed storage operating system. (See also...) Figure 1 As shown, the method includes:
[0042] Step S11: Distribute the pre-built upgrade data package to each node; wherein the upgrade data package includes the software packages and kernel boot files that the operating system to be upgraded to the target operating system depends on.
[0043] In this embodiment, the upgrade data package construction process is as follows: The configuration information of the operating system to be upgraded is obtained by scanning the operating system to be upgraded; based on the configuration information, the software packages required to upgrade the operating system to the target operating system are determined. Specifically, the configuration information of the operating system to be upgraded is compared with that of the target operating system, and the software packages required to upgrade the operating system to the target operating system are determined based on the comparison result. After determining the software packages required to upgrade the operating system to the target operating system, the software packages are downloaded from a preset software management repository, and the kernel boot file is generated based on the software packages. Then, the upgrade data package is generated based on the software packages and the kernel boot file. It should be noted that before downloading the software packages from the preset software management repository and generating the kernel boot file based on the software packages, a software management repository needs to be configured based on the target operating system.
[0044] Furthermore, the upgrade data package is distributed to each node; wherein the upgrade data package includes the software packages and kernel boot files that the operating system to be upgraded to the target operating system depends on.
[0045] Step S12: Modify the default boot kernel of each node and restart the node.
[0046] In this embodiment, after the pre-built upgrade data package is distributed to each node, the default boot kernel of each node needs to be modified and the node needs to be restarted. Modifying the default boot kernel ensures that the node uses the latest operating system after restarting.
[0047] Step S13: Based on the kernel boot file, migrate the software package in the upgrade data package to the system disk so as to upgrade the operating system to be upgraded to the target operating system.
[0048] In this embodiment, after restarting the node, the software package in the upgrade data package is migrated to the system disk based on the kernel boot file, so as to upgrade the operating system to be upgraded to the target operating system.
[0049] It should be noted that after migrating the software package in the upgrade data package to the system disk based on the kernel boot file, the process also includes deleting the kernel boot file.
[0050] In summary, traditional distributed storage operating systems perform pre-upgrade assessments and build upgrade data packages for each node before upgrading the storage system. In contrast, this application completes the pre-upgrade and upgrade data package construction before upgrading the storage system and distributes the upgrade data package to each node to further complete the storage system upgrade. This reduces upgrade time and saves manpower costs.
[0051] As can be seen, this application proposes a method for upgrading a distributed storage operating system, comprising: distributing a pre-built upgrade data package to each node; wherein the upgrade data package includes software packages and kernel boot files that the operating system to be upgraded to the target operating system depend on; modifying the default boot kernel of each node and restarting the node; and migrating the software packages in the upgrade data package to the system disk based on the kernel boot file, so as to upgrade the operating system to be upgraded to the target operating system. It is evident that traditional distributed storage operating systems perform pre-upgrade assessment and upgrade data package construction for each node during storage system upgrades, and then perform the upgrade. In contrast, this application pre-completes the pre-upgrade and upgrade data package construction before upgrading the storage system, and distributes the upgrade data package to each node to further complete the storage system upgrade. This reduces upgrade time and saves manpower costs.
[0052] This application discloses a specific method for upgrading a distributed storage operating system. Compared to the previous embodiment, this embodiment further explains and optimizes the technical solution. See also... Figure 2 As shown, it specifically includes:
[0053] Step S21: Distribute the software packages in the pre-built upgrade package to the first directory in each node, distribute the kernel boot file in the upgrade package to the second directory in each node, and decompress it after distribution; wherein, the upgrade package includes the software packages and kernel boot file that the operating system to be upgraded to the target operating system depends on.
[0054] In this embodiment, the software packages in the pre-built upgrade package are distributed to the first directory of each node, and the kernel boot file in the upgrade package is distributed to the second directory of each node. Then, the files in the directory are decompressed after the distribution is completed.
[0055] It should be noted that before distributing the software packages in the pre-built upgrade package to the first directory of each node and distributing the kernel boot file in the upgrade package to the second directory of each node, the upgrade package needs to be constructed. Specifically, this involves scanning the operating system to be upgraded to obtain its configuration information; based on the configuration information, determining the software packages required to upgrade the operating system to the target operating system. Specifically, the configuration information of the operating system to be upgraded is compared with that of the target operating system, and the software packages required to upgrade the operating system to the target operating system are determined based on the comparison results. After determining the software packages required to upgrade the operating system to the target operating system, the software packages are downloaded from a preset software management repository, and the kernel boot file is generated based on the software packages. Then, the upgrade package is generated based on the software packages and the kernel boot file. It should be noted that before downloading the software packages from the preset software management repository and generating the kernel boot file based on the software packages, the software management repository needs to be configured based on the target operating system.
[0056] Step S22: Modify the default boot kernel of each node and restart the node.
[0057] In this embodiment, after the pre-built upgrade data package is distributed to each node, the default boot kernel of each node needs to be modified and the node needs to be restarted. Modifying the default boot kernel ensures that the node uses the latest operating system after restarting.
[0058] Step S23: Based on the kernel boot file in the second directory, migrate the software package in the first directory to the system disk so as to upgrade the operating system to be upgraded to the target operating system.
[0059] It should be noted that after restarting the node, the software packages in the first directory are migrated to the system disk based on the kernel boot file in the second directory, so as to upgrade the operating system to be upgraded to the target operating system. After migrating the software packages in the first directory to the system disk based on the kernel boot file in the second directory, the process further includes deleting the kernel boot file.
[0060] Traditional distributed storage operating systems perform pre-upgrade assessments and build upgrade data packages for each node before upgrading the storage system. In contrast, this application pre-upgrades the storage system and builds the upgrade data packages beforehand, then distributes the upgrade data packages to each node to complete the storage system upgrade. This reduces upgrade time and saves manpower costs.
[0061] As can be seen, this application proposes a method for upgrading a distributed storage operating system, comprising: distributing the software packages in a pre-built upgrade data package to a first directory on each node; distributing the kernel boot file in the upgrade data package to a second directory on each node; and decompressing the packages after distribution; wherein the upgrade data package includes software packages and a kernel boot file that are required to upgrade the operating system to the target operating system; modifying the default boot kernel of each node and restarting the node; and migrating the software packages in the first directory to the system disk based on the kernel boot file in the second directory, so as to upgrade the operating system to the target operating system. It is evident that traditional distributed storage operating systems perform pre-upgrade assessment and upgrade data package construction for each node before upgrading the storage system, while this application pre-completes the pre-upgrade and upgrade data package construction before upgrading the storage system, and distributes the upgrade data package to each node to further complete the storage system upgrade. This reduces upgrade time and saves manpower costs.
[0062] In one specific implementation, this application may include the following:
[0063] The traditional operating system upgrade method is as follows:
[0064] 1. Configure the yum repository (software repository) using ISO at the customer's site; 2. For each node to be upgraded, perform pre-upgrade assessment, upgrade, and reboot. Specifically, the pre-upgrade assessment includes: scanning the system to be upgraded, collecting kernel, software package, and system configuration basic information, comparing and analyzing it with the KOS (target operating system), collecting current system information, and recording the configurations that need to be restored after reboot. If compatibility issues are manually resolved, repeat this step until there are no problems and proceed to the next step. The upgrade specifically includes: based on the collected information and according to the list of software packages currently installed on the system, downloading the necessary upgrade packages from the configured yum repository in advance and triggering the on-site upgrade of all packages to a temporary directory. The reboot node specifically includes: installing the upgrade packages from the temporary directory to the system disk. All of the above steps need to be implemented on-site, which is cumbersome to configure, and compatibility issues require manual intervention to resolve, making the upgrade time-consuming.
[0065] The optimized operating system upgrade method is as follows:
[0066] Since the operating system version and required software packages are consistent across all nodes before the update, this application generates the upgrade tool's source, pre-upgrade assessment, and upgrade within the version build process. The generated upgrade data package is then uploaded to the interface for automated upgrades performed on-site. Specifically, this includes the following steps: 1. Configuring the yum source using an ISO; 2. Pre-upgrade assessment, specifically including: scanning the system to be upgraded, collecting kernel, software package, and system configuration information, comparing and analyzing with KOS, collecting current system information, and recording configurations that need to be restored after reboot; 3. Downloading the required upgrade package inspur-kos.tar.gz from the configured yum source in advance according to the currently installed package list; 4. Creating upgrade-vmlinuz and upgrade-initramfs based on the package (upgrade-vmlinuz, upgrade...). -initramfs is the kernel boot file), and triggers in-situ upgrades of all packages, generating them in / var / lib / inspur; 2. On-site upgrade implementation steps, operated on the interface, include the following: Upload the upgrade package to the interface, which distributes it to all nodes. upgrade-vmlinuz and upgrade-initramfs are distributed to the / boot directory, and inspur.tar.gz is distributed to the / var / lib directory and decompressed; Modify the default boot entry for each node; Reboot; Use the kernel boot file to migrate the operating system under / var / lib / inspur to the system disk; Automatically delete upgrade-vmlinuz and upgrade-initramfs files and update the grub file, using kos as the default bootloader. This completes the operating system upgrade. In other words, this application distributes a pre-built upgrade package to each node; wherein, the upgrade package includes software packages and kernel boot files that the operating system to be upgraded to the target operating system depends on; the default boot kernel of each node is modified, and the node is restarted; based on the kernel boot file, the software packages in the upgrade package are migrated to the system disk, so as to upgrade the operating system to be upgraded to the target operating system. In summary, traditional distributed storage operating systems perform pre-upgrade assessment and upgrade package construction for each node during storage system upgrades, and then perform the upgrade. This application, however, completes the pre-upgrade and upgrade package construction before upgrading the storage system, and distributes the upgrade package to each node to further complete the storage system upgrade. In this way, this application can reduce upgrade time and save manpower costs.
[0067] Accordingly, this application also discloses a distributed storage operating system upgrade device, see [link to relevant documentation]. Figure 3As shown, the device includes:
[0068] The upgrade data packet distribution module 11 is used to distribute the pre-built upgrade data packet to each node; wherein, the upgrade data packet includes the software package and kernel boot file that the operating system to be upgraded to the target operating system depends on.
[0069] After determining the upgrade data package, this application distributes the upgrade data package to each node; wherein, the upgrade data package includes the software package and kernel boot file that the operating system to be upgraded to the target operating system depends on;
[0070] The node restart module 12 is used to modify the default boot kernel of each node and restart the node;
[0071] After distributing the pre-built upgrade package to each node, this application needs to modify the default boot kernel of each node and restart the node. The modification of the default boot kernel ensures that the node uses the latest operating system after restarting.
[0072] Upgrade module 13 is used to migrate the software package in the upgrade data package to the system disk based on the kernel boot file, so as to upgrade the operating system to be upgraded to the target operating system.
[0073] It should be noted that after restarting the node, the software packages in the upgrade data package are migrated to the system disk based on the kernel boot file, so as to upgrade the operating system to be upgraded to the target operating system.
[0074] As can be seen, this application proposes a method for upgrading a distributed storage operating system, comprising: distributing a pre-built upgrade data package to each node; wherein the upgrade data package includes software packages and kernel boot files that the operating system to be upgraded to the target operating system depend on; modifying the default boot kernel of each node and restarting the node; and migrating the software packages in the upgrade data package to the system disk based on the kernel boot file, so as to upgrade the operating system to be upgraded to the target operating system. It is evident that traditional distributed storage operating systems perform pre-upgrade assessment and upgrade data package construction for each node during storage system upgrades, and then perform the upgrade. In contrast, this application pre-completes the pre-upgrade and upgrade data package construction before upgrading the storage system, and distributes the upgrade data package to each node to further complete the storage system upgrade. This reduces upgrade time and saves manpower costs.
[0075] In some specific embodiments, the upgrade data packet distribution module 11 may specifically include:
[0076] An upgrade data package distribution unit is used to distribute the software packages in the pre-built upgrade data package to the first directory in each node, distribute the kernel boot file in the upgrade data package to the second directory of each node, and decompress it after distribution is completed;
[0077] Accordingly, the upgrade module 13 may specifically include:
[0078] The upgrade unit is specifically used to migrate the software package in the first directory to the system disk based on the kernel boot file in the second directory.
[0079] In some specific embodiments, prior to the upgrade data packet distribution module 11, the system may further include:
[0080] The configuration information acquisition unit is used to acquire the configuration information of the operating system to be upgraded by scanning the operating system to be upgraded;
[0081] The software package determination unit is used to determine the software packages that the operating system to be upgraded depends on for upgrading the operating system to the target operating system, based on the configuration information of the operating system to be upgraded.
[0082] In some specific embodiments, the software package determining unit may be used for:
[0083] The configuration information of the operating system to be upgraded is compared with that of the target operating system, and the software packages that the operating system to be upgraded depends on are determined based on the comparison results.
[0084] In some specific embodiments, after the software package determination unit, it may further include:
[0085] The upgrade data package generation unit is used to download the software package from a preset software management repository, generate the kernel boot file based on the software package, and then generate the upgrade data package based on the software package and the kernel boot file.
[0086] In some specific embodiments, the configuration information acquisition unit may further include:
[0087] The software management repository configuration unit is used to configure the software management repository based on the target operating system.
[0088] In some specific embodiments, the upgrade module 13 may further include:
[0089] The kernel boot file deletion unit is used to delete the kernel boot file.
[0090] Furthermore, embodiments of this application also provide an electronic device. Figure 4 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.
[0091] Figure 4 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a display screen 23, an input / output interface 24, a communication interface 25, a power supply 26, and a communication bus 27. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the following steps:
[0092] The pre-built upgrade package is distributed to each node; wherein the upgrade package includes the software packages and kernel boot files that the operating system to be upgraded to the target operating system depends on.
[0093] Modify the default boot kernel of each node and restart the node;
[0094] Based on the kernel boot file, the software package in the upgrade data package is migrated to the system disk in order to upgrade the operating system to be upgraded to the target operating system.
[0095] In some specific embodiments, the processor executes a computer program stored in the memory, specifically implementing the following steps:
[0096] The pre-built upgrade package is distributed to the first directory of each node, the kernel boot file in the upgrade package is distributed to the second directory of each node, and decompression is performed after distribution is completed;
[0097] Accordingly, migrating the software package in the upgrade data package to the system disk based on the kernel boot file includes:
[0098] Based on the kernel boot file in the second directory, the software package in the first directory is migrated to the system disk.
[0099] In some specific embodiments, the processor may further perform the following steps by executing a computer program stored in the memory:
[0100] By scanning the operating system to be upgraded, the configuration information of the operating system to be upgraded is obtained;
[0101] Based on the configuration information of the operating system to be upgraded, the software packages required to upgrade the operating system to the target operating system are determined.
[0102] In some specific embodiments, the processor executes a computer program stored in the memory, specifically implementing the following steps:
[0103] The configuration information of the operating system to be upgraded is compared with that of the target operating system, and the software packages that the operating system to be upgraded depends on are determined based on the comparison results.
[0104] In some specific embodiments, the processor may further perform the following steps by executing a computer program stored in the memory:
[0105] The software package is downloaded from a pre-defined software management repository, and the kernel boot file is generated based on the software package. Then, the upgrade data package is generated based on the software package and the kernel boot file.
[0106] In some specific embodiments, the processor may further perform the following steps by executing a computer program stored in the memory:
[0107] Configure a software management repository based on the target operating system.
[0108] In some specific embodiments, the processor may further perform the following steps by executing a computer program stored in the memory:
[0109] Delete the kernel boot file.
[0110] In this embodiment, the power supply 26 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 25 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 24 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0111] Furthermore, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk, or optical disk, etc. The resources stored thereon may include computer programs 221, and the storage method may be temporary storage or permanent storage. The computer programs 221 may include, in addition to computer programs capable of performing the distributed storage operating system upgrade method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, computer programs capable of performing other specific tasks.
[0112] Furthermore, embodiments of this application also disclose a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned distributed storage operating system upgrade method.
[0113] For the specific steps of this method, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.
[0114] The various embodiments in this application are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. For the same or similar parts between the various embodiments, refer to each other. As for the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and relevant parts can be referred to in the method section.
[0115] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0116] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0117] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0118] The above provides a detailed description of a distributed storage operating system upgrade method, apparatus, device, and storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for upgrading a distributed storage operating system, characterized in that, include: The pre-built upgrade package is distributed to each node; wherein the upgrade package includes the software packages and kernel boot files that the operating system to be upgraded to the target operating system depends on. Modify the default boot kernel of each node and restart the node; Based on the kernel boot file, the software package in the upgrade data package is migrated to the system disk so as to upgrade the operating system to be upgraded to the target operating system; Before distributing the pre-built upgrade data package to each node, the process also includes: By scanning the operating system to be upgraded, the configuration information of the operating system to be upgraded is obtained; Based on the configuration information of the operating system to be upgraded, the software packages required to upgrade the operating system to the target operating system are determined.
2. The distributed storage operating system upgrade method according to claim 1, characterized in that, The process of distributing the pre-built upgrade data package to each node includes: The pre-built upgrade package is distributed to the first directory of each node, the kernel boot file in the upgrade package is distributed to the second directory of each node, and decompression is performed after distribution is completed; Accordingly, migrating the software package in the upgrade data package to the system disk based on the kernel boot file includes: Based on the kernel boot file in the second directory, the software package in the first directory is migrated to the system disk.
3. The distributed storage operating system upgrade method according to claim 1, characterized in that, The step of determining the software packages required to upgrade the operating system to the target operating system based on the configuration information of the operating system to be upgraded includes: The configuration information of the operating system to be upgraded is compared with that of the target operating system, and the software packages that the operating system to be upgraded depends on are determined based on the comparison results.
4. The distributed storage operating system upgrade method according to claim 3, characterized in that, After determining the software packages required to upgrade the operating system to the target operating system based on the comparison results, the process further includes: The software package is downloaded from a pre-defined software management repository, and the kernel boot file is generated based on the software package. Then, the upgrade data package is generated based on the software package and the kernel boot file.
5. The distributed storage operating system upgrade method according to claim 4, characterized in that, Before obtaining the configuration information of the operating system to be upgraded by scanning the operating system to be upgraded, the process also includes: Configure a software management repository based on the target operating system.
6. The distributed storage operating system upgrade method according to any one of claims 1 to 5, characterized in that, After migrating the software package in the upgrade data package to the system disk based on the kernel boot file, the process further includes: Delete the kernel boot file.
7. A distributed storage operating system upgrade device, characterized in that, include: An upgrade data packet distribution module is used to distribute pre-built upgrade data packets to each node; wherein, the upgrade data packet includes software packages and kernel boot files that the operating system to be upgraded to the target operating system depends on. The node restart module is used to modify the default boot kernel of each node and restart the node; An upgrade module is used to migrate the software package in the upgrade data package to the system disk based on the kernel boot file, so as to upgrade the operating system to be upgraded to the target operating system; Before distributing the pre-built upgrade data package to each node, the process also includes: By scanning the operating system to be upgraded, the configuration information of the operating system to be upgraded is obtained; Based on the configuration information of the operating system to be upgraded, the software packages required to upgrade the operating system to the target operating system are determined.
8. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the distributed storage operating system upgrade method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, Used to store computer programs; wherein, when the computer programs are executed by a processor, they implement the distributed storage operating system upgrade method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Configuration upgrading system, configuration upgrading method and routing equipment
CN105187243A
System upgrading method and device for distributed storage system, equipment and medium
CN110377314A