Mount point of LXC lost after power failure

sprickw

Member
Nov 1, 2020
23
1
8
Waldems, Germany
www.datagon.de
After power failure restarting the Proxmox server is fine, but a single LXC doesn't start.

Trying to start LXC from the servers command line

root@ems:~# pct start 106
storage 'sdb' does not exist
root@ems:~#

fdisk -l

Disk /dev/sdb: 3.64 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: WDC WD40EZRZ-00G
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 6CD57AAE-2A19-474F-9EDB-27921BE3513D

Device Start End Sectors Size Type
/dev/sdb1 2048 7814037134 7814035087 3.6T Linux filesystem

Looks good.

root@ems:~# ls -l /mnt/pve/sdb/images/
total 4
drwxr----- 2 root root 4096 Oct 3 23:37 106
root@ems:~#

root@ems:~# ls -l /mnt/pve/sdb/images/106
total 578312436
-rw-r----- 1 root root 2199023255552 Nov 2 09:49 vm-106-disk-0.raw
root@ems:~#

Looks good to me.

After pct rescan config file of LXC looks like this

root@ems:/etc/pve/lxc# cat /etc/pve/lxc/106.conf
#Nextcloud-Server
arch: amd64
cores: 4
features: nesting=1
hostname: mekong
memory: 2048
mp0: sdb:106/vm-106-disk-0.raw,mp=/nextcloud_data,backup=1,size=0T
net0: name=eth0,bridge=vmbr0,firewall=1,gw=192.168.178.1,hwaddr=9E:CA:8C:85:26:33,ip=192.168.178.70/24,type=veth
onboot: 1
ostype: ubuntu
rootfs: local-lvm:vm-106-disk-0,size=20G
swap: 2048
unprivileged: 1
root@ems:/etc/pve/lxc#

What irritates me is that size switched from 2t to 0T.

root@ems:/etc/pve/lxc# df -h
Filesystem Size Used Avail Use% Mounted on
...
/dev/sdb1 3.6T 552G 2.9T 16% /mnt/pve/sdb
...
root@ems:/etc/pve/lxc#

What should be the next steps to fix the problem?

King regards Wolfgang
 
Hello,

in your file : /etc/pve/lxc/106.conf
the line :
mp0: sdb:106/vm-106-disk-0.raw,mp=/nextcloud_data,backup=1,size=0T
is not understood by your hypervisor.
Try naming the volume name as defined by PVE instead of the device name, ie.
replace 'sdb' by 'local-lvm' in that line, then try to boot your container again.

Best regards,

--
G. Delanoy
 
Hi,

I did solve the problem in the meantime.

But regarding your hints: This is a mount point with existing data, so I had to tell that LXC to accept it again.

>> Try naming the volume name as defined by PVE instead of the device name ...

How do I find out what the names are that are defined by PVE?

Wolfgang
 
> How do I find out what the names are that are defined by PVE?

In the GUI of your Datacenter, look under 'Storage'.

Best regards,


--
G. Delanoy
 

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!