I had a container for running samba running with host binded mounts.
I was playing around with a new container to run a different app, and I do not know how I ended up messing the uid and gid mappings to get that other container to work. In the end, I desisted and deleted the other container.
But now, the existing container no longer works.
$ incus start samba
Error: Failed to run: /usr/libexec/incus/incusd forkstart samba /var/lib/incus/containers /run/incus/samba/lxc.conf: exit status 1
Try incus info --show-log samba
for more info
operez@preservation:~$ incus info --show-log samba
Name: samba
Description:
Status: STOPPED
Type: container
Architecture: x86_64
Created: 2024/07/08 00:30 EDT
Last Used: 2025/07/04 19:03 EDT
Log:
lxc samba 20250704230339.744 ERROR conf - …/src/lxc/conf.c:lxc_map_ids:3708 - newuidmap failed to write mapping “newuidmap: write to uid_map failed: Invalid argument”: newuidmap 107000 0 1000000 1000 1000 1000 1 1001 1001001 999998999 0 100000 1000 1001 101001 164535
lxc samba 20250704230339.745 ERROR start - …/src/lxc/start.c:lxc_spawn:1788 - Failed to set up id mapping.
lxc samba 20250704230339.746 ERROR lxccontainer - …/src/lxc/lxccontainer.c:wait_on_daemonized_start:878 - Received container state “ABORTING” instead of “RUNNING”
lxc samba 20250704230339.755 ERROR start - …/src/lxc/start.c:__lxc_start:2107 - Failed to spawn container “samba”
lxc samba 20250704230339.755 WARN start - …/src/lxc/start.c:lxc_abort:1036 - No such process - Failed to send SIGKILL via pidfd 17 for process 107000
lxc 20250704230339.105 ERROR af_unix - …/src/lxc/af_unix.c:lxc_abstract_unix_recv_fds_iov:218 - Connection reset by peer - Failed to receive response
lxc 20250704230339.105 ERROR commands - …/src/lxc/commands.c:lxc_cmd_rsp_recv_fds:128 - Failed to receive file descriptors for command “get_init_pid”
$ cat /etc/subuid
root:1000:1
user1:100000:65536
root:1000000:1000000000
user2:165536:65536
root:100000:165536
$ cat /etc/subgid
root:1000:1
user1:100000:65536
root:1000000:1000000000
user2:165536:65536
root:100000:165536
I do not know where the values 1001001 and 999998999 are coming from…
What can I do to fix it?
I am considering migrating to incus storage volumes, as I do not need to access the mounts in the host. Is that a good alternative to id mapping? Or should I just take the time to understand, learn, and properly configure them?