sysbox
sysbox copied to clipboard
Unable to mount squashfs
I'm attempting to mount squashfs images inside a sysbox runtime'd Kubernetes pod as a dependency of our Bazel build system.
➜ sudo mount img.sqfs /mnt/img -t squashfs -o loop
mount: /mnt/img: failed to setup loop device for img.sqfs.
And going down a little deeper into losetup, I see..
➜ sudo strace losetup --find --show img.sqfs
...
openat(AT_FDCWD, "/home/admin/img.sqfs", O_RDWR|O_CLOEXEC) = 4
openat(AT_FDCWD, "/dev/loop0", O_RDWR|O_CLOEXEC) = -1 EACCES (Permission denied)
...
I'd like to understand if this is a bug, configuration issue or limitation of sysbox. Thanks!
Hi @mattlqx, it's likely a limitation of Sysbox at this time. I believe the setting up of loop devices inside the rootless Sysbox container is hitting an EPERM from the kernel (i.e., only true root can usually do that).
Unfortunately overcoming that is not simple, as it will require Sysbox to trap the container's set up of the loop device, vet it, and do it on behalf of the container. And do that without impacting performance is tricky. I think it's do-able but it's not something we have in the short/mid term plans.
BTW, thanks for giving Sysbox a shot!
Ok thanks. Please consider this a feature request.
+1