How to run fsck on a simfs filesystem under openvz

RCD asked:

How do you do a fsck on a simfs filesystem under OpenVZ? You’re supposed to not run fsck on a mounted FS. Can you just fsck the image (/vz/private/100 or whatever it’s called)?

Sorry I can’t tag simfs.

My answer:

simfs is not an actual filesystem; it’s a map to a directory on the host (by default /vz/private/<veid>). To check the filesystem, you have to check the host filesystem from the host, which also means you have to bring down every container on the host. If you believe it’s necessary to check the filesystem, schedule a maintenance period and notify all the customers with containers on that host.

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.