Methods for maintaining file systems of servers
By sequentially checking and mounting server file systems, including repairs and backups, the method addresses startup failures and data loss in server systems, enhancing data security and service availability.
Patent Information
- Application Number
- PCT/CN2024/144169
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-07-24
- Filing Date
- 2024-12-31
- Publication Date
- 2026-01-29
AI Technical Summary
Abnormalities in server file systems can lead to system startup failures, resulting in data loss and delayed service provision, particularly in systems like Linux, due to manual repairs that are prone to errors.
A method for maintaining server file systems involves checking and mounting multiple file systems sequentially to ensure normal startup, including repairing and backing up critical files to prevent data loss and expedite system recovery.
This approach reduces startup delays and ensures data security by minimizing data loss and ensuring rapid system recovery through systematic file system checks and backups.
Smart Images

Figure CN2024144169_29012026_PF_FP_ABST
Abstract
Description
METHODS FOR MAINTAINING FILE SYSTEMS OF SERVERSCROSS-REFERENCE TO RELATED APPLICATION
[0001] This application claims priority of Chinese Patent Application No. 202410998252.1 filed on July 24, 2024, the contents of which are entirely incorporated herein by reference.TECHNICAL FIELD
[0002] The present disclosure relates to the field of servers, and in particular to methods for maintaining file systems of servers.BACKGROUND
[0003] Servers are widely used as an infrastructure of a digital society. For example, servers are used for analysis, computation, and training in artificial intelligence (AI) . An abnormality in a file system of an operation system of a server may make the operation system unable to startup normally. In this case, the file system is usually repaired, for example, manually repairing the file system, but data loss is likely to occur in the file system repair process. For the servers, data security is very important, once important data is lost, great losses are brought.
[0004] Therefore, it is desired to provide methods of maintaining file systems of the servers to improve the data security.SUMMARY
[0005] One embodiment of the present disclosure provides a method implemented on a computing device including at least one processor and at least one storage device. The method includes: determining, by checking a first file system of the computing device, whether there is an abnormality in the first file system; in response to that there is no abnormality in the first file system, mounting the first file system; determining, by checking a second file system of the computing device, whether there is an abnormality in the second file system; and in response to that there is no abnormality in the second file system, mounting the second file system to complete system startup of the computing device.
[0006] One embodiment of the present disclosure provides a system including a computing device, wherein the computing device includes: at least one storage device including a set of instructions; and at least one processor in communication with the at least one storage device. When executing the set of instructions, the at least one processor causes the system to perform operations including: determining, by checking a first file system of the computing device, whether there is an abnormality in the first file system; in response to that there is no abnormality in the first file system, mounting the first file system; determining, by checking a second file system of the computing device, whether there is an abnormality in the second file system; and in response to that there is no abnormality in the second file system, mounting the second file system to complete system startup of the computing device.
[0007] One embodiment of the present disclosure provides a system including: a first checking module configured to determine, by checking a first file system of the computing device, if there are any abnormalities in the first file system; a first mounting module configured to, in response to that there is no abnormality in the first file system, mount the first file system; a second checking module configured to determine, by checking a second file system of the computing device, whether there is an abnormality in the second file system; and a second mounting module configured to, in response to that there is no abnormality in the second file system, mount the second file system to complete system startup of the computing device.
[0008] One embodiment of the present disclosure provides a non-transitory computer readable medium, including executable instructions that, when executed by at least one processor, direct the at least one processor to perform a method, the method including: determining, by checking a first file system of the computing device, whether there is an abnormality in the first file system; and in response to that there is no abnormality in the first file system, mounting the first file system; determining, by checking a second file system of the computing device, whether there is an abnormality in the second file system; and in response to that there is no abnormality in the second file system, mounting the second file system to complete system startup of the computing device.
[0009] Additional features may be set forth in part in the description which follows, and in part may become apparent to those skilled in the art upon examination of the following and the accompanying drawings or may be learned by production or operation of the examples. The features of the present disclosure may be realized and attained by practice or use of various aspects of the methodologies, instrumentalities, and combinations set forth in the detailed examples discussed below.BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The present disclosure is further described in terms of exemplary embodiments. These exemplary embodiments are described in detail with reference to the drawings. The drawings are not to scale. These embodiments are non-limiting exemplary embodiments, in which like reference numerals represent similar structures throughout the several views of the drawings, and wherein:
[0011] FIG. 1 is a schematic diagram illustrating an exemplary server according to some embodiments of the present disclosure;
[0012] FIG. 2 is a block diagram illustrating an exemplary processing device according to some embodiments of the present disclosure;
[0013] FIG. 3 is a flowchart illustrating an exemplary maintaining process of file systems of a server according to some embodiments of the present disclosure;
[0014] FIG. 4 is a schematic diagram illustrating an exemplary maintaining process of file systems of a server according to some embodiments of the present disclosure; and
[0015] FIG. 5 is a schematic diagram illustrating an exemplary process for monitoring and backing up a target file according to some embodiments of the present disclosure.DETAILED DESCRIPTION
[0016] In the following detailed description, numerous specific details are set forth by way of examples in order to provide a thorough understanding of the relevant disclosure. However, it should be apparent to those skilled in the art that the present disclosure may be practiced without such details. In other instances, well-known methods, procedures, systems, components, and / or circuitry have been described at a relatively high level, without detail, in order to avoid unnecessarily obscuring aspects of the present disclosure. Various modifications to the disclosed embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other embodiments and applications without departing from the spirit and scope of the present disclosure. Thus, the present disclosure is not limited to the embodiments shown but is to be accorded the widest scope consistent with the claims.
[0017] The terminology used herein is for the purpose of describing particular example embodiments only and is not intended to be limiting. As used herein, the singular forms “a, ” “an, ” and “the” may be intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms “comprise, ” “comprises, ” and / or “comprising, ” “include, ” “includes, ” and / or “including, ” when used in the present disclosure, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0018] It will be understood that the terms “system, ” “engine, ” “unit, ” “module, ” and / or “block” used herein are one method to distinguish different components, elements, parts, sections, or assemblies of different levels in ascending order. However, the terms may be displaced by other expressions if they may achieve the same purpose.
[0019] It will be understood that when a unit, engine, module, or block is referred to as being “on, ” “connected to, ” or “coupled to, ” another unit, engine, module, or block, it may be directly on, connected or coupled to, or communicate with the other unit, engine, module, or block, or an intervening unit, engine, module, or block may be present unless the context clearly indicates otherwise. As used herein, the term “and / or” includes any or all combinations of one or more of the associated listed items.
[0020] These and other features, and characteristics of the present disclosure, as well as the methods of operation and functions of the related elements of structure and the combination of parts and economies of manufacture, may become more apparent upon consideration of the following description with reference to the accompanying drawings, all of which form a part of this disclosure. It is to be expressly understood, however, that the drawings are for the purpose of illustration and description only and are not intended to limit the scope of the present disclosure. It is understood that the drawings are not to scale.
[0021] A server is usually deployed in an equipment room, and reasons such as an abnormal power outage may lead to file systems in an operation system of the server being abnormal, and thus the operation system is unable to be initiated normally. Taking a widely used Linux operation system as an example, the Linux operation system is unable to mount after the file systems of the Linux operation system are corrupted, and the server enters an emergency maintenance mode and is unable to startup normally. The server is often repaired, for example, manually, which easily results in data loss. Once important data (e.g., system configuration, model parameters for machine learning models, etc. ) is lost, it will bring extreme losses. In addition, in a startup process, the server first mounts the file systems, and then repairs the file systems after the mount fails. In this way, the previous failed mount would cause the operation system of the server to take longer to startup, which delays the time for the server to normally provide services.
[0022] Embodiments of the present disclosure provide a method for maintaining file systems of a server. The method is performed by a computing device including at least one processor and at least one storage device. The method includes determining, by checking a first file system of the computing device, whether there is an abnormality in the first file system, and in response to that there is no abnormality in the first file system, mounting the first file system. The method includes determining, by checking a second file system of the computing device, whether there is an abnormality in the second file system, and in response to that there is no abnormality in the second file system, mounting the second file system to complete system startup of the computing device.
[0023] According to the embodiments of the present disclosure, during the startup process of the operation system of the server, the file systems (e.g., the first file system, the second file system) are checked before being mounted, which reduces the system startup delays caused by the failed mount, and at the same time enables the server to be loaded to normal file systems during the startup process, thereby ensuring the normal startup of the server.
[0024] FIG. 1 is a schematic diagram illustrating an exemplary server 100 according to some embodiments of the present disclosure. As shown, the server 100 includes a processing device 110, a network 120, and a storage device 130.
[0025] The processing device 110 may process information and / or data relating to the server 100 to perform one or more functions described in the present disclosure. The processing device 110 may run various services. For example, the processing device 110 processes network requests, data processing requests, etc. As another example, the processing device 110 runs AI related analysis, computation, training, and other services. The processing device 110 may include an operation system and file systems of the operation system. The operation system includes, but is not limited to, Linux, VMware ESXi, FreeBSD, OpenBSD, Oracle Solaris, IBM AIX, HP-UX Mac OS, etc. For illustration purposes, the present disclosure is described with reference to a Linux operation system. In some embodiments, the file systems include a virtual file system and a real file system. The real file system may include a root partition file system and other partition file systems. In the embodiments of the present disclosure, the root partition file system in the real file system also is referred to as a first file system, and the other partition file systems other than the root partition file system in the real file system also are referred to as second file systems.
[0026] In some embodiments, the processing device 110 is local or remote. For example, the processing device 110 accesses information and / or data stored in the storage device 130 via the network 120. As another example, the processing device 110 is directly connected to the storage device 130 to access stored information and / or data. In some embodiments, the processing device 110 includes one or more processors (e.g., single-core processor (s) or multi-core processor (s) ) . Thus operations and / or method steps that are performed by one processor may also be jointly or separately performed by multiple processors.
[0027] The network 120 may include any suitable network that facilitates an exchange of information and / or data for the server 100. In some embodiments, one or more components (e.g., the processing device 110, the storage device 130) of the server 100 communicate information and / or data with one or more other components of the server 100 via the network 120. For example, the processing device 110 obtains backups of files from the storage device 130 via the network 120. In some embodiments, the network 120 is or includes a wired network, a wireless network (e.g., an 802.11 network, a Wi-Fi network) , etc.
[0028] The storage device 130 may store data and / or instructions. The data and / or instructions may be obtained from, for example, the processing device 110, and / or any other component of the server 100. For example, the storage device 130 stores the backup of the files obtained, generated, or determined by the processing device 110. In some embodiments, the storage device 130 stores data and / or instructions that the processing device 110 executes or uses to perform exemplary methods described in the present disclosure. In some embodiments, the storage device 130 includes a mass storage device, a removable storage device, a volatile read-and-write memory, a read-only memory (ROM) , or the like, or any combination thereof. In some embodiments, the storage device 130 is implemented on a cloud platform.
[0029] It should be noted that the above description is merely provided for the purposes of illustration, and not intended to limit the scope of the present disclosure. For those skilled in the art, multiple variations and modifications may be made under the teachings of the present disclosure. In some embodiments, the server 100 includes one or more additional components and / or one or more components of the server 100 described above may be omitted. For example, the server 100 includes one or more terminal devices (e.g., a mobile device, a tablet computer, a laptop computer) configured to enable a user interaction between a user and the server 100. Additionally or alternatively, two or more components of the server 100 are integrated into a single component, or a component of the server 100 is implemented on two or more sub-components. For example, the storage device 130 is integrated into the processing device 110. However, those variations and modifications do not depart from the scope of the present disclosure.
[0030] FIG. 2 is a block diagram illustrating an exemplary processing device 110 according to some embodiments of the present disclosure. As shown in FIG. 2, the processing device 110 may include a first checking module 210, a first mounting module 220, a second checking module 230, and a second mounting module 240.
[0031] The first checking module 210 may be configured to check a first file system of the processing device 110 (e.g., a root partition file system in a real file system of the processing device 110) to determine whether there is an abnormality in the first file system. More descriptions regarding the determination of whether there is an abnormality in the first file system may be found elsewhere in the present disclosure (e.g., operation S310 and the descriptions thereof) .
[0032] The first mounting module 220 may be configured to mount the first file system in response to that there is no abnormality in the first file system. More descriptions of mounting the first file system may be found elsewhere in the present disclosure (e.g., operation S320 and the descriptions thereof) .
[0033] The second checking module 230 may be configured to check a second file system of the processing device 110 (e.g., a partition file system other than the root partition file system in the real file system of the processing device 110) to determine whether there is an abnormality in the second file system. More descriptions regarding the determination of whether there is an abnormality in the second file system may be found elsewhere in the present disclosure (e.g., operation S340 and the descriptions thereof) .
[0034] The second mounting module 240 may be configured to, in response to that there is no abnormality in the second file system, mount the second file system to complete system startup of the processing device 110. The system startup of the processing device 110 refers to a startup of the operation system of the processing device 110. During the startup process of the operation system, the file systems (e.g., the first file system, the second file system) of the operation system are loaded. More descriptions of mounting the second file system may be found elsewhere in the present disclosure (e.g., operation S350 and the descriptions thereof) .
[0035] In some embodiments, the processing device 110 further includes a first repair module 250. The first repair module 250 may be configured to repair the first file system in response to that there is any abnormality in the first file system. The first mounting module 220 may be further configured to mount the first file system in response to completion of the repairing of the first file system. More descriptions of repairing and mounting the first file system may be found elsewhere in the present disclosure (e.g., operation S330, operation S335, and the descriptions thereof) .
[0036] In some embodiments, the processing device 110 further includes a second repair module 260. The second repair module 260 may be configured to repair the second file system in response to that there is any abnormality in the second file system. The second mounting module 240 may be further configured to mount the second file system in response to completion of the repairing of the second file system. More descriptions of repairing and mounting the second file system may be found elsewhere in the present disclosure (e.g., operation S360, operation S365, and the descriptions thereof) .
[0037] In some embodiments, the processing device 110 further includes a monitoring backup module 270. The monitoring backup module 270 may be configured to monitor change of a target file under a preset path in response to the completion of the system startup of the processing device 110, and generate a first backup of the target file in response to the change of the target file. More descriptions of monitoring and backing up the target file may be found elsewhere in the present disclosure (e.g., operation S370, operation S380, and the descriptions thereof) .
[0038] In some embodiments, the processing device 110 further includes a file restoration module 280. The file restoration module 280 may be configured to restore a target file in which a missing exists. Specifically, in response to the completion of the system startup of the processing device 110, the file restoration module 280 may determine whether the first file system and the second file system have been repaired. In response to determining that at least one of the first file system and the second file system have been repaired, the file restoration module 280 may determine whether there is a missing in the target file in the at least one file system. In response to that there is any missing in the target file, the file restoration module 280 may obtain a second backup of the target file and replace the target file with the second backup of the target file. More descriptions of restoring the target file in which a missing exists may be found elsewhere in the present disclosure (e.g., operation S390 and the descriptions thereof) .
[0039] It should be noted that the above descriptions of the processing device 110 are provided for the purposes of illustration and are not intended to limit the scope of the present disclosure. For those skilled in the art, various modifications and changes may occur without departing from the principles of the present disclosure. In some embodiments, the modules in the processing device 110 are connected to or communicate with each other via a wired connection or a wireless connection. In some embodiments, the processing device 110 includes one or more other modules and / or one or more modules described above may be omitted. Additionally or alternatively, two or more modules are integrated into a single module, and / or a module is divided into two or more units. However, those modifications and changes also fall within the scope of the present disclosure.
[0040] FIG. 3 is a flowchart illustrating an exemplary maintaining process of file systems of a server according to some embodiments of the present disclosure. In some embodiments, a process 300 is executed by the server 100. For example, the process 300 is implemented as a set of instructions (e.g., an application) stored in a storage device (e.g., the storage device 130 illustrated in FIG. 1) , and the processing device 110 of the server 100 (e.g., one or more modules illustrated in FIG. 2) executes the set of instructions and is accordingly directed to perform the process 300.
[0041] In S310, by checking a first file system of a computing device, whether there is an abnormality in the first file system may be determined. In some embodiments, operation S310 is performed by the first checking module 210 shown in FIG. 2.
[0042] The computing device is a device that performs data computation and processing. The computing device may include a personal computer, a server, a cloud platform node, etc. For example, the computing device is the processing device 110. For illustration purposes, the present disclosure is described with reference to processing device 110. The computing device includes an operation system and file systems of the operation system. In some embodiments, a startup of the computing device refers to a startup of the operation system. During the startup process of the operation system, the file systems of the operation system are loaded.
[0043] The file systems include a virtual file system and a real file system. The real file system is referred to as a partition file system, which includes a root partition file system (also referred to as a root file system) and partition file systems other than the root partition file system. In some embodiments, the virtual file system includes a temporary file system used to load necessary drivers and file system modules when an operation system kernel is startup. The temporary file system primarily serves to provide a basic, minimal file system so that the kernel is able to access drivers and tools required to mount the real root partition file system. For example, the virtual file system includes a virtual file system initramfs generated by a Linux operation system kernel. The first file system, i.e., the root partition file system, may include system application programs and data. A second file system, i.e., the partition file system other than the root partition file system, may include the application programs and data. During the startup process of the operation system of the computing device, the virtual file system is loaded first, and then the real file system is loaded into the operation system through a mount operation to provide services. The mounting of the second file system follows the mounting of the first file system. For example, in the Linux operation system, the first file system after mounting includes directories and files in a file path / root, etc.; and the second file system after mounting includes directories and files in a file path / home, etc.
[0044] In some embodiments, there being an abnormality in the first file system includes, for example, there is a file missing in the first file system. The file missing includes that there is any file being corrupted, modified, deleted, or moved. If it is determined that there is no abnormality in the first file system, operation S320 is performed; if it is determined that there is any abnormality in the first file system, operations S330 and S335 are performed.
[0045] In some embodiments, the processing device 110 obtains a value of a target field in a preset file stored in the operation system of the computing device. The preset file is used to store information of the file systems that need to be mounted when the operation system starts up. The target field is used to indicate whether or not to perform check and repair on the real file system, and each file system in each real file system corresponds to one target field. For example, the preset file is a / etc / fstab file and the target field is a passno field. Each partition file system in the first file system and the second file system corresponds to one passno field that indicates whether the partition file system needs to be checked and repaired. When it is determined that a value of the target field is a first value and a value of a first parameter in a loading program is a second value, the processing device 110 determines, through a check and repair operation, whether there is an abnormality in the first file system. The first value includes a character or a string. For example, the first value is a number greater than 0, a letter, a special character, etc. The loading program may include a boot loader, etc. For example, the loading program includes a GNU GRand Unified Bootloader (GRUB) , a Linux Loader (LILO) , etc. The first parameter is used to indicate whether or not to check and repair the real file system. For example, the first parameter includes fsck. mode and fsck. repair. The fsck. mode indicates whether to perform the check, and the fsck. repair indicates whether to perform the repair. The second value includes a character or a string. For example, fsck. mode=force, and fsck. repair=yes. As another example, fsck. mode=force, and fsck. repair=ok. As another example, fsck. mode=1, and fsck. repair=1. The checking and repairing operations are accomplished through a first target service in a first service manager loaded under the virtual file system. For example, the first service manager is a systemd program, and the first target service is systemd-fsck@. service. During the system startup process of the computing device, the processing device 110 obtains the values of fsck. mode and fsck. repair in grub when loading the kernel, and the processing device 110 obtains the values of the passno field in / etc / fstab through the system program. When the value of the passno field is greater than 0 and fsck. mode=force fsck. repair=yes, the processing device 110 starts systemd-fsck@. service to check and repair the first file system.
[0046] In S320, in response to that there is no abnormality in the first file system, the first file system is mounted. In some embodiments, operation S320 is performed by the first mounting module 220 shown in FIG. 2.
[0047] In some embodiments, the processing device 110 mounts the first file system through the systemd program.
[0048] In S330, in response to that there is any abnormality in the first file system, the first file system is repaired. In some embodiments, operation S330 is performed by the first repair module 250 shown in FIG. 2.
[0049] The repair operation is realized through a repair service that comes with the system or through a repair service of a third party, which is not limited to the present disclosure. For example, the processing device 110 repairs the first file system via the systemd-fsck@. service in the systemd program.
[0050] In S335, in response to completion of the repairing of the first file system, the first file system is mounted. In some embodiments, operation S335 is performed by the first mounting module 220 shown in FIG. 2.
[0051] A manner of mounting the first file system is referred to operation S320. By checking and repairing the first file system first, and then mounting the first file system, it not only realizes the normal mounting of the root partition file system, but also avoids a system startup delay caused by the failure of mounting the root partition file system, thereby improving the ability of the server to provide the services.
[0052] In some embodiments, the processing device 110 switches to the first file system after the first file system finishes mounting. For example, the processing device 110 switches to the first file system via an initrd-switch-root. service in the systemd program.
[0053] In S340, by checking the second file system of the computing device, whether there is an abnormality in the second file system is determined. In some embodiments, operation S340 is performed by the second checking module 230 shown in FIG. 2.
[0054] In some embodiments, after operation S320 or operation S335, the processing device 110 checks the second file system of the computing device to determine whether there is an abnormality in the second file system. There being an abnormality in the second file system includes, for example, there is a file missing in the second file system. A manner of determining whether there is an abnormality in the second file system is similar to the manner of determining whether there is an abnormality in the first file system, as can be seen in operation S310.
[0055] In some embodiments, the second file system includes one or more partition file systems, and the processing device 110 checks each partition file system. When there is an abnormality in any one of the one or more partition file systems, the processing device 110 may determine that there is an abnormality in the second file system. When there is no abnormality in the one or more partition file systems, the processing device 110 may determine that there is no abnormality in the second file system.
[0056] In the second file system, there may be some large partition file systems that have a relatively great amount of data. Checking a large partition file system consumes more time, and if the large partition file system is normal, the checking would be meaningless, and makes the system startup slower.
[0057] In some embodiments, for each partition file system of the second file system, the processing device 110 determines whether the partition file system is a large partition file system based on whether a file data amount of the partition file system is greater than a data amount threshold. The file data amount includes a storage space occupied by the files of the partition file system, a file count of the partition file system, etc. The processing device 110 may determine the partition file system with a file data amount greater than or equal to the data amount threshold as the large partition file system and the partition file system with a file data amount less than the data amount threshold as a non-large partition file system. For example, the processing device 110 determines a partition file system that occupies more than 8T of a disk space as the large partition file system.
[0058] In some embodiments, the data amount threshold is negatively correlated with a count of preset paths or a count of target files. For example, the greater the count of preset paths and the greater the count of target files, the smaller the data amount threshold. A preset path refers to a preset directory path, including at least one of a user-specified directory path and a directory path where the system file is located, etc. The target files refer to files in the system that need to be backed up and saved, including files under the preset paths. For example, the target files include the system file, a configuration file of a business program, an important video, audio, image file, etc. Understandably, the user sets all or some of the files under the preset paths as the target files. The setting of the preset paths includes a user preset, assigning the preset paths by a path assignment service of the systemd program, etc. The greater the count of preset paths and target files, the greater the count of files to be checked, backed up, and replaced in the subsequent operations, the longer the time consumed. By making a data amount threshold negatively correlated with the count of preset paths or the count of target files, more partition file systems are partitioned into large partition file systems, thereby reducing the count of partition file systems to be checked, and thereby reducing a system startup time and a file system loading time.
[0059] In some embodiments, the data amount threshold is determined in other manners. For example, the processing device 110 determines the data amount threshold through a machine learning model. An input of the machine learning model may include at least one of an amount of storage space taken up by each partition file system, the count of preset paths, and the count of the target files in the second file system, and an output of the machine learning model may be the data amount threshold.
[0060] In some embodiments, the processing device 110 determines whether the partition file system in the second file system is the large partition file system in other manners. For example, the processing device 110 determines whether the partition file system in the second file system is the large partition file system by reading a value of a preset field. The preset field may be used to identify the large partition file system.
[0061] In some embodiments, in response to that the partition file system is the large partition file system, the processing device 110 mounts the partition file system and determines whether there is an abnormality in the second file system based on a mounting result of the partition file system. If the mounting of the partition file system is unsuccessful, the processing device 110 may determine that there is an abnormality in the partition file system, and repair the partition file system and then mount the partition file system again. In response to that the partition file system is not the large partition file system, the processing device 110 may check the partition file system to determine whether there is an abnormality in the partition file system. By first determining whether the partition file system in the second file system is the large partition file system, and mounting or checking the partition file system based on a determination result of whether the partition file system in the second file system is the large partition file system, meaningless checking of the large partition file system in which there is no abnormality is avoided, thereby increasing the speed of system startup.
[0062] In S350, in response to that there is no abnormality in the second file system, the second file system is mounted to complete the system startup of the computing device. In some embodiments, operation S350 is performed by the second mounting module 240 shown in FIG. 2.
[0063] In some embodiments, for each partition file system in the second file system, when it is determined that there is no abnormality in the partition file system, the processing device 110 mounts the partition file system. When all the partition file systems in the second file system are mounted, the system startup of the computing device is complete. The partition file systems in the second file system are mounted in a manner similar to the manner of mounting the first partition file systems, which can be seen in operation S320.
[0064] In the embodiment of the present disclosure, by checking the root partition file system and the other partition file systems sequentially, a normal loading of the root file system and the other partition file systems is ensured, and the normal startup operation of the system is ensured.
[0065] In S360, in response to that there is any abnormality in the second file system, the second file system is repaired. In some embodiments, operation S360 is performed by the second repair module 260 shown in FIG. 2.
[0066] In some embodiments, for each partition file system in the second file system, when it is determined that there is any abnormality in the partition file system, the processing device 110 repairs the partition file system through a repair operation. When the repair of all the partition file systems in the second file system that have abnormalities is completed, the repair of the second file system is completed. The repair of the partition file systems in the second file system is performed in a manner similar to the manner of the repair of the first file system, which can be seen in operation S330.
[0067] In S365, in response to completion of the repairing of the first file system, the second file system is mounted. In some embodiments, operation S365 is performed by the second mounting module 240 shown in FIG. 2.
[0068] In some embodiments, after the repairing of the second file system is completed, the processing device 110 mounts the second file system to complete the system startup of the computing device. The manner of mounting the second file system is referred to operation S320. By checking, repairing, and then mounting the second file system, the normal mounting of the other partition file systems is ensured, and a delay in the startup of the operation system caused by the failure of the mounting of the other partition file systems is reduced, which improves the ability of the server to provide services.
[0069] In S370, in response to the completion of the system startup of the computing device, change of a target file under a preset path is monitored. In some embodiments, operation S370 and operation S380 are performed by the monitoring backup module 270 shown in FIG. 2.
[0070] In some embodiments, after operation S350 or operation S365, i.e., after the system startup of the computing device is completed, the processing device 110 monitors the change of the target file under the preset path. For example, the processing device 110 monitors the changes of the target file under the preset path through a file-monitor-backup. service of the systemd program. The change of a file includes at least one of modification, move, deletion, addition, etc. to the file. For example, the processing device 110 determines whether the target file is modified by comparing MD5 values of the target file at different times.
[0071] In S380, in response to the change of the target file, a first backup of the target file is generated.
[0072] In some embodiments, when it is determined that the target file changes, the processing device 110 makes a backup of the target file to generate the first backup of the target file. The processing device 110 may back up the target file to a partition other than the file system partition in a disk. The file system partition refers to a partition of the disk for storing the first file system and the second file system. For example, when the target file has been not backed up, the processing device 110 creates a backup of the target file as the first backup and stores the first backup in a preset backup partition. For example, when there is already the backup of the target file in the preset backup partition, the processing device 110 creates a new backup of the target file as the first backup and replaces original backup of the target file with the new backup of the target file. By monitoring and backing up the target file, the safety of important data is improved to ensure normal and stable operation of the server.
[0073] In some embodiments, the processing device 110 determines an importance level of the preset path of the target file. For example, a system file directory has a higher importance level than a user file directory. As another example, a new directory is more important than an old directory. The processing device 110 determines, based on the importance level, a backup parameter of the target file under the preset path. For example, the processing device 110 determines the backup parameter by querying a preset table. The preset table records different importance ranges and their corresponding different regulation levels. The processing device 110 may determine the backup parameter of the target file based on the regulatory level.
[0074] The backup parameter may include at least one of a backup time, a backup quantity, or a backup manner of the target file. The backup time refers to a time when the backup of the target file is performed. A type of the backup time may include a current time and an idle time. The backup time being the current time means that the backup of the target file is performed immediately, and the backup time being the idle time means to backup of the target file is performed when the processing device is idle. The backup quantity refers to a quantity of the backups of the target file. The backup manner refers to how the backup of the target file is stored. For example, the backup manner includes a cold backup and a hot backup. The cold backup includes, for example, a CD-ROM backup. The hot backup includes a disk backup, etc. As another example, the backup manner includes a random storage and a continuous storage. The random storage refers to storing data of the backup of the target file randomly on a plurality of data storage spaces (e.g., disk blocks) , and the continuous storage refers to storing data of the backup of the target file continuously on one or more data storage spaces. Merely by way of example, for the target file with high importance, the processing device 110 sets a short backup interval (e.g., daily) , a great quantity of backups (e.g., greater than 3 copies) , a great count of backup manners (e.g., disk backup and optical disk backup) , or performs the backup of the target file through the continuous storage. As another example, for the target file with a small importance, the processing device 110 sets a long backup interval (e.g., one week) , a small quantity of backups (e.g., 1 copy) , a small count of backup manners (e.g., the disk backups) , or performs the backup of the target file through the random storage. By determining the backup parameter of the target file according to the importance level of the preset path, the safety of the important data is improved while occupations of the storage resources and processing resources are reduced, thereby achieving a balance between efficiency and safety.
[0075] In some embodiments, the processing device 110 determines the importance level of the preset path based on a file change frequency under the preset path, a historical data missing level under the preset path, and a preset factor. For example, the importance level = the file change frequency *the historical data missing level *the preset factor. The file change frequency under the preset path indicates how often on average the files under the preset path change. The historical data missing wherein n denotes a historical startup count; ai denotes a data missing level after the file repair occurs under the preset path at an ith startup, and the data missing level = a missing data amount ÷ a total data amount × 100%. The preset factor indicates a degree to which the target path affects a successful startup of the processing device.
[0076] In some embodiments, in response to the importance level of the preset path being greater than an importance level threshold (also referred to as a first importance level threshold) , the processing device 110 generates the first backup of the target file at the current time, i.e., the backup of the target file is performed immediately. In response to the importance levels of the preset path being less than or equal to the first importance level threshold, the processing device 110 generates the first backup of the target file at the idle time, i.e., the backup of the target file is performed at the idle time of the processing device 110. The processing device 110 may determine the idle time based on metrics such as CPU usage, disk I / O activity, etc. The first importance level threshold is a preset value determined empirically or through a machine learning model, which is not limited to the present disclosure. By immediately backing up the target file or backing up the target file at the idle time according to whether the importance level of the preset path is greater than the first importance level threshold, the important data is ensured to be backed up in a timely manner, and at the same time, the amount of files backed up at the same time is reduced, thereby reducing the occupation of processing resources.
[0077] In some embodiments, in response to that a count of files with a same type of backup time in the target file is greater than a count threshold, the processing device 110 simultaneously backs up the files with the same type of backup time. The backup manner of the files may include storing the files with the same type of backup time in a same storage location. The count threshold is a preset value that is determined in various manners. For example, the count threshold is determined based on experience or through a machine learning model. Merely by way of example, if the count of files in the target file that need to be backed up immediately is greater than the count threshold, the processing device 110 backs up those files at the same time and stores these backups of those files in the data storage space (e.g., a disk block) . It should be noted that if one data storage space is not capable of storing these files, these files are also stored in other data storage spaces. By storing the backups of files with the same type of backup time in the same storage location, the backup storage speed is increased, and the backup efficiency is improved.
[0078] In some embodiments, the count threshold is positively correlated with an occupancy degree of computing resources of the computing device. The occupancy degree of computing resources of the computing device is expressed in terms of CPU occupancy. For example, the higher the occupancy degree of computing resources of the computing device, the higher the count threshold. The higher the occupancy degree of computing resources of the computing device, the fewer computing resources currently available on the computing device, and by setting the count threshold to a great value, a probability of needing to back up the files in the target file at the same time is reduced, thereby saving the computing resources.
[0079] In some embodiments, for each path other than the preset path, the processing device 110 determines an importance level of the path. A manner of determining the importance level of the path is similar to the manner of determining the importance level of the preset path as described elsewhere in the present disclosure. The processing device 110 may determine whether to update the preset path based on the importance level of the path. Specifically, if the importance level of the path is greater than an importance level threshold (also referred to as a second importance level threshold) , the processing device 110 may add the path to the preset path. The second importance level threshold is less than or equal to the first importance level threshold. By updating the preset path based on the importance degrees of paths other than the preset path, the important data is better monitored so as to safeguard the normal operation of the file system.
[0080] In some embodiments, after operation S350 or operation S365, i.e., after the system startup is completed, the processing device 110 performs operation S390, which performs a backup restoration of the target file.
[0081] In S390, a second backup of the target file is obtained, and the target file is replaced with the second backup. In some embodiments, operation S390 is performed by the file restoration module 280 shown in FIG. 2.
[0082] In some embodiments, in response to the completion of the system startup of the processing device 110, the processing device 110 determines whether the first file system and the second file system have been repaired. For example, the processing device 110 detects, through the file-monitor-restore. service of the systemd program, whether the first file system and the second file system have been repaired.
[0083] In response to determining that at least one of the first file system or the second file system has been repaired, the processing device 110 may determine whether there is any missing in the target file in the at least one file system. The file missing includes that there is any file being corrupted, modified, deleted, or moved. For example, the processing device 110 may determine whether the target file is modified by comparing MD5 values of the current target file and a backed up target file.
[0084] In response to there being any missing in the target file, the processing device 110 may obtain the second backup of the target file and replace the target file with the second backup of the target file. The second backup of the target file refers to a backup of the target file that exists before the missing appears in the target file. Understandably, when a new backup of the target file is not yet generated after the current system startup, the second backup of the target file refers to a backup of the target file before the system startup. When a new backup of the target file has been generated after the current system startup, the second backup refers to latest backup of the target file after the current system startup. For example, the processing device 110 replaces the current target file under the preset path with the backed up target file. If there is a plurality of backed up target files at a plurality of different times, the latest backed up target file (closest to the current time) is used for the replacement. After the file system is repaired, by restoring the target file in which any missing exists, it is ensured that there is no missing in the target file after the file system is repaired, to improve the reliability of the important data, and to reduce adverse effects caused by the missing data after the repair, thereby improving the reliability of the system.
[0085] In some embodiments, in response to that there is any missing in the target file, before obtaining the second backup of the target file, the processing device 110 pauses the monitoring of the change of the target file under the preset path. In response to that there is any missing in the target file, after replacing the target file with the second backup of the target file, the processing device 110 may restart the monitoring of the change of the target file under the preset path. Understandably, the backup and restoration operation of the target file conflict with the monitoring of the target file, resulting in the backup restoration operation and the monitoring of the target file being unable to be performed normally, by pausing and restarting the monitoring of the target file before and after the backup restoration operation, the backup restoration operation and monitoring of the target file are ensured to run normally, thus ensuring the normal operation of the server, and at the same time avoiding the simultaneous operation of a plurality of services and saving the computing resources.
[0086] FIG. 4 is a schematic diagram illustrating an exemplary maintaining process of file systems of a server according to some embodiments of the present disclosure. In some embodiments, at least part of a process 400 is performed to achieve at least part of operations S310-S365 and S390 as described in connection with FIG. 3. For example, the processing device 110 (e.g., one or more modules illustrated in FIG. 2) of the server 100 achieves the mounting of the first file system and the second file system as well as the restoration of the target file by performing at least part of the process 400.
[0087] In S402, initializing a device hardware by Ustartup or UEFI.
[0088] After the processing device 110 is powered up, the processing device 110 may initialize the device hardware through a startuploader (e.g., the Ustartup, the UEFI, etc. ) .
[0089] In S404, kernel loading, reading, in GRUB, fsck. mode=force fsck. repair=yes.
[0090] The processing device 110 may perform an operation system kernel loading and read, in the GRUB, parameters such as fsck. mode and fsck. repair that are used to indicate checking and repairing of the file systems. When fsck. mode=force and fsck. repair=yes, the processing device 110 may check and repair the file systems in subsequent operations. fsck. mode=force indicates checking a real file system, and fsck. repair=yes indicates repairing the real file system with an abnormality. The real file system may include a root partition file system (i.e., the first file system) and partition file systems other than the root partition file system (i.e., the second file system) .
[0091] In S406, initializing Initramfs.
[0092] The processing device 110 may initialize a virtual file system Initramfs.
[0093] In S408, loading the virtual file system in a manner of Readonly.
[0094] The processing device 110 may load the virtual file system Initramfs into a memory in the manner of Readonly so that the kernel may access a needed driving program and tool to mount a real root partition file system.
[0095] In S410, starting up systemd program, reading a passno field in / etc / fstab, and starting up a checking service when the passno field is greater than 0.
[0096] The processing device 110 may start the systemd program to manage the service. The processing device 110 may read, through systemd program, a value of the passno field in / etc / fstab corresponding to the root partition file system. The value of passno field being greater than 0 indicates checking and repairing the root partition file system, and the processing device 110 may start the Systemd-fsck. service through systemd program and perform operation S412.
[0097] In S412, checking the root partition file system by the Systemd-fsck. service.
[0098] The processing device 110 may check the root partition file system via the Systemd-fsck. service to determine whether there is an abnormality in the root partition file system. If it is determined that there is any abnormality in the root partition file system, operation S414 is performed; if it is determined that there is no abnormality in the root partition file system, operation S416 is performed. More contents on how to perform the checking of the root partition file system may be found in operation S310.
[0099] In S414, repairing the root partition file system.
[0100] After determining that there is any abnormality in the root partition file system, the processing device 110 may repair the root partition file system. More contents on how to repair the root partition file system may be found in operation S330. After the repair of the root partition file system is completed, the processing device 110 may perform operation S416.
[0101] In S416, mounting the root partition file system and switching to the root partition file system.
[0102] After determining that the root partition file system is normal or after completing the repair of the root partition file system, the processing device 110 may mount the root partition file system. After the successful mount of the root partition file system, the processing device 110 may switch the currently used file system from the virtual file system Initramfs to the root partition file system. More contents on how to mount and switch to the root partition file system may be found in operation S320 and operation S335.
[0103] In S418, starting service and target by Systemd program, reading the passno field corresponding to other partition file systems in / etc / fstab, and starting the checking service of the other partition file systems with a passno field greater than 0.
[0104] After switching to the root partition file system, the processing device 110 may start the service and target through Systemd program. The service and target are configuration units in Systemd program, i.e., unit. The service indicates a background service process, for example, MySQLd. The target indicates logically grouping other configuration units. The processing device 110 may read the passno field corresponding to the other partition file systems in / etc / fstab through Systemd program, and for the other partition file systems with a passno field greater than 0, the processing device 110 may start Systemd-fsck@. service, and perform operation S420.
[0105] In S420, checking the other partition file systems by Systemd-fsck@. service.
[0106] For each partition file system of the other partition file systems, the processing device 110 may perform a check through the Systemd-fsck. Service to determine whether there is an abnormality in the partition file system. If it is determined that there is any abnormality in the partition file system, operation S422 is performed; if it is determined that there is no abnormality in the partition file system, operation S424 is performed. More contents on how to perform the check of the other partition file systems may be found in operation S340.
[0107] In S422, repairing the other partition file systems.
[0108] After determining that there is any abnormality in each partition file system in the other partition file systems, the processing device 110 repairs the partition file system. More contents on how to repair the other partition file systems may be found in operation S360. After the repair of the other partition file systems is completed, the processing device 110 may perform operation S424.
[0109] In S424, mounting the other partition file systems.
[0110] After determining that there is no abnormality in the other partition file systems or after completing repairing the other partition file systems, the processing device 110 may mount the other partition file systems. More contents on how to mount the other partition file systems may be found in operations S350 and S365.
[0111] Operations S420-S424 may be performed in a loop. In each loop, the processing device 110 may check and repair one partition file system among the other partition file systems, until all the partition file systems among the other partition file systems are mounted, the loop ends, then the operation system startup of the processing device 110 is completed. Then, the processing device 110 may perform operation S426.
[0112] In S426, detecting, by file-monitor-restore. service, whether the real file system is repaired.
[0113] After the operation system startup of the processing device 110 is completed, the processing device 110 may detect whether the real file system is repaired through file-monitor-restore. service. When any one of the real file systems is repaired, it is considered that the real file system is repaired; when none of the real file systems is repaired, it is considered that the real file system is not repaired. If it is determined that the real file system is repaired, the processing device 110 may perform operation S428; if it is determined that the real file system is not repaired, the entire process ends. More contents on how to detect whether the real file system is repaired may be found in operation S390.
[0114] In S428, performing verification on a target file under a preset path.
[0115] After determining that the real file system is repaired, the processing device 110 may verify the target file under the preset path. For example, the processing device 110 verifies the target file by comparing an MD5, a hash value, a CRC value, etc. of a backed up target file and the current target file.
[0116] Step S430, determining whether there is a missing in the target file.
[0117] The processing device 110 may determine whether there is a missing in the target file through a verification result. The file missing includes that there is any file being corrupted, modified, deleted, or moved. For example, an inconsistency in the MD5 value, the hash value, or the CRC value of the backed up target file and the current target file indicates that the target file is modified or corrupted, and the processing device 110 determines that there is a missing in the target file. If it is determined that there is any missing in the target file, the processing device 110 may perform operation S432; if it is determined that there is no missing in the target file, the entire process ends.
[0118] In S432, recovering the target file from backup files.
[0119] After determining that there is any missing in the target file under the preset path, the processing device 110 may use a backed up target file to recover the target file. More contents on how to determine whether there is a missing in the target file and recovering the target file may be found in operation S390.
[0120] In the embodiments of the present disclosure, by using the file-monitor-backup. service and file-monitor-restore. service, after the real file system is repaired, the check is performed on the target file under the preset path in the repaired real file system, so as to reduce problems such as an abnormal operation of the server caused by the target file in which any missing exists. By checking and repairing the root partition file system and the other partition file systems during the initramfs phase, the checking and repairing of the real file system becomes more comprehensive, which ensures the normal startup and operation of the operation system of the server.
[0121] FIG. 5 is a schematic diagram illustrating an exemplary process for monitoring and backing up a target file according to some embodiments of the present disclosure. In some embodiments, at least part of the process 500 is performed to achieve at least part of operations S370-S380 as described in connection with FIG. 3. For example, the processing device 110 (e.g., one or more modules illustrated in FIG. 2) of the server 100 performs the monitoring and backing up of the target file by performing at least a portion of operation 500.
[0122] In S510, monitoring a target file under a preset path through file-monitor-backup. service.
[0123] During the system operation of the processing device 110, i.e., after the operation system startup in operation S424 is completed, the processing device 110 may monitor, through the file-monitor-backup. service, a changing situation of the target file in the preset path.
[0124] In S520, determining whether the target file is changed.
[0125] The processing device 110 may determine, based on a monitoring result of the changing situation of the target file, whether the target file is changed. The change of the target file includes at least one of modification, a move, a deletion, a new addition, etc. to the target file. If it is determined that the target file changes, the processing device 110 may perform operation S350; if it is determined that the target file does not change, the processing device 110 may continue to perform operation S510. More contents on how to determine the change situation of the target file through monitoring may be found in operation S370.
[0126] In S530, backing up the target file that is changed.
[0127] After determining that the target file under the preset path is changed, the processing device 110 may back up the changed target file through file-monitor-backup. service. More contents on how to back up the target file may be found in operation S380.
[0128] In some embodiments, in operation S430 of FIG. 4, after determining that there is any missing in the target file under the preset path, the processing device 110 pauses file-monitor-backup. service to suspend the monitoring of the target file, and then performs operation S432 to recover the target file. After operation S432, the processing device 110 may restart the file-monitor-backup. service to continue monitoring the change situation of the target file.
[0129] In the embodiments of the present disclosure, through the use of file-monitor-backup. service, the target file under the preset path is monitored during the operation of the system, and the backup of the target file is performed when the change in the target file is detected. In this way, the safety of important data is secured, the data safety is improved, and the normal operation of the system is ensured.
[0130] The operations of the illustrated processes 300, 400, and 500 presented above are intended to be illustrative. In some embodiments, a process may be accomplished with one or more additional operations not described, and / or without one or more of the operations discussed. Additionally, the order in which the operations of a process described above is not intended to be limiting.
[0131] Having thus described the basic concepts, it may be rather apparent to those skilled in the art after reading this detailed disclosure that the foregoing detailed disclosure is intended to be presented by way of example only and is not limiting. Various alterations, improvements, and modifications may occur and are intended to those skilled in the art, though not expressly stated herein. These alterations, improvements, and modifications are intended to be suggested by this disclosure and are within the spirit and scope of the exemplary embodiments of this disclosure.
[0132] Moreover, certain terminology has been used to describe embodiments of the present disclosure. For example, the terms “one embodiment, ” “an embodiment, ” and / or “some embodiments” may mean that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present disclosure. Therefore, it is emphasized and should be appreciated that two or more references to “an embodiment” or “one embodiment” or “an alternative embodiment” in various portions of the present disclosure are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures or characteristics may be combined as suitable in one or more embodiments of the present disclosure.
[0133] Further, it will be appreciated by one skilled in the art, aspects of the present disclosure may be illustrated and described herein in any of a number of patentable classes or context including any new and useful process, machine, manufacture, or composition of matter, or any new and useful improvement thereof. Accordingly, aspects of the present disclosure may be implemented entirely hardware, entirely software (including firmware, resident software, micro-code, etc. ) or combining software and hardware implementation that may all generally be referred to herein as a “unit, ” “module, ” or “system. ” Furthermore, aspects of the present disclosure may take the form of a computer program product embodied in one or more computer readable media having computer readable program code embodied thereon.
[0134] A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of carrier wave. Such a propagated signal may take any of a variety of forms, including electro-magnetic, optical, or the like, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that may communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable signal medium may be transmitted using any appropriate medium, including wireless, wireline, optical fiber cable, RF, or the like, or any suitable combination of the foregoing.
[0135] Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Scala, Smalltalk, Eiffel, JADE, Emerald, C++, C#, VB.NET, Python or the like, conventional procedural programming languages, such as the “C” programming language, Visual Basic, Fortran 2103, Perl, COBOL 2102, PHP, ABAP, dynamic programming languages such as Python, Ruby and Groovy, or other programming languages. The program code may execute entirely on the user’s computer, partly on the user’s computer, as a stand-alone software package, partly on the user’s computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user’s computer through any type of network, including a local area network (LAN) or a wide area network (WAN) , or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider) or in a cloud computing environment or offered as a service such as a Software as a Service (SaaS) .
[0136] Furthermore, the recited order of processing elements or sequences, or the use of numbers, letters, or other designations, therefore, is not intended to limit the claimed processes and methods to any order except as may be specified in the claims. Although the above disclosure discusses through various examples what is currently considered to be a variety of useful embodiments of the disclosure, it is to be understood that such detail is solely for that purpose, and that the appended claims are not limited to the disclosed embodiments, but, on the contrary, are intended to cover modifications and equivalent arrangements that are within the spirit and scope of the disclosed embodiments. For example, although the implementation of various components described above may be embodied in a hardware device, it may also be implemented as a software only solution, for example, an installation on an existing server or mobile device.
[0137] Similarly, it should be appreciated that in the foregoing description of embodiments of the present disclosure, various features are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure aiding in the understanding of one or more of the various inventive embodiments. This method of disclosure, however, is not to be interpreted as reflecting an intention that the claimed object matter requires more features than are expressly recited in each claim. Rather, inventive embodiments lie in less than all features of a single foregoing disclosed embodiment.
[0138] In some embodiments, the numbers expressing quantities or properties used to describe and claim certain embodiments of the application are to be understood as being modified in some instances by the term “about, ” “approximate, ” or “substantially. ” For example, “about, ” “approximate, ” or “substantially” may indicate ±1%, ±5%, ±10%, or ±20%variation of the value it describes, unless otherwise stated. Accordingly, in some embodiments, the numerical parameters set forth in the written description and attached claims are approximations that may vary depending upon the desired properties sought to be obtained by a particular embodiment. In some embodiments, the numerical parameters should be construed in light of the number of reported significant digits and by applying ordinary rounding techniques. Notwithstanding that the numerical ranges and parameters setting forth the broad scope of some embodiments of the application are approximations, the numerical values set forth in the specific examples are reported as precisely as practicable.
[0139] Each of the patents, patent applications, publications of patent applications, and other material, such as articles, books, specifications, publications, documents, things, and / or the like, referenced herein is hereby incorporated herein by this reference in its entirety for all purposes, excepting any prosecution file history associated with same, any of same that is inconsistent with or in conflict with the present document, or any of same that may have a limiting effect as to the broadest scope of the claims now or later associated with the present document. By way of example, should there be any inconsistency or conflict between the description, definition, and / or the use of a term associated with any of the incorporated material and that associated with the present document, the description, definition, and / or the use of the term in the present document shall prevail.
[0140] In closing, it is to be understood that the embodiments of the application disclosed herein are illustrative of the principles of the embodiments of the application. Other modifications that may be employed may be within the scope of the application. Thus, by way of example, but not of limitation, alternative configurations of the embodiments of the application may be utilized in accordance with the teachings herein. Accordingly, embodiments of the present application are not limited to that precisely as shown and described.
Claims
1.A method, implemented on a computing device including at least one processor and at least one storage device, the method comprising:determining, by checking a first file system of the computing device, whether there is an abnormality in the first file system;in response to that there is no abnormality in the first file system, mounting the first file system;determining, by checking a second file system of the computing device, whether there is an abnormality in the second file system; andin response to that there is no abnormality in the second file system, mounting the second file system to complete system startup of the computing device.2.The method of claim 1, wherein the first file system includes a root partition file system of the computing device, and the second file system includes other partitions file systems of the computing device except for the root partition file system.3.The method of claim 2, further comprising:in response to that there is any abnormality in the first file system, repairing the first file system; andin response to completion of the repairing of the first file system, mounting the first file system.4.The method of claim 3, further comprising:in response to that there is any abnormality in the second file system, repairing the second file system; andin response to completion of the repairing of the second file system, mounting the second file system.5.The method of any one of claims 1-4, further comprising:in response to the completion of the system startup of the computing device, monitoring change of a target file under a preset path; andin response to the change of the target file, generating a first backup of the target file.6.The method of claim 5, further comprising:in response to the completion of the system startup of the computing device, determining whether the first file system and the second file system have been repaired;in response to determining that at least one of the first file system or the second file system has been repaired, determining whether there is a missing in the target file in the at least one file system;in response to that there is any missing in the target file, obtaining a second backup of the target file; andreplacing the target file with the second backup of the target file.7.The method of claim 6, whereinin response to that there is any missing in the target file, before obtaining the second backup of the target file, the method further includes:pausing the monitoring of the change of the target file under the preset path; andin response to that there is any missing in the target file, after replacing the target file with the second backup of the target file, the method further includes:restarting the monitoring of the change of the target file under the preset path.8.The method of any one of claims 5-7, further comprising:determining an importance level of the preset path; anddetermining, based on the importance level, a backup parameter of the target file under the preset path, wherein the backup parameter includes at least one of a backup time, a backup quantity, or a backup manner of the target file.9.The method of claim 8, wherein a type of the backup time includes a current time and an idle time, and the generating a first backup of the target file in response to the change of the target file includes:in response to the importance level being greater than an importance level threshold, generating the first backup of the target file at the current time; andin response to the importance level being less than or equal to the importance level threshold, generating the first backup of the target file at the idle time.10.The method of claim 9, further comprising:in response to a count of files with a same type of backup time in the target file being greater than a count threshold, simultaneously backing up the files, wherein the backup manner of the files includes storing the files in a same storage location.11.The method of claim 10, wherein the count threshold is positively correlated with an occupancy degree of computing resources of the computing device.12.The method of any one of claims 5-11, further comprising:for each path other than the preset path, determining an importance level of the path; anddetermining, based on the importance level of the path, whether to update the preset path.13.The method of any one of claims 1-12, wherein the determining, by checking a second file system of the computing device, whether there is an abnormality in the second file system includes:for each partition file system of the second file system, determining whether the partition file system is a large partition file system based on whether a file data amount of the partition file system is greater than a data amount threshold;in response to the partition file system being the large partition file system, mounting the partition file system and determining whether there is the abnormality in the second file system based on a mounting result of the partition file system; andin response to the partition file system not being the large partition file system, checking the partition file system to determine whether there is an abnormality in the partition file system.14.The method of claim 13, wherein the data amount threshold is negatively correlated with a count of preset paths or target files.15.A system, comprising a computing device, wherein the computing device includes:at least one storage device including a set of instructions; andat least one processor in communication with the at least one storage device, wherein when executing the set of instructions, the at least one processor causes the system to perform operations including:determining, by checking a first file system of the computing device, whether there is an abnormality in the first file system;in response to that there is no abnormality in the first file system, mounting the first file system;determining, by checking a second file system of the computing device, whether there is an abnormality in the second file system; andin response to that there is no abnormality in the second file system, mounting the second file system to complete system startup of the computing device.16.The system of claim of claim 15, wherein the first file system includes a root partition file system of the computing device, and the second file system includes other partitions file systems of the computing device except for the root partition file system.17.The system of claim 16, wherein the at least one processor causes the system to perform operations including:in response to that there is any abnormality in the first file system, repairing the first file system; andin response to completion of the repairing of the first file system, mounting the first file system.18.The system of claim 17, wherein the at least one processor causes the system to perform operations including:in response to that there is any abnormality in the second file system, repairing the second file system; andin response to completion of the repairing of the second file system, mounting the second file system.19.The system of any one of claims 15-18, wherein the at least one processor causes the system to perform operations including:in response to the completion of the system startup of the computing device, monitoring change of a target file under a preset path; andin response to the change of the target file, generating a first backup of the target file.20.The system of 19, wherein the at least one processor causes the system to perform operations including:in response to the completion of the system startup of the computing device, determining whether the first file system and the second file system have been repaired;in response to determining that at least one of the first file system or the second file system has been repaired, determining whether there is a missing in the target file in the at least one file system;in response to that there is any missing in the target file, obtaining a second backup of the target file; andreplacing the target file with the second backup of the target file.21.The system of claim 20, whereinin response to that there is any missing in the target file, before obtaining the second backup of the target file, the at least one processor causes the system to perform operations including:pausing the monitoring of the change of the target file under the preset path; andin response to that there is any missing in the target file, after replacing the target file with the second backup of the target file, the method further includes:restarting the monitoring of the change of the target file under the preset path.22.The system of any one of claims 19-21, wherein the at least one processor causes the system to perform operations including:determining an importance level of the preset path; anddetermining, based on the importance level, a backup parameter of the target file under the preset path, wherein the backup parameter includes at least one of a backup time, a backup quantity, or a backup manner of the target file.23.The system of claim 22, wherein a type of the backup time includes a current time and an idle time, and the at least one processor causes the system to perform operations including:in response to the importance level being greater than an importance level threshold, generating the first backup of the target file at the current time; andin response to the importance level being less than or equal to the importance level threshold, generating the first backup of the target file at the idle time.24.The system of claim 23, wherein the at least one processor causes the system to perform operations including:in response to a count of files with a same type of backup time in the target file being greater than a count threshold, simultaneously backing up the files, wherein the backup manner of the files includes storing the files in a same storage location.25.The system of claim 23, wherein the count threshold is positively correlated with an occupancy degree of computing resources of the computing device.26.The system of any one of claims 19-25, wherein the at least one processor causes the system to perform operations including:for each path other than the preset path, determining an importance level of the path; anddetermining, based on the importance level of the path, whether to update the preset path.27.The system of any one of claims 15-26, wherein the determining, by checking a second file system of the computing device, whether there is an abnormality in the second file system includes:for each partition file system of the second file system, determining whether the partition file system is a large partition file system based on whether a file data amount of the partition file system is greater than a data amount threshold;in response to the partition file system being the large partition file system, mounting the partition file system and determining whether there is the abnormality in the second file system based on a mounting result of the partition file system; andin response to the partition file system not being the large partition file system, checking the partition file system to determine whether there is an abnormality in the partition file system.28.The system of 27, wherein the data amount threshold is negatively correlated with a count of preset paths or target files.29.A system, comprising:a first checking module configured to determine, by checking a first file system of the computing device, if there are any abnormalities in the first file system;a first mounting module configured to, in response to that there is no abnormality in the first file system, mount the first file system;a second checking module configured to determine, by checking a second file system of the computing device, whether there is an abnormality in the second file system; anda second mounting module configured to, in response to that there is no abnormality in the second file system, mount the second file system to complete system startup of the computing device.30.A non-transitory computer readable medium, comprising executable instructions that, when executed by at least one processor, direct the at least one processor to perform a method, the method comprising:determining, by checking a first file system of the computing device, whether there is an abnormality in the first file system;in response to that there is no abnormality in the first file system, mounting the first file system;determining, by checking a second file system of the computing device, whether there is an abnormality in the second file system; andin response to that there is no abnormality in the second file system, mounting the second file system to complete system startup of the computing device.
Citation Information
Patent Citations
Backup and recovery method of computer system, device and computer system
CN102567136A
Operating system starting method and device, medium and electronic equipment
CN116360874A
File system repairing method and device, storage medium and electronic device
CN118519834A
Method, device and computer readable medium for accessing files
US20200133916A1