Bitbake fails with could not allocate block in ext2 filesystem on ZFS. How to work around this issue?
Symptom⌗
Bitbake build fails in a LXC container located on ZFS storage (Proxmox PVE) with a error message
“__populate_fs: Could not allocate block in ext2 filesystem while writing file…”
Workaround⌗
Make a ZFS subvolume with a ext4 filesystem and then mount it into the unprivileged container. The container user has UID 1000
which is mappend to 101000
on the host.
zfs create -s -V 80G rpool/tmp-build
mkfs.ext4 /dev/zvol/rpool/tmp-build
mkdir /tmp-build
mount /dev/zvol/rpool/tmp-build /tmp-build
# add LXC user's uid to 100000
chown -R 101000:101000 /tmp-build/
# bind mount to LXC container using Proxmox tool
pct set 104 -mp0 mp=/tmp-build,/tmp-build
Change your config to use the new tmpdir in local.conf or kas’s local_conf_header
.
TMPDIR = "/tmp-build/dunfell"
Read other posts