# Server maintenance (/docs/ebm/server-maintenance) Server maintenance covers the essential operations for managing the lifecycle and availability of your dedicated server. This section walks you through how to reboot or shut down a server, use rescue mode to recover from critical failures, and cancel a service when it's no longer needed. ## Power management via Customer Portal In the [Customer Portal](https://portal.servers.com/), you can initiate a reboot or shutdown of the server. Special commands are sent to the PDU (Power Distribution Unit) automation, which triggers the power to the outlet connected to the server to be turned off or restored. Both the PDU and the server have built-in protection, significantly reducing the risk of software malfunctions, file system issues, or hardware failures during power outages. When the protection is triggered, the PDU will prevent the server from rebooting or shutting down, and the notification will appear on the Customer Portal page: ``` "Power management is currently unavailable because of a running operation on the server. Please try again later." ``` This occurs when there is an ongoing automation task on the server or the server is in maintenance mode. This could be due to operations performed by the Servers.com team or tasks initiated by the server users, such as firmware updates or failure diagnostics. ## How to reboot a dedicated server Rebooting a server may be required to resolve accumulated system errors, apply software updates or other purposes. The server can be rebooted in two ways: via the Customer Portal and via the VNC console. ### Customer Portal To reboot the server via the [Customer Portal](https://portal.servers.com/), complete the following steps: 1. In the left-hand menu, navigate to **Dedicated Servers** → **Manage** 2. Select the server and click **Details** 3. Scroll to the Power section and select **Reboot** 4. To confirm this action, enter your account password in the pop-up window and click **Continue** The server will be rebooted. You can check the server status in the **Status** field in this section. If the status does not change, try using the **Refresh** button. If the server does not reboot, refer to the **Power management via Customer Portal** section above for detailed information. ### VNC console To reboot the server via the VNC console, complete the following steps: 1. Open the [Customer Portal](https://portal.servers.com/login) and navigate to **Dedicated Servers** → **Manage** 2. Select the server and click **Details** 3. In the Details section, click **VNC console** and confirm your action by entering your account password in the opened window 4. In the opened console, click ▹ to open the control bar → Show Extra keys → Send Ctrl+Alt+Delete The server will be rebooted. ## How to switch off the dedicated server Temporarily shutting the server down allows for scheduled maintenance, equipment replacement, or upgrades without risking data corruption. The server can be switched off in two ways: via the Customer Portal and via the VNC console. ### Customer Portal To switch off the server via the Customer Portal, complete the following steps: 1. Open the [Customer Portal](https://portal.servers.com/login) and navigate to **Dedicated Servers** → **Manage** 2. Select the server and click **Details** 3. Scroll to the Power section and select **Off** 4. To confirm this action, enter your account password in the pop-up window and click **Continue** The server will be switched off. You can check the server status in the **Status** field in this section. If the status does not change, try using the **Refresh** button. If the server does not switch off, refer to the **Power management via Customer Portal** section above for detailed information. ### VNC console To switch off the server via the VNC console, complete the following steps: 1. Open the [Customer Portal](https://portal.servers.com/login) and navigate to **Dedicated Servers** → **Manage** 2. Select the server and click **Details** 3. In the **Details** section, click **VNC console** and confirm your action by entering your account password in the opened window 4. In the opened console: * For Linux-based systems, execute the following command: ``` shutdown -h ``` * For Windows systems, click ▹ to open the control bar → show extra keys → click the Windows icon → shutdown The server will be switched off. > As long as the dedicated server is not cancelled, the billing for bare-metal and all its additional services is charged at the standard rate, even if the server is switched off. ## What is rescue mode? Rescue mode is a useful feature for dedicated and cloud servers, allowing you to diagnose, fix problems and restore server functionality in case of failures. This feature is accessible to users via the [Customer Portal](https://portal.servers.com/) control panel. In cases where the OS is affected by critical system errors or the server is unable to boot properly, rescue mode may come in handy. ## How to restore a dedicated server using rescue mode In rescue mode, the server connection occurs via a public IP address, so it's essential that the server has a configured public network to utilize this function. Please note that when using rescue mode, server power outlets are rebooted, and the server shuts down immediately. This can potentially cause database failures and damage to the OS filesystem. Therefore, when enabling rescue mode, it's crucial to perform a graceful shutdown to allow the operating system to properly terminate all services. To enter rescue mode, complete the following steps: 1. In the left-hand menu, navigate to **Dedicated Servers** → **Manage** 2. In the **My servers** section, choose the server and click **Details** 3. Click the **Reboot to rescue** button and wait for an email with temporary login credentials (this usually takes up to 10 minutes) The email will be sent to Contacts with primary and technical roles. 4. Use credentials to access the server via SSH: ``` ssh 123.45.67.89 -l root Warning: Permanently added '123.45.67.89' (RSA) to the list of known hosts. root@123.45.67.89's password: * Welcome to DMGMTSrvInit 1.0 x86_64 [based on CentOS 6 x86_64] Dell OpenManage Deployment Toolkit: - RAID: raidcfg - DRAC: racadm4, racadm5, idracadm7 - BIOS: syscfg - SYSTEM: omconfig, omreport, dsu Additional utils: - RAID: mdadm - FS: lvm, xfs, jfs, e2fs, nfs, ntfs, dosfs, parted, fdisk, cfdisk, sfdisk, grub - EDITORS: vi, nano, joe - SYSTEM: dmidecode, smartmontools, testdisk, hddtemp, lshw, memtester, ipmitool - NETWORK: ethtool, tcpdump, mtr, traceroute, tcptraceroute, nmap, dstat - TOOLS: rsync, lftp, curl, wget, nc, screen, mc, chkrootkit You can check speedtest files in your browser, url: http:/// ``` A list of useful commands is displayed upon login. To recover the GRUB configuration file, complete the following steps: 1. Get the list of available disks and partitions using the `lsblk` command: ``` [root@dmgmtsrvinit.pxe ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sdb 8:16 0 1.8T 0 disk ├─sdb1 8:17 0 1M 0 part ├─sdb2 8:18 0 500M 0 part │ └─md127 9:127 0 500M 0 raid1 └─sdb3 8:19 0 1.8T 0 part └─md126 9:126 0 1.8T 0 raid1 ├─C1500302784I0-home (dm-0) 253:0 0 1.8T 0 lvm ├─C1500302784I0-rootfs (dm-1) 253:1 0 10G 0 lvm └─C1500302784I0-swap (dm-2) 253:2 0 2G 0 lvm sda 8:0 0 1.8T 0 disk ├─sda1 8:1 0 1M 0 part ├─sda2 8:2 0 500M 0 part │ └─md127 9:127 0 500M 0 raid1 └─sda3 8:3 0 1.8T 0 part └─md126 9:126 0 1.8T 0 raid1 ├─C1500302784I0-home (dm-0) 253:0 0 1.8T 0 lvm ├─C1500302784I0-rootfs (dm-1) 253:1 0 10G 0 lvm └─C1500302784I0-swap (dm-2) 253:2 0 2G 0 lvm ``` Disk `/dev/mapper/C1500302784I0-rootfs` contains the root partition and disk `/dev/md127` contains `/boot`. 2. Mount these partitions: ``` mkdir /mnt/root mount /dev/mapper/C1500302784I0-rootfs /mnt/root mount /dev/md127 /mnt/root/boot ``` You'll also need to mount several other partitions in order to make the `grub2-mkconfig` command work properly: ``` mount -o bind /dev /mnt/root/dev mount -o bind /sys /mnt/root/sys mount -t proc none /mnt/root/proc ``` 3. Change the root directory using the `chroot` command: ``` chroot /mnt/root ``` 4. Execute the `grub2-mkconfig` command, which will generate a new GRUB configuration file: ``` [root@dmgmtsrvinit.pxe /]# grub2-mkconfig -o /boot/grub2/grub.cfg Generating grub configuration file ... WARNING: Failed to connect to lvmetad. Falling back to device scanning. WARNING: Failed to connect to lvmetad. Falling back to device scanning. Found linux image: /boot/vmlinuz-3.10.0-514.26.2.el7.x86_64 Found initrd image: /boot/initramfs-3.10.0-514.26.2.el7.x86_64.img Found linux image: /boot/vmlinuz-3.10.0-514.el7.x86_64 Found initrd image: /boot/initramfs-3.10.0-514.el7.x86_64.img Found linux image: /boot/vmlinuz-0-rescue-7dafe89409d74ef2a70c495f0148d7e3 Found initrd image: /boot/initramfs-0-rescue-7dafe89409d74ef2a70c495f0148d7e3.img WARNING: Failed to connect to lvmetad. Falling back to device scanning. WARNING: Failed to connect to lvmetad. Falling back to device scanning. done ``` 5. Exit the `chroot` and shut down the server properly: ``` [root@dmgmtsrvinit.pxe /]# exit [root@dmgmtsrvinit.pxe ~]# shutdown -h now Broadcast message from root@dmgmtsrvinit.pxe (/dev/pts/0) at 18:29 ... The system is going down for halt NOW! [root@dmgmtsrvinit.pxe ~]# Connection to 123.45.67.89 closed by remote host. Connection to 123.45.67.89 closed. ``` ## How to exit rescue mode As soon as recovery work is finished, click the **Exit rescue mode** button in the [Customer Portal](https://portal.servers.com/). The server will exit rescue mode and boot normally from the OS installed on its disks. ## How to cancel the dedicated server service If you decide to cancel one of your dedicated servers as a service, complete the following steps: 1. In the left-hand menu, navigate to **Dedicated Servers** → **Manage** 2. In the **My servers** section, choose the server you wish to cancel and click **Details** 3. Scroll to the **Services** section 4. Click **Cancel Service** 5. Choose the date and time for the server to be unlinked from your account Keep in mind that the service cancellation will take effect 30 days from the cancellation date. Since service termination is irreversible, it will be impossible to recover data after the expiration. Therefore, make sure to back up your data stored on the server. You will be billed up until the service termination date. To immediately remove the server, send an email to [sales@servers.com](mailto:sales@servers.com). 6. To confirm this action, click **Cancel service** and enter your account password in the pop-up window and click **Continue**