Article ID: 115683, created on Mar 11, 2013, last review on Nov 22, 2015

  • Applies to:
  • Virtuozzo 6.0


From time to time it is necessary to check the filesystem of a container in ploop format.


Due to various reasons, mainly because of a system crash or an incorrect replication level, the filesystem can became corrupted. As the result, the number of minor filesystem errors grows with time.

It can become necessary to check the filesystem in a ploop image for consistency to avoid data loss.


To run fsck, follow the following steps:

  1. Ensure the container is stopped:

    ~# vzctl stop 101
    ~# vzlist 101
    101          - stopped     fsck.test

    Note: Do not perform fsck when the container is running or mounted.

  2. Mount the container's ploop image. This allocates a ploop device on the host:

    ~# ploop mount /vz/private/101/root.hdd/DiskDescriptor.xml
    add delta dev=/dev/ploop12345 img=/vz/private/101/root.hdd/root.hds (rw)
  3. Run fdisk -l for the /dev/ploopX device reported by the previous command. You will need to let the system fetch a list of partitions on /dev/ploopX:

    ~# fdisk -l /dev/ploop12345
    WARNING: GPT (GUID Partition Table) detected on '/dev/ploop12345'! The util fdisk doesn't support GPT. Use GNU Parted.
    Disk /dev/ploop12345: 10.7 GB, 10737418240 bytes
    255 heads, 63 sectors/track, 1305 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00000000
    Device Boot      Start         End      Blocks   Id  System
    /dev/ploop12345p1               1        1306    10485759+  ee  GPT
  4. Perform a file system check for the partition reported in the previous command's output (note p1 at the end):

     ~# e2fsck /dev/ploop12345p1
    e2fsck 1.41.12 (17-May-2010)
    /dev/ploop12345p1: clean, 22404/655360 files, 238012/2620923 blocks

    Note: You may add more options to e2fsck, check the manual pages if needed.

  5. Unmount the ploop image:

    ~# ploop umount -d /dev/ploop12345
    Unmounting device /dev/ploop12345
  6. Start the container:

    ~# vzctl start 101

Search Words


Invalid argument

Failed to mount image

fs corrupt


Error in e2fsck

e2fsck: Bad magic number in super-block while trying to open



e2fsck failed

unable to start container

0dd5b9380c7d4884d77587f3eb0fa8ef 2897d76d56d2010f4e3a28f864d69223 c62e8726973f80975db0531f1ed5c6a2

Email subscription for changes to this article
Save as PDF