Created attachment 5132 [details] patch proposal Buildiing in LXC container on ZFS dataset with compression enabled: ERROR: core-image-minimal-1.0-r0 do_image_wic: ExecutionError('build/tmp/work/.../core-image-minimal/1.0/temp/run.do_image_wic.1471812', 1, None, None) ... | Writing inode tables: done | Creating journal (4096 blocks): done | Copying files into the device: __populate_fs: Could not allocate block in ext2 filesystem while writing file "cc1" | mkfs.ext4: Could not allocate block in ext2 filesystem while populating file system | 512 | | WARNING: exit code 1 from a shell command. Similar problem (https://lists.yoctoproject.org/g/poky/topic/image_bbclass/81548542) in image.bblcass was solved with commits: https://git.yoctoproject.org/poky/commit/?h=master-next&id=3743234dab23e4068e1d1fde9e1fa0bc09fdb182 https://git.yoctoproject.org/poky/commit/?h=master-next&id=f7ed81182c7797fd6b0069fa5c90535b13848657 Now function prepare_root_fs_ext() in file poky/scripts/lib/wic/partition.py needs similar fix.
Ross will want to look at this when he's back. The code involved may need a re-write.
(In reply to Randy MacLeod from comment #1) > Ross will want to look at this when he's back. > The code involved may need a re-write. This patch also resolves spurious 'ERROR: Actual rootfs size (y kB) is larger than allowed size x kB' failures when building wic images on ZFS hosts. The root cause: du -ks reports disk usage based on allocated blocks, which on ZFS varies depending on pool fragmentation and fill level. This means identical builds can report different sizes across builders: builder 1 - du -ks: 281870 kB builder 2 - du -ks: 281534 kB The ERROR becomes more prevalent when your target rootfs reaches capacity, i.e. less "wiggle room". Would it be possible to backport this fix to scarthgap?
As this is a wic issue I'm going to throw it to Trevor :)
Trevor, Does this patch work for you ?