Checking the file system on a VPS

View as Markdown

Find out how to check a file system for errors in rescue mode

Objective

This guide explains how to diagnose file systems on OVHcloud Virtual Private Servers using rescue mode.

Information regarding OVHcloud service administration and how to find appropriate assistance

When using OVHcloud guides, please be aware of the following conditions:

  • User instructions aim to provide as many details as possible but cannot cover individual use cases. You might need to adapt the pertinent actions to your requirements.
  • The OVHcloud ecosystem is built for flexibility and freedom of choice. Customers are therefore responsible for the secure and proper configuration of their services. To prevent data loss, we strongly recommend to apply backup strategies to all your important data.
  • Our guides and tutorials may reference third-party software or services in combination with OVHcloud solutions. The technical support provided by OVHcloud does not include the configuration of systems or products outside of our responsibility. This includes but is not limited to:
    • Operating systems and user interfaces (Windows, Debian, Plesk, etc.).
    • Any other third-party software (FTP clients, email software, etc.).
    • Services offered by other providers (DNS, APIs, user interfaces, etc.).

To receive the appropriate assistance for any issues you might experience, follow these guidelines:

  • You seek personalized advice or you would like to discuss a topic that is not covered in detail by our documentation?
    Join the OVHcloud Community to search for your topic and reach out to other users.
  • You need to report an incident regarding your OVHcloud service or you are experiencing difficulties in the OVHcloud Control Panel?
    Create a support request in our Help Centre.
  • You require professional assistance for your project or you need help with tasks outside our support scope?
    Visit our partner portal to search for experts who are familiar with OVHcloud solutions.
  • You are looking for more detailed information regarding our support levels and Professional Services?
    Please visit our web pages for OVHcloud support levels and OVHcloud Professional Services.

You can participate in improving our documentation:

  • You would like to share feedback to improve a guide page or you want to report insufficient information on a specific page?
    Use the "Was this page helpful?" buttons at the bottom of the page to let us know.
  • You would like to propose a specific documentation update?
    Use the "Edit this page" function, available at the bottom of the page and in the sidebar.

Requirements

  • A VPS in your OVHcloud account

OVHcloud Control Panel Access

  • Direct link:
  • Navigation path: Bare Metal Cloud > Virtual private servers > Select your VPS

Instructions

GNU/Linux VPS

Initiate a server reboot in rescue mode from the Control Panel. Follow our rescue mode guide if necessary.

You can then verify the configuration of the disks:

lsblk

The partition corresponding to rescue mode (sda1 in this example) is mounted in the directory / and the disk of the VPS is named sdb and should have no mount point.

Example:

NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0  2.5G  0 disk
└─sda1   8:1    0  2.5G  0 part /
sdb      8:16   0   80G  0 disk
└─sdb1   8:17   0   80G  0 part  

If your result looks similar to the output above and the column MOUNTPOINT is empty in the corresponding line (sdb1), you can proceed with the next step.

However, if your result shows that there is a mount point for the VPS partition, it needs to be unmounted first.

Example:

sdb      8:16   0   80G  0 disk
└─sdb1  8:17   0   80G  0 part  /mnt/sdb1

In the example output above, the partition sdb1 is mounted at /mnt/. In order to check the partition, this partition must not be mounted.

To unmount your partition, use the following command:

umount /dev/partition_name

In this example configuration, the command would be:

umount /dev/sdb1

Now you can check the partition with "fsck":

fsck /dev/sdb1

cloudimg-rootfs: clean, 134995/3225600 files, 849881/6525179 blocks

If the result is empty, it usually means that the file system is clean. You can also force a check:

fsck /dev/sdb1 -f

Windows VPS

The instructions above do generally not apply to a Windows VPS, because the file system check does not support NTFS. You can however perform a NTFS consistency check on the partitions.

Initiate a server reboot in rescue mode from the Control Panel. Follow our rescue mode guide if necessary.

You can then verify the configuration of the disks:

lsblk

The partition corresponding to rescue mode (sda1 in this example) is mounted in the directory / and the disk of the VPS is named sdb and should have no mount point.

Example:

NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0  2.5G  0 disk
└─sda1   8:1    0  2.5G  0 part /
sdb      8:16   0  100G  0 disk
├─sdb1   8:17   0  350M  0 part 
├─sdb2   8:18   0 99.7G  0 part 

If your result looks similar to the output above and the column MOUNTPOINT is empty in the corresponding line, you can proceed with the next step.

However, if your result shows that there is a mount point for the VPS partition, it needs to be unmounted first.

Example:

sdb      8:16   0  100G  0 disk
├─sdb1   8:17   0  350M  0 part
├─sdb2   8:18   0 99.7G  0 part /mnt/sdb2

In the example output above, the partition concerned sdb2 is mounted at /mnt/. In order to check the partition, this partition must not be mounted.

To unmount your partition, use the following command:

umount /dev/partition_name

In this example configuration, the command would be:

umount /dev/sdb2

The following command checks the partition for consistency and tries to resolve errors if any are found:

ntfsfix /dev/partition_name

In this example configuration, the command would be:

ntfsfix /dev/sdb2

Go further

Activating Rescue Mode on VPS

Join our community of users.

Was this page helpful?