[TUTORIAL] filesystem check of disk used by running VM

LeifSec

New Member
Jul 25, 2023
9
1
3
Is it possible to do a filesystem check of a disk used as root device of a running VM?

A VM reports errors and after reboot it got stuck, so that I needed to repair the filesystem with `fsck`. After 1 hour there have been errors again but I could run `fsck`inside the VM and do a reboot.

Now want to do periodical filesystem check to avoid the machine out of order again.

Running `fsck`now inside VM of course reports problems because of mounted disks:
```
fsck from util-linux 2.38.1
e2fsck 1.47.0 (5-Feb-2023)
/dev/mapper/yxxx--vg-root is mounted.
e2fsck: Cannot continue, aborting.
```

This, is it possible to do a filesystem check (and repair) from the hypervisor?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!