Re: VirtIo errors inside VM with UFS-in-zvol
On 26/08/2014 09:28, Allan Jude wrote: Thanks Peter, That would be volmode=dev, correct? You want: vfs.zfs.vol.mode=2 in /boot/loader.conf It is my understanding that the sysctl must be set BEFORE the pool is imported to work correctly. What is the difference between property 'volmode=dev', and the sysctl? When do I need to use the sysctl, and when do one needs to use the volmode=dev? Either of them must be set in the host system, of course? ___ freebsd-virtualization@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to freebsd-virtualization-unsubscr...@freebsd.org
Re: VirtIo errors inside VM with UFS-in-zvol
On Tue, Aug 26, 2014 at 3:38 PM, Marat Bakeev haw...@hawara.com wrote: On 26/08/2014 09:28, Allan Jude wrote: Thanks Peter, That would be volmode=dev, correct? You want: vfs.zfs.vol.mode=2 in /boot/loader.conf It is my understanding that the sysctl must be set BEFORE the pool is imported to work correctly. What is the difference between property 'volmode=dev', and the sysctl? When do I need to use the sysctl, and when do one needs to use the volmode=dev? Either of them must be set in the host system, of course? ___ freebsd-virtualization@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to freebsd-virtualization-unsubscr...@freebsd.org To me it looks like you should not use the sysctl if you are using the zvols on the host systems for anything that expects them to be GEOM providers, e.g. mounting as UFS volumes, etc. as this will hide them from GEOM. For now I've set it to dev via the zfs property only for the zvols that I either export as iscsi or use for bhyve virts. Flipping the property has the effect of gpt partitions of the zvol disappearing and appearing again in /dev/zvol/..., while the system is running, while as Allan mentioned, setting the sysctl does not seem to affect zvols that are on already imported pool. --Nikolay ___ freebsd-virtualization@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to freebsd-virtualization-unsubscr...@freebsd.org
Re: VirtIo errors inside VM with UFS-in-zvol
I would like to confirm this issue On 25/08/2014 01:05, Nikolay Denev wrote: On Wed, Feb 19, 2014 at 6:38 PM, Stephen Stuart stephen.stu...@gmail.com wrote: I have VMs running on FreeBSD 10.0, for which I made zvols to provide the block IO device for bhyve. When I boot from the installation ISO, gpart works inside the VM, but newfs does not, reporting vtbd0 errors. Trying to mount the partiton from the shell produces the same error, and in dmesg I see this: vtbd0: hard error cmd=write 290-305 I would like to report the same problem. I'm using 10.0-RELEASE-p7 as a host, and 9.3-RELEASE as a guest. VM is created using vmrc script, it installed fine. But on attempt to create additional fs inside the vm, newfs just silently fails without writing anything to disk. file -s on a filesystem reports just 'data', instead of the usual Unix Fast File system for example, quotacheck also fails from inside the vm - quotacheck: Cannot find file system superblock: No error: 0. I'm getting this error message for a working filesystem, a filesystem created outside the vm and mounted inside it. bhyve uses zvol for a block device, mounted using ahci-hd. Commands used to start the vm are these: /usr/sbin/bhyveload -m 4096 -d /dev/zvol/data/vm/bsd-ix0 bsd-ix0 /usr/sbin/bhyve -c 4 -m 4096 -A -H -s 0,hostbridge -s 2,ahci-hd,/dev/zvol/data/vm/bsd-ix0 -s 3:0,virtio-net,tap8000 -s 5,lpc -l com1,/dev/nmdm0A bsd-ix0 ___ freebsd-virtualization@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to freebsd-virtualization-unsubscr...@freebsd.org
Re: VirtIo errors inside VM with UFS-in-zvol
Hi Marat, vtbd0: hard error cmd=write 290-305 I would like to report the same problem. I'm using 10.0-RELEASE-p7 as a host, and 9.3-RELEASE as a guest. VM is created using vmrc script, it installed fine. But on attempt to create additional fs inside the vm, newfs just silently fails without writing anything to disk. file -s on a filesystem reports just 'data', instead of the usual Unix Fast File system This issue is caused by the FreeBSD GEOM code tasting the zvol, parsing partition/slice tables, and marking sections read-only. There is a fix for this by mav@ in r264145 in CURRENT, and MFC'd to 10-STABLE in r265678 (May 8). The fix will be in 10.1. The zfs man page lists the new zvol property and sysctls that can be used to prevent GEOM testing. later, Peter. ___ freebsd-virtualization@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to freebsd-virtualization-unsubscr...@freebsd.org
Re: VirtIo errors inside VM with UFS-in-zvol
On Mon, Aug 25, 2014 at 8:50 PM, Peter Grehan gre...@freebsd.org wrote: Hi Marat, vtbd0: hard error cmd=write 290-305 I would like to report the same problem. I'm using 10.0-RELEASE-p7 as a host, and 9.3-RELEASE as a guest. VM is created using vmrc script, it installed fine. But on attempt to create additional fs inside the vm, newfs just silently fails without writing anything to disk. file -s on a filesystem reports just 'data', instead of the usual Unix Fast File system This issue is caused by the FreeBSD GEOM code tasting the zvol, parsing partition/slice tables, and marking sections read-only. There is a fix for this by mav@ in r264145 in CURRENT, and MFC'd to 10-STABLE in r265678 (May 8). The fix will be in 10.1. The zfs man page lists the new zvol property and sysctls that can be used to prevent GEOM testing. later, Peter. ___ freebsd-virtualization@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to freebsd-virtualization-unsubscr...@freebsd.org Thanks Peter, That would be volmode=dev, correct? Does it make sense for either the scripts (runvm.sh, vmrc, etc) or bhyve itself print a warning in such case? --Nikolay ___ freebsd-virtualization@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to freebsd-virtualization-unsubscr...@freebsd.org
Re: VirtIo errors inside VM with UFS-in-zvol
On 2014-08-25 16:27, Nikolay Denev wrote: On Mon, Aug 25, 2014 at 8:50 PM, Peter Grehan gre...@freebsd.org wrote: Hi Marat, vtbd0: hard error cmd=write 290-305 I would like to report the same problem. I'm using 10.0-RELEASE-p7 as a host, and 9.3-RELEASE as a guest. VM is created using vmrc script, it installed fine. But on attempt to create additional fs inside the vm, newfs just silently fails without writing anything to disk. file -s on a filesystem reports just 'data', instead of the usual Unix Fast File system This issue is caused by the FreeBSD GEOM code tasting the zvol, parsing partition/slice tables, and marking sections read-only. There is a fix for this by mav@ in r264145 in CURRENT, and MFC'd to 10-STABLE in r265678 (May 8). The fix will be in 10.1. The zfs man page lists the new zvol property and sysctls that can be used to prevent GEOM testing. later, Peter. ___ freebsd-virtualization@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to freebsd-virtualization-unsubscr...@freebsd.org Thanks Peter, That would be volmode=dev, correct? Does it make sense for either the scripts (runvm.sh, vmrc, etc) or bhyve itself print a warning in such case? --Nikolay ___ freebsd-virtualization@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to freebsd-virtualization-unsubscr...@freebsd.org You want: vfs.zfs.vol.mode=2 in /boot/loader.conf It is my understanding that the sysctl must be set BEFORE the pool is imported to work correctly. -- Allan Jude signature.asc Description: OpenPGP digital signature
Re: VirtIo errors inside VM with UFS-in-zvol
On Wed, Feb 19, 2014 at 6:38 PM, Stephen Stuart stephen.stu...@gmail.com wrote: I have VMs running on FreeBSD 10.0, for which I made zvols to provide the block IO device for bhyve. When I boot from the installation ISO, gpart works inside the VM, but newfs does not, reporting vtbd0 errors. Likewise, dump does not work inside the VM (failing with too many vtbd0 hard errors), but if I shut down the VM and dump the filesystem by specifying the partition name in the host machine's ZFS space (/dev/zvol/zroot/VOLNAMEp2), dump works just fine. With a different VM, where I got smart and did all the gpart and newfs work outside the VM: zfs create -V 10g zroot/WORKING gpart create -s GPT /dev/zvol/zroot/WORKING gpart add -t freebsd-boot -s 64k /dev/zvol/zroot/WORKING gpart add -t freebsd-ufs -s 7525m /dev/zvol/zroot/WORKING gpart add -t freebsd-swap /dev/zvol/zroot/WORKING newfs /dev/zvol/zroot/WORKINGp2 then install works fine inside the VM when I mount the filesystem and create fstab by hand, and dump inside the VM works fine. There's a somewhat related post here: https://groups.google.com/forum/#!msg/mailing.freebsd.fs/Iw7aONDm-3Y/gecBCQls8oYJ but I don't see anything specific to this issue. I'd like dump from inside the VM to work, the fact that it doesn't makes me concerned that there are issues lurking that might lead to data loss. Where do I go from here? Thanks, Stephen ___ freebsd-virtualization@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to freebsd-virtualization-unsubscr...@freebsd.org Just to say I'm seeing the same issue. I want to create i386 virt on an amd64 host, and downloaded FreeBSD-10.0-RELEASE-i386-disc1.iso I've created a zvol: zfs create -V20G zfs/freebsd-i386 Then starting bhyve: sh /usr/share/examples/bhyve/vmrun.sh -m2048m -d /dev/zvol/zfs/freebsd-i386 -I FreeBSD-10.0-RELEASE-i386-disc1.iso -i freebsd-i386 Installer starts, I'm going with the default of GPT partition using the whole disk, but then I get this error: Error mounting partition /mnt: mount: /dev/vtbd0p2: Invalid argument Trying to mount the partiton from the shell produces the same error, and in dmesg I see this: vtbd0: hard error cmd=write 290-305 Running newfs outside of the virt works, and then I can mount inside the virt and installer continues. I'm running: FreeBSD nas.home.lan 10.0-STABLE FreeBSD 10.0-STABLE #13 r270295M: Thu Aug 21 22:05:37 UTC 2014 r...@nas.home.lan:/usr/obj/usr/src/sys/NAS amd64 --Nikolay ___ freebsd-virtualization@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to freebsd-virtualization-unsubscr...@freebsd.org