(dv):Using Repair Mode
- This page was last modified on May 12, 2011, at 07:13.
From (mt) Community Wiki
Contents |
What is Repair Mode?
Repair mode is a tool for any (dv) Dedicated-Virtual Server or (ve) Server that allows you to navigate your file system while the server environment is offline.
Why is Repair Mode useful?
The two biggest advantages to Repair Mode are 1) dealing with disk space issues where your server is at 100% utilization and can not be managed in production, and 2) making changes to the boot sequence to alter the state your server will start in when it is brought online. However, there is no limit to the specific situations where this tool may be useful.
Requirements
In order to make use of Repair Mode, you must have a fundamental understanding of using SSH with your server.
How to use Repair Mode?
-
To start Repair Mode, you have to log into your Virtuozzo interface and enter the maintenance options.
- (dv) Dedicated-Virtual 2-3.5 Servers: Log into Plesk as root and click on Virtuozzo from the left hand panel. This will present you with a Maintenance icon among the available options.
- (dv) Dedicated-Virtual 4.0 and (ve) Servers: Log into your Power Panel. Maintenance is a selectable option on the left-hand panel.
- Open the Repair Mode option and select Start Repair. If your server is still online, this will take it offline so that the file system can be mounted.
-
Once the server has successfully entered this mode, you can SSH to it as the root user.
You may encounter a warning that contains the following:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that the RSA host key has just been changed.
This is due to your ssh command using strict fingerprint checking (the default setting on most systems) and the mount point of your file system not identifying itself with the same information as your server. This is correct and expected, because it is not the same thing.
To work around this, you either need to edit your existing host file to re-accept the fingerprint presented by the repair system, or use the following flag on your ssh command (substitute your server's IP address):
ssh -o StrictHostKeyChecking=no root@0.0.0.0
-
Once connected, you can find your server mounted in /repair. Referring to the earlier examples, this means the following types of actions are available:
- A file located at /var/www/vhosts/example.com/httpdocs/largefile needs removed because it will safely take your disk usage under 100%. This can now be accomplished using:
rm /repair/var/www/vhosts/example.com/httpdocs/largefile- Your server is crashing immediately upon rebooting and you would like to temporarily remove the ability for apache to start:
chmod -x /repair/etc/init.d/httpd
- After you have completed the changes necessary, you can revisit your Virtuozzo panel and "Finish Repair." This will remount your file system to your server environment and attempt to boot the system.