A safe processing method after the Linux server crashes

  
 

Will the Linux server crash? Of course, I have been exposed to a certain type of server. After installing Red Hat Enterprise Server 5.8, if the external storage suddenly breaks, the server crashes directly. Under normal circumstances, the server may be dead. You can press the power button to restart it. But if the server itself is old and has very important data, a hard hard reboot is too dangerous. Here is a safer way to handle the restart of the server through a series of keyboard key combinations.

An analysis problem

1.1 Problem phenomenon
1, Linux server crashes, the system has no response; 2, the mouse and keyboard can not move, the keyboard light is still on; 3, the server Older, hard reboot may lead to hardware damage; 4, the server has very important data, can not be lost;

1.2 problem analysis
Although the Linux server has crashed, there is no response on the surface, but the system The kernel can still accept some input information and perform many low-level operations. At this time, the keyboard control should be grabbed from the X server through keyboard input.

Two Solution

2.1 New System Request
First find the “Sys Rq” key on the keyboard. This is the meaning of the system request. Press and hold this button to create a new system request. The position of the button on the keyboard is as follows:

2.2 reisub
Find the reisub letter keys in order, press these buttons in turn, and the server will restart itself. Reisub is actually a combination of a series of operations, its role is as follows: r: unRaw, forced to grab control of the keyboard; e: tErminate, send SIGTERM signal to all processes, ready to close; i: kIll, send to all processes SIGKILL signal, immediately shut down the process; s: Sync, all data in memory is immediately written to disk; u: Unmount, all file systems are mounted in read-only mode; b: reBoot, restart immediately;

2.3 Remember the order of letter combinations
In practice, the order of the reisub buttons cannot be reversed, and the consequences have not been tried. Keeping in mind the order in which these keys are combined is actually quite simple. The reverse of the combination order is the English word busier.

Three Summary
Under normal circumstances, the server should be periodically restarted for maintenance. In particular, servers that store important data not only need to be restarted, but also need regular backups to ensure data security.

Copyright © Windows knowledge All Rights Reserved