Hi All,
I got an error (failed to pin rootfs) with the command lxc-start (lxc 4.0.9) using the squashfs file.
I’d like to migrate my configuration from LXC 2.X to LXC 4.0.
Has anyone ever had this error ?
Please, someone could help me.
Many thanks.
Kim
Extract of log file
lxc-start JIZOM_DB.CT 20210604093439.301 INFO lsm - lsm/lsm.c:lsm_init_static:40 - Initialized LSM s
ecurity driver nop
lxc-start JIZOM_DB.CT 20210604093439.301 INFO conf - conf.c:run_script_argv:333 - Executing script "
/sbin/pre-start.sh" for container “JIZOM_DB.CT”, config section “lxc”
lxc-start JIZOM_DB.CT 20210604093439.406 DEBUG terminal - terminal.c:lxc_terminal_peer_default:672 - Using terminal “/dev/tty” as proxy
lxc-start JIZOM_DB.CT 20210604093439.406 DEBUG terminal - terminal.c:lxc_terminal_winsz:61 - Set window size to 104 columns and 54 rows
lxc-start JIZOM_DB.CT 20210604093439.407 INFO start - start.c:lxc_init:855 - Container “JIZOM_DB.CT” is initialized
lxc-start JIZOM_DB.CT 20210604093439.407 INFO cgfsng - cgroups/cgfsng.c:cgfsng_monitor_create:1070 -
The monitor process uses “lxc.monitor.JIZOM_DB.CT” as cgroup
lxc-start JIZOM_DB.CT 20210604093439.408 DEBUG storage - storage/storage.c:storage_query:233 - Detected rootfs type “dir”
lxc-start JIZOM_DB.CT 20210604093439.408 ERROR conf - conf.c:lxc_rootfs_init:581 - Read-only file system - Failed to pin rootfs
lxc-start JIZOM_DB.CT 20210604093439.408 ERROR start - start.c:__lxc_start:2045 - Failed to handle rootfs pinning for container “JIZOM_DB.CT”
My config file
lxc.net.0.type = veth
lxc.net.0.link = brBDD
lxc.net.0.veth.pair = vJIZOM_DB
lxc.net.0.hwaddr = 00:FF:AA:BB:03:06
lxc.net.0.ipv4.address = 10.0.3.6/24
lxc.net.0.ipv4.gateway = 10.0.3.254
lxc.net.0.flags = up
lxc.net.0.name = eth0
mount points
lxc.rootfs.path = /mnt/ct_mount
lxc.hook.pre-start = /sbin/pre-start.sh
lxc.mount.fstab = /opt/CTs/JIZOM_DB.CT/fstab
Common configuration
lxc.include = /usr/share/lxc/config/sesame.common.conf
Container specific configuration
lxc.uts.name = JIZOM_DB.CT
lxc.arch = amd64
drop capabilities
lxc.cap.drop =
lxc.cap.keep = setgid setuid dac_override sys_admin
cat /sbin/pre-start.sh
#!/bin/bash
echo “arguments: $*” > /tmp/pre-start.txt
echo "environment: " >> /tmp/pre-start.txt
env | grep LXC >> /tmp/pre-start.txt
mount -o loop,ro -t squashfs /opt/BASES/JIZOM_DB.sqsh ${LXC_ROOTFS_PATH}
ls /mnt/ct_mount
bin debootstrap etc lib lib64 mnt root sbin tmp var
boot dev home lib32 libx32 proc run sys usr