Mark Martinec
2014-Jan-06 01:27 UTC
Installer fails with "out of swap space" when installing ZFS-on-root with less then 4 GB mem (10.0-RC4)
I was playing with bhyve on 10.0-RC4, trying to install another 10.0-RC4 into a 16 GB ZFS volume using the network installation DVD. Mostly kept defaults, except that I chose a ZFS-on-root installation. The amd64 host was given 1 GB of RAM on the first attempt, but failed. It fails on 2 GB RAM too, but succeeds when given 4 GB of RAM. It's a bit tricky to capture the failure reason, because the installation script covers the underlying failure and just reports by the end of the 'Archive Extraction' phase: An installation step has been aborted. Would you like to restart the installation or exit the installer? Nevertheless, capturing the output using a null modem on a bhyve's serial console (/dev/nmdm) the failure reason is revealed: Jan 5 03:20:10 kernel: pid 1496 (distextract), uid 0, was killed: out of swap space Jan 5 03:20:10 kernel: pid 621 (devd), uid 0, was killed: out of swap space Jan 5 03:20:10 kernel: pid 1176 (dhclient), uid 65, was killed: out of swap space Jan 5 03:20:10 dhclient[1123]: connection closed Jan 5 03:20:10 dhclient[1123]: exiting. [1;24r[m[?7h[?1h=[?1h=[H[J FreeBSD Installer So it seems that the gpt partitioning does succeed in creating the necessary partitions including the swap space, but that swap space is not mounted when the OS installation begins. I'm sure that some percentage of virtual memory could easily be swapped out with not much ill-effect on further decompressing and unpacking of files and other installation steps. Seems unreasonable that 2 MB of memory is insufficient for a plain OS installation on ZFS. I understand that ZFS would be happier with more memory for heavy production use, and that a modern real iron has much more than 4 GB of memory, but virtualized guests are often dedicated to a single task and could do well with 'just' 2 GB of memory, even if using ZFS. So my suggestion is twofold: - let the installer mount the available swap partitions before jumping into heavy installation work; - avoid covering an underlying failure with a quickly-redrawn installer menu; at least some delay after a failure but before erasing the screen would be useful, avoiding the user to go to great lengths to be able to capture the failure reason. Mark
Mark Martinec
2014-Jan-06 01:32 UTC
Installer fails with "out of swap space" when installing ZFS-on-root with less then 4 GB mem (10.0-RC4)
> I was playing with bhyve on 10.0-RC4, trying to install another > 10.0-RC4 into > a 16 GB ZFS volume using the network installation DVD. Mostly kept > defaults, > except that I chose a ZFS-on-root installation. > The amd64 host was given 1 GB of RAM on the first attempttypo: s/host/guest/ The guest was given 1, 2 or 4 GB of mem. The host had plenty of RAM. Mark
Teske, Devin
2014-Jan-06 17:19 UTC
Installer fails with "out of swap space" when installing ZFS-on-root with less then 4 GB mem (10.0-RC4)
On Jan 5, 2014, at 5:27 PM, Mark Martinec wrote:> [snip] > I understand that ZFS would be happier with more memory for heavy production > use, and that a modern real iron has much more than 4 GB of memory, but > virtualized guests are often dedicated to a single task and could do well > with 'just' 2 GB of memory, even if using ZFS. > > So my suggestion is twofold: > > - let the installer mount the available swap partitions before jumping > into heavy installation work; >That sounds reasonable enough.> - avoid covering an underlying failure with a quickly-redrawn installer > menu; at least some delay after a failure but before erasing the screen > would be useful, avoiding the user to go to great lengths to be able to > capture the failure reason. >While the error reporting could be improved in that area of bsdinstall that you fingered, the perception that the errors are quickly being erased is incorrect. What's actually going on is the errors are being shunted over to vty1 (Alt+F2) as well as /tmp/bsdinstall_log But granted... the error messages that are displayed on vty0 could certainly be improved (which will take time). Thank you very much for testing and feedback. -- Cheers, Devin _____________ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.
Craig Rodrigues
2014-Jan-06 21:13 UTC
Installer fails with "out of swap space" when installing ZFS-on-root with less then 4 GB mem (10.0-RC4)
On Sun, Jan 5, 2014 at 5:27 PM, Mark Martinec <Mark.Martinec+freebsd at ijs.si>wrote:> I was playing with bhyve on 10.0-RC4, trying to install another 10.0-RC4 > into > a 16 GB ZFS volume using the network installation DVD. Mostly kept > defaults, > except that I chose a ZFS-on-root installation. The amd64 host was given 1 > GB > of RAM on the first attempt, but failed. It fails on 2 GB RAM too, but > succeeds > when given 4 GB of RAM. >How far did you get with this? If you use BHyve to boot FreeBSD, the loader which is used is in /usr/src/sys/boot/userboot , and this loader does not support a complete ZFS-only install. I recently tried to do this, and the install worked (with 4G of RAM), but when I tried to reboot the BHyve VM, the VM did not boot. If you look at: https://admbugs.freebsd.org/show_bug.cgi?id=428#c7 you will see I had to use a variation of these steps: https://wiki.freebsd.org/RootOnZFS/UFSBoot where the /boot directory which contained the kernel and loader was on a UFS partition, but everything else was on ZFS. That's the only way I could get the BHyve VM to boot, with userboot. -- Craig