CPC G06F 11/3034 (2013.01) [G06F 1/30 (2013.01); G06F 11/2015 (2013.01); G06F 11/3065 (2013.01)] | 18 Claims |
1. A method for log recording applied to a storage device, wherein, a storage space of the storage device has at least two storage areas, and the at least two storage areas comprises at least one first storage area for storing data by using a serial writing mode and at least one second storage area for storing the data by using a parallel writing mode, the method comprises:
monitoring an operating state of a system of the storage device;
in response to the operating state of the system of the storage device being normal, storing generated log data in the first storage area; and
in response to the system of the storage device being abnormally powered off, switching an emergency power supply to supply power for the storage device and controlling a log data storage operation of the second storage area in response to abnormal power-off;
wherein in response to the system of the storage device being abnormally powered off, switching the emergency power supply to supply power for the storage device and controlling the log data storage operation of the second storage area in response to the abnormal power-off comprises:
in response to the system of the storage device being abnormally powered off, switching the emergency power supply to supply power for the storage device and responding to a timing operation; and
in response to a power-off process of the system being not completed within a target duration, storing the generated log data in the second storage area.
|