#991759 lxc fails to start a container with xfs root after host is booted

Package:
lxc
Source:
lxc
Description:
Linux Containers userspace tools
Submitter:
Markus Iehoven
Date:
2022-01-27 23:21:10 UTC
Severity:
normal
Tags:
#991759#5
Date:
2021-08-01 09:05:05 UTC
From:
To:
Debian GNU/Linux 11 (bullseye) 5.10.0-8-amd64 #1 SMP Debian 5.10.46-3

I have a lxc container with root on a LVM volume formated to XFS. The
container can not be started after host is rebooted. look like XFS
module is not loaded at this time. modprobe xfs fixes the problem. But
I thinks that it should be done automatically

~# lxc-start -n mongo -F

lxc-start: mongo: storage/storage_utils.c: mount_unknown_fs: 298
Failed to determine FSType for "/dev/fast/mongo"
lxc-start: mongo: conf.c: lxc_mount_rootfs: 1257 Failed to mount
rootfs "/dev/fast/mongo" onto "/usr/lib/x86_64-linux-gnu/lxc/rootfs"
with options "(null)"
lxc-start: mongo: conf.c: lxc_setup_rootfs_prepare_root: 3142 Failed
to setup rootfs for
lxc-start: mongo: conf.c: lxc_setup: 3278 Failed to setup rootfs
  lxc-start: mongo: start.c: do_start: 1218 Failed to setup container "mongo"
  lxc-start: mongo: sync.c: __sync_wait: 36 An error occurred in
another process (expected sequence number 5)
  lxc-start: mongo: start.c: __lxc_start: 1999 Failed to spawn container "mongo"
lxc-start: mongo: tools/lxc_start.c: main: 308 The container failed to start
lxc-start: mongo: tools/lxc_start.c: main: 313 Additional information
can be obtained by setting the --logfile and --logpriority options

it works:
~# modprobe xfs && lxc-start -n mongo

#991759#10
Date:
2022-01-27 23:17:54 UTC
From:
To:
Le dimanche 01 août 2021 à 12:05:05+0300, Markus Iehoven a écrit :

I am sorry but this is not something to be done by LXC: LXC is an end
user program that should not load any third party driver automatically.

It's the job of the system administrator to add to modules-load.d the
configuration to load such modules on their machines.

With best regards,