Problem LXC Doesn't work

Drthrax74

Well-Known Member
Apr 22, 2019
37
6
48
35
Hello,

I need help for start my LXC .

less /mnt/pve/NAS/lxc_100.log


lxc-start 100 20210902223311.586 INFO confile - confile.c:set_config_idmaps:1985 - Read uid map: type u nsid 0 hostid 100000 range 65536
lxc-start 100 20210902223311.586 INFO confile - confile.c:set_config_idmaps:1985 - Read uid map: type g nsid 0 hostid 100000 range 65536
lxc-start 100 20210902223311.586 INFO lxccontainer - lxccontainer.c:do_lxcapi_start:979 - Set process title to [lxc monitor] /var/lib/lxc 100
lxc-start 100 20210902223311.587 INFO lsm - lsm/lsm.c:lsm_init:40 - Initialized LSM security driver AppArmor
lxc-start 100 20210902223311.587 INFO conf - conf.c:run_script_argv:331 - Executing script "/usr/share/lxc/hooks/lxc-pve-prestart-hook" for container "100", config section "lxc"
lxc-start 100 20210902223311.587 DEBUG lxccontainer - lxccontainer.c:wait_on_daemonized_start:840 - First child 23399 exited
lxc-start 100 20210902223356.937 DEBUG conf - conf.c:run_buffer:303 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook 100 lxc pre-start produced output: mount: /var/lib/lxc/.pve-staged-mounts/rootfs: can't read superblock on /dev/loop0.

lxc-start 100 20210902223356.958 DEBUG conf - conf.c:run_buffer:303 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook 100 lxc pre-start produced output: command 'mount /dev/loop0 /var/lib/lxc/.pve-staged-mounts/rootfs' failed: exit code 32


lxc-start 100 20210902223356.968 ERROR conf - conf.c:run_buffer:314 - Script exited with status 255
lxc-start 100 20210902223356.968 ERROR start - start.c:lxc_init:798 - Failed to run lxc.hook.pre-start for container "100"
lxc-start 100 20210902223356.968 ERROR start - start.c:__lxc_start:1945 - Failed to initialize container "100"

lxc-start 100 20210902223356.968 INFO conf - conf.c:run_script_argv:331 - Executing script "/usr/share/lxcfs/lxc.reboot.hook" for container "100", config section "lxc"
lxc-start 100 20210902223357.470 INFO conf - conf.c:run_script_argv:331 - Executing script "/usr/share/lxc/hooks/lxc-pve-poststop-hook" for container "100", config section "lxc"
lxc-start 100 20210902223357.908 DEBUG conf - conf.c:run_buffer:303 - Script exec /usr/share/lxc/hooks/lxc-pve-poststop-hook 100 lxc post-stop produced output: umount: /var/lib/lxc/100/rootfs: not mounted

lxc-start 100 20210902223357.909 DEBUG conf - conf.c:run_buffer:303 - Script exec /usr/share/lxc/hooks/lxc-pve-poststop-hook 100 lxc post-stop produced output: command 'umount --recursive -- /var/lib/lxc/100/rootfs' failed: exit code 1


lxc-start 100 20210902223357.917 ERROR conf - conf.c:run_buffer:314 - Script exited with status 1
lxc-start 100 20210902223357.918 ERROR start - start.c:lxc_end:958 - Failed to run lxc.hook.post-stop for container "100"
lxc-start 100 20210902223357.918 ERROR lxccontainer - lxccontainer.c:wait_on_daemonized_start:851 - No such file or directory - Failed to receive the container state
lxc-start 100 20210902223357.918 ERROR lxc_start - tools/lxc_start.c:main:308 - The container failed to start
lxc-start 100 20210902223357.919 ERROR lxc_start - tools/lxc_start.c:main:311 - To get more details, run the container in foreground mode
lxc-start 100 20210902223357.919 ERROR lxc_start - tools/lxc_start.c:main:314 - Additional information can be obtained by setting the --logfile and --logpriority options


root@proxmox:~# lsblk -f
NAME FSTYPE LABEL UUID FSAVAIL FSUSE% MOUNTPOINT
sda zfs_member rpool 7755189411467818758
├─sda1 zfs_member rpool 7755189411467818758
├─sda2 zfs_member rpool 7755189411467818758
└─sda3 zfs_member rpool 7755189411467818758
sdb LVM2_member 3IupBC-KG8x-EiQn-cfSH-gSM7-7cUW-qDjG0H
├─Proxmox-vm--303--disk--0
├─Proxmox-vm--303--disk--1
├─Proxmox-vm--300--disk--0
├─Proxmox-vm--303--disk--2
├─Proxmox-vm--303--disk--3
├─Proxmox-vm--310--disk--0
├─Proxmox-vm--310--disk--1
├─Proxmox-vm--203--disk--0
├─Proxmox-vm--201--disk--0
└─Proxmox-vm--200--disk--0
root@proxmox:~# lvs -a
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
vm-200-disk-0 Proxmox -wi-ao---- 5.00g
vm-201-disk-0 Proxmox -wi-ao---- 32.00g
vm-203-disk-0 Proxmox -wi-ao---- 32.00g
vm-300-disk-0 Proxmox -wi-ao---- 50.00g
vm-303-disk-0 Proxmox -wi-a----- 4.00m
vm-303-disk-1 Proxmox -wi-a----- 32.00g
vm-303-disk-2 Proxmox -wi-a----- 4.00m
vm-303-disk-3 Proxmox -wi-a----- 32.00g
vm-310-disk-0 Proxmox -wi-ao---- 4.00m
vm-310-disk-1 Proxmox -wi-ao---- 40.00g
root@proxmox:~# vgs -a
VG #PV #LV #SN Attr VSize VFree
Proxmox 1 10 0 wz--n- <500.00g 276.98g
root@proxmox:~# lsblk -f
NAME FSTYPE LABEL UUID FSAVAIL FSUSE% MOUNTPOINT
sda zfs_member rpool 7755189411467818758
├─sda1 zfs_member rpool 7755189411467818758
├─sda2 zfs_member rpool 7755189411467818758
└─sda3 zfs_member rpool 7755189411467818758
sdb LVM2_member 3IupBC-KG8x-EiQn-cfSH-gSM7-7cUW-qDjG0H
├─Proxmox-vm--303--disk--0
├─Proxmox-vm--303--disk--1
├─Proxmox-vm--300--disk--0
├─Proxmox-vm--303--disk--2
├─Proxmox-vm--303--disk--3
├─Proxmox-vm--310--disk--0
├─Proxmox-vm--310--disk--1
├─Proxmox-vm--203--disk--0
├─Proxmox-vm--201--disk--0
└─Proxmox-vm--200--disk--0
root@proxmox:~# pct mount 100
mount: /var/lib/lxc/100/rootfs: can't read superblock on /dev/loop0.
mounting container failed
command 'mount /dev/loop0 /var/lib/lxc/100/rootfs//' failed: exit code 32

Info:
proxmox-ve: 6.4-1 (running kernel: 5.4.128-1-pve)
pve-manager: 6.4-13 (running version: 6.4-13/9f411e79)
pve-kernel-5.4: 6.4-5
pve-kernel-helper: 6.4-5
pve-kernel-5.4.128-1-pve: 5.4.128-2
pve-kernel-5.4.124-1-pve: 5.4.124-2
pve-kernel-4.15: 5.4-19
pve-kernel-4.15.18-30-pve: 4.15.18-58
pve-kernel-4.15.18-12-pve: 4.15.18-36
ceph-fuse: 12.2.11+dfsg1-2.1+b1
corosync: 3.1.2-pve1
criu: 3.11-3
glusterfs-client: 5.5-3
ifupdown: 0.8.35+pve1
ksm-control-daemon: 1.3-1
libjs-extjs: 6.0.1-10
libknet1: 1.20-pve1
libproxmox-acme-perl: 1.1.0
libproxmox-backup-qemu0: 1.1.0-1
libpve-access-control: 6.4-3
libpve-apiclient-perl: 3.1-3
libpve-common-perl: 6.4-3
libpve-guest-common-perl: 3.1-5
libpve-http-server-perl: 3.2-3
libpve-storage-perl: 6.4-1
libqb0: 1.0.5-1
libspice-server1: 0.14.2-4~pve6+1
lvm2: 2.03.02-pve4
lxc-pve: 4.0.6-2
lxcfs: 4.0.6-pve1
novnc-pve: 1.1.0-1
proxmox-backup-client: 1.1.13-2
proxmox-mini-journalreader: 1.1-1
proxmox-widget-toolkit: 2.6-1
pve-cluster: 6.4-1
pve-container: 3.3-6
pve-docs: 6.4-2
pve-edk2-firmware: 2.20200531-1
pve-firewall: 4.1-4
pve-firmware: 3.2-4
pve-ha-manager: 3.1-1
pve-i18n: 2.3-1
pve-qemu-kvm: 5.2.0-6
pve-xtermjs: 4.7.0-3
qemu-server: 6.4-2
smartmontools: 7.2-pve2
spiceterm: 3.1-1
vncterm: 1.6-2
zfsutils-linux: 2.0.5-pve1~bpo10+1
 
Last edited:
lxc pre-start produced output: mount: /var/lib/lxc/.pve-staged-mounts/rootfs: can't read superblock on /dev/loop0.

* seems there is a problem with the containers rootfs
* since it does not show up in the `lvs output` - where is the container's rootfs ?
* please post the container config `pct config 100`
* you can also try to `fsck` the container's root fs `pct fsck 100`

I hope this helps!
 
  • Like
Reactions: Zaman and Hyacin
pct config 100
arch: amd64
cores: 1
features: nesting=1
hostname: Docker
memory: 512
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=DA:DD:08:BA:60:80,type=veth
ostype: debian
rootfs: NAS:100/vm-100-disk-0.raw,size=30G
swap: 512
unprivileged: 1

pct fsck 100
MMP interval is 10 seconds and total wait time is 42 seconds. Please wait...
/mnt/pve/NAS/images/100/vm-100-disk-0.raw: recovering journal
/mnt/pve/NAS/images/100/vm-100-disk-0.raw: clean, 24299/1966080 files, 340617/7864320 blocks

df -h
Filesystem Size Used Avail Use% Mounted on
udev 7.8G 0 7.8G 0% /dev
tmpfs 1.6G 2.7M 1.6G 1% /run
rpool/ROOT/pve-1 144G 3.7G 140G 3% /
tmpfs 7.8G 43M 7.8G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
rpool 140G 128K 140G 1% /rpool
rpool/ROOT 140G 128K 140G 1% /rpool/ROOT
rpool/data 140G 128K 140G 1% /rpool/data
/dev/fuse 128M 32K 128M 1% /etc/pve
tmpfs 1.6G 0 1.6G 0% /run/user/0
//192.168.1.2/Proxmox 17T 6.5T 9.9T 40% /mnt/pve/NAS

lxc-start 100
 
Last edited:
MMP interval is 10 seconds and total wait time is 42 seconds. Please wait...
/mnt/pve/NAS/images/100/vm-100-disk-0.raw: recovering journal
/mnt/pve/NAS/images/100/vm-100-disk-0.raw: clean, 24299/1966080 files, 340617/7864320 blocks

the MMP warning is a bit odd - is this storage used on another cluster/proxmox node?

else - can you start the container after the fsck? (it repaired the filesystem after all :)
 
Hello,

The LXC was start but i think i have error on my storage.

I stopped the Virtual Machines then I checked the Raid in ASUSTOR to fix the problems.

PS: I already have a backup.
 
Last edited: