---
title: "Checking the file system on a VPS"
description: "Find out how to check a file system for errors in rescue mode"
url: https://docs.ovhcloud.com/en/guides/bare-metal-cloud/virtual-private-servers/check-filesystem
lang: en
lastUpdated: 2023-09-20
---
# Checking the file system on a VPS

## Objective

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

:::warning
OVHcloud is providing you with services for which you are responsible, with regard to their configuration and management. You are therefore responsible for ensuring they function correctly.

If you encounter any difficulties performing these actions, please contact a [specialist service provider](https://partner.ovhcloud.com/en-gb/directory/) and/or discuss the issue with our community on [https://community.ovh.com/en/](https://community.ovh.com/en/). OVHcloud cannot provide you with technical support in this regard.
:::

## Requirements

- A [VPS](https://www.ovhcloud.com/en-gb/vps/) in your OVHcloud account


***

### OVHcloud Control Panel Access

- **Direct link:** <ManagerLink to="/#/dedicated/vps">VPS management</ManagerLink>
- **Navigation path:** <code className="action">Bare Metal Cloud</code> > <code className="action">Virtual private servers</code> > Select your VPS

***


## Instructions

### GNU/Linux VPS

Initiate a server reboot in rescue mode from the Control Panel. Follow our [rescue mode guide](/en/guides/bare-metal-cloud/virtual-private-servers/rescue.md) if necessary.

You can then verify the configuration of the disks:

```bash
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:

```console
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](#fscheck).

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

Example:

```console
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:

```bash
umount /dev/partition_name
```

In this example configuration, the command would be:

```bash
umount /dev/sdb1
```

[](#)
Now you can check the partition with "fsck":

```bash
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:

```bash
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](/en/guides/bare-metal-cloud/virtual-private-servers/rescue.md) if necessary.

You can then verify the configuration of the disks:

```bash
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:

```console
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](#fscheckwin).

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

Example:

```console
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:

```bash
umount /dev/partition_name
```

In this example configuration, the command would be:

```bash
umount /dev/sdb2
```

[](#)
The following command checks the partition for consistency and tries to resolve errors if any are found:

```bash
ntfsfix /dev/partition_name
```

In this example configuration, the command would be:

```bash
ntfsfix /dev/sdb2
```

## Go further

[Activating Rescue Mode on VPS](/en/guides/bare-metal-cloud/virtual-private-servers/rescue.md)

Join our [community of users](https://community.ovhcloud.com/).
