LXC won't start

ukhost4u

Member
Oct 30, 2008
95
0
6
Hello.

After a reboot to install a new kernel etc we can't get one of our LXC systems to start. The error is:

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff} span.s1 {font-variant-ligatures: no-common-ligatures}

root@vps7:/etc/pve/lxc# lxc-start -n 113 -F --logfile=lxc.log --logpriority=debug

mount: mount /dev/loop7 on /var/lib/lxc/113/rootfs failed: Structure needs cleaning

command 'mount -o noacl -o 'usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0' /dev/loop7 /var/lib/lxc/113/rootfs//' failed: exit code 32

lxc-start: conf.c: run_buffer: 347 Script exited with status 255

lxc-start: start.c: lxc_init: 465 failed to run pre-start hooks for container '113'.

lxc-start: start.c: __lxc_start: 1313 failed to initialize the container

lxc-start: tools/lxc_start.c: main: 344 The container failed to start.

lxc-start: tools/lxc_start.c: main: 348 Additional information can be obtained by setting the --logfile and --logpriority options.

Can anyone help?

Paul.
 
sounds like a file system problem/potential corruption? is this rootfs ext4 or xfs?
 
Hello,

I guess its ext4:

root@vps7:/var/lib/vz/images/113# file -s vm-113-disk-1.raw

vm-113-disk-1.raw: Linux rev 1.0 ext4 filesystem data, UUID=81f406cf-8108-45d0-92e9-a971eb0ffbdb (needs journal recovery) (extents) (large files) (huge files)

root@vps7:/var/lib/vz/images/113#

I also attempted this but got the same error:

root@vps7:/var/lib/vz/images/113# mount -o loop vm-113-disk-1.raw /mnt/debianvm/

mount: mount /dev/loop7 on /mnt/debianvm failed: Structure needs cleaning

root@vps7:/var/lib/vz/images/113#

Paul.
 
you can try "pct fsck" (see "man pct"), but note that depending on the corruption making a backup copy of the whole image before trying to repair it might be advisable.
 
Hello.

I attempted this but got back:

root@vps7:/var/lib/vz/images/113# pct fsck 113

fsck from util-linux 2.25.2

Error reading block 1478059559 (Attempt to read block from filesystem resulted in short read).

/var/lib/vz/images/113/vm-113-disk-1.raw: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.

(i.e., without -a or -p options)

command 'fsck -a -l /var/lib/vz/images/113/vm-113-disk-1.raw' failed: exit code 4

I did also attempt it with -force on the end but this also didn't work. How would you suggest proceeding.

Thanks,

Paul.
 
well, the image is corrupt, and like the error message indicates, you can try to repair/recover with
  • e2fsck -E journal_only /var/lib/vz/images/113/vm-113-disk-1.raw
and if that still hasn't helped, a regular fsck:
  • e2fsck /var/lib/vz/images/113/vm-113-disk-1.raw
for both of these commands, the image must not be mounted
 
I know this is an old thread, but i wanted to add a note to any future users who stumble upon this solution.
First, the steps by Staff user 'fabian' worked for me.

HOWEVER:
I first had to run 'tune2fs -f -E clear_mmp <image>

The error was that it couldn't access the image, and "if you're sure the image isn't in use, try running <the above command>". (Paraphrasing a bit here, you get idea). Apologies for the necro, but figured i'd pass this information along.
 

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!