Repairing database skills after Linux system crashes

  

If the Linux system crashes, the data inside will be lost. Serious damage to the database, learn how to repair the database, you can minimize this loss. This article will introduce the repair database skills after the Linux system crash.

problem description and analysis:

suddenly found that the machine can not log in, the feeling is remote interruption, and immediately received a phone call, test the database can not be used. After entering the equipment room, I found that the system could not be started. I get an error: no such file or directory. . . How should this be good? If I am a DBA, I have to solve the problem of the system, or to strengthen the study. The online solution prompts me to boot into the system's rescue mode (CD-ROM or USB flash drive), then scan the VG information, manually activate the VG volume, and mount the required files of the database through the network after the LV is mounted. Or a mobile device for backup. After that, everyone will get it. The data was saved and the mood was calmer.

Processing method:

1. Boot to the rescue mode of the system using CD-ROM or USB flash drive (here refers to the operating system installation disk)

2. Vgscan -- scan vg information

3. vgdisplay -- view vg information

4. vgchange -ay vg volume group name -- activate vg

5. lvdisplay -- View lv information

6. Mount path lv name new mount point--mount lv

7. Back up the relevant database content on the mounted disk through the network and mobile device backup .

8. Repair the operating system or reinstall

9. Return the backed up database file COPY back to the normal system

10 . Install oracle software and restore the database

Summary: The above problem is best not to encounter, of course, this fault once again reminded us DBA, the importance of backup. Remember to remember and remember.

The above is the skill of repairing database skills after the Linux system crashes. Of course, if you want to repair the database, the first thing to do is to back up, so remember to back up the database at any time during normal use.

Copyright © Windows knowledge All Rights Reserved