Scenario: - disk903: ZFS volume containing an amd64 FreeBSD head installation - disk925: ZFS volume containing an armv6 FreeBSD head installation, exported via iSCSI - bhyve server running FreeBSD 12.2 (releng/12.2) - bhyve client running from disk903 -> results in running VM "v903" - in v903, the disk925 armv6 installation is imported using iSCSI and mounted on /d/925s2a - in v903, qemu-user-static is installed - in v903, a chroot to /d/925s2a is done using chroot /d/925s2a/ zsh -l - This results in a shell (zsh) running emulated armv6 binaries. - (This setup is used to update armv6 ports using portmaster.) - In this chroot, issue "mount -p /" and "df /". Result: [0]# mount -p / mount: /: unknown special file or file system [1]# df / Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/diskid/DISK-HAL_V0925s2a 20289716 3970484 14696056 21% /d/925s2a [0]# Expected result: [0]# mount -p / /dev/diskid/DISK-HAL_V0925s2a /d/925s2a ufs rw 0 0 [0]# df / Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/diskid/DISK-HAL_V0925s2a 20289716 3970484 14696056 21% /d/925s2a [0]# -- Martin
I get this error when the path is not in /etc/fstab, so I don't think this is related to qemu or bhyve as such. It should show correctly if you just run "mount -p".
This line is in /etc/fstab on v903: /dev/diskid/DISK-HAL_V0925s2a /d/925s2a ufs rw,noauto 0 0 -- Martin
OK, but that will not help. Firstly, when you run mount inside the chroot, it will end up looking in /d/925s2a/etc/fstab on v903. Secondly, the fstab line you gave mounts on /d/925s2a (because it is used on v903), not on /, so it won't match your mount command.
The issue is that "df" is able to deduce the mount point whereas "mount" itself is not. This seems like a deficiency to me. The discussion about the entry being available or not in /etc/fstab is certainly interesting but seems to be somewhat beside the point. -- Martin
Thanks to your comments I now understand that mount(8) really needs that entry in /etc/fstab. So this has nothing to do with qemu. I'm closing this PR. -- Martin