Getting errors like:
2019-08-09T08:24:10-0400 : Error in e2fsck (fsutils.c:471): e2fsck failed (exit code 4)
2019-08-09T08:24:10-0400 vzctl : CT 392 : Failed to mount image /vz/private/392/root.hdd: Error in e2fsck (fsutils.c:471): e2fsck failed (exit code 4)
[41]
#vzctl start 392
Starting container…
Opening delta /vz/private/392/root.hdd/root.hdd
Adding delta dev=/dev/ploop61204p1 img=/vz/private/392/root.hdd/root.hdd (rw)
/dev/ploop61204p1p1: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
Error in e2fsck (fsutils.c:471): e2fsck failed (exit code 4)
Failed to mount image: Error in e2fsck (fsutils.c:471): e2fsck failed (exit code 4)
It can happen due to a file system crash or VPS Node crash etc…, don’t worry follow following tutorial to fix.
Solution:
1)Stop the container.
#vzctl stop 392
#vzlist 392
2)Mount the ploop image.
#ploop mount /vz/private/392/root.hdd/DiskDescriptor.xml
3)Perform fdisk -l
#fdisk -l /dev/ploop61204p1
4)Perform a file system check for the partition(note p1 at the end):
#e2fsck /dev/ploop61204p1p1
5)Unmount the ploop image
#ploop umount -d /dev/ploop61204p1
Unmounting device /dev/ploop61204p1
6)Start the container
#vzctl start 392