In trying to create a container, I encounter a problem I never had. There seems to be a problem with the right on the disk deployed after downloading an image. The problem does not occur if I copy an existing container.
Thanks for your read and help.
Problem:
root@nyx:/mnt/ssd/containers# lxc launch images:debian/buster toto
Creating toto
Starting toto
Error: Failed preparing container for start: Failed to change ownership of: /var/snap/lxd/common/lxd/storage-pools/local/containers/toto/rootfs/usr/share/i18n/charmaps/NF_Z_62-010_1973.gz
Try `lxc info --show-log local:toto` for more info
root@nyx:/mnt/ssd/containers# ls -lah | grep -E "toto|gw"
d--x------ 1 1000000 root 78 oct. 1 16:13 gw
d--x------ 1 root root 78 févr. 8 14:36 toto
pulsar@nyx:~$ lxc launch images:debian/buster toto
Creating toto
Starting toto
Error: Failed preparing container for start: Failed to change ownership of: /var/snap/lxd/common/lxd/storage-pools/local/containers/toto/rootfs/usr/share/i18n/charmaps/NF_Z_62-010_1973.gz
pulsar@nyx:~$ sudo ls -lah /mnt/ssd/containers | grep -E "toto|gw"
d--x------ 1 1000000 root 78 oct. 1 16:13 gw
d--x------ 1 root root 78 févr. 8 14:46 toto
Host informations:
root@nyx:/mnt/ssd/containers# cat /etc/debian_version
10.8
root@nyx:/mnt/ssd/containers# snap list lxd
Name Version Rev Tracking Publisher Notes
lxd 4.10 19168 latest/stable canonical✓ -
For information, snapd does not see version 4.11 at the moment.
Okay, I know there are some weird issues with 5.10 around things like readlink and path resolution which this particular function (shiftowner) is using quite extensively…
pulsar@nyx:~$ lxc launch images:debian/buster toto
Creating toto
Starting toto
Error: Failed preparing container for start: Failed to change ownership of: /var/snap/lxd/common/lxd/storage-pools/local/containers/toto/rootfs/usr/share/i18n/charmaps/NF_Z_62-010_1973.gz
Try `lxc info --show-log local:toto` for more info
pulsar@nyx:~$ sudo ls -lah /mnt/ssd/containers | grep -E "toto|gw"
d--x------ 1 1000000 root 78 oct. 1 16:13 gw
d--x------ 1 root root 78 févr. 8 16:06 toto
pulsar@nyx:~$ uname -a
Linux nyx 5.9.14-rockchip64 #20.11.4 SMP PREEMPT Tue Dec 15 08:52:20 CET 2020 aarch64 GNU/Linux
pulsar@nyx:~$ df -h /mnt/ssd
Sys. de fichiers Taille Utilisé Dispo Uti% Monté sur
/dev/sda 112G 27G 85G 25% /mnt/ssd
pulsar@nyx:~$ lxc storage show local | head -n7
config:
size: 15GB
source: /mnt/ssd
volatile.initial_source: /mnt/ssd
description: ""
name: local
driver: btrfs
pulsar@nyx:~$ lxc storage info local | head -n 6
info:
description: ""
driver: btrfs
name: local
space used: 28.70GB
total space: 120.03GB
I just found the solution. In the default profile, I declare that rootfs is 1GB. This has never been a problem so far, but changing to 8GB (2GB is not enough) that works fine.
I think this is a regression. What do you think about it?
Before:
pulsar@nyx:~$ lxc profile show default | head -n17
config:
[...]
root:
path: /
pool: local
size: 1GB
type: disk
[...]
After:
pulsar@nyx:~$ lxc profile show default | head -n17
config:
[...]
root:
path: /
pool: local
size: 8GB
type: disk
[...]
Result:
pulsar@nyx:~$ lxc info toto
[...]
Disk usage:
root: 16.38kB
[...]
Okay, I see, thank you.
I plan to move to Ceph in a few weeks by adding two odroid c4 to my rock64. I think that will solve part of the problem. Hopefully Gigabit won’t kill performance too much.