The invention discloses a hardware fault-oriented method and a hardware fault-oriented device for correcting faults in key files of a
system. The method comprises the following steps: (1), establishing a
backup file table which contains information of the key files of the
system, establishing a copy file for each target file of the
backup file table and maintaining synchronization of the copy files and the target files; (2), detecting file operation fault of an
operating system in real time and diagnosing the reason of the fault, when the file confronting the operation fault is the target file corresponding to the
backup file table and the fault is caused by hardware fault of a storage
system, carrying out next step; and (3), replacing the file encountering the operation fault with the corresponding copy file and trying to operate the file again. The device comprises a copy file managing module, a fault detecting module, a fault diagnosing module and a fault
processing module. According to the method and the device, the problem of system down or service
crash caused by file access failure can be prevented; and the method and the device have the advantages of good
fault tolerance characteristic, high robustness, real-time fault
recovery, transparency to user, strong expandability and good commonality.