From nobody@FreeBSD.org  Tue Dec 31 15:54:18 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id D025FFEE
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 31 Dec 2013 15:54:18 +0000 (UTC)
Received: from oldred.freebsd.org (oldred.freebsd.org [IPv6:2001:1900:2254:206a::50:4])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id A21AC1C82
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 31 Dec 2013 15:54:18 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id rBVFsIdb062420
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 31 Dec 2013 15:54:18 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id rBVFsIde062410;
	Tue, 31 Dec 2013 15:54:18 GMT
	(envelope-from nobody)
Message-Id: <201312311554.rBVFsIde062410@oldred.freebsd.org>
Date: Tue, 31 Dec 2013 15:54:18 GMT
From: Hug Me <hugme@hugme.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: zfs install swap space
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         185370
>Category:       misc
>Synopsis:       [install] zfs install swap space exhausted on default install
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec 31 16:00:00 UTC 2013
>Closed-Date:    
>Last-Modified:  Wed Apr 16 01:09:57 UTC 2014
>Originator:     Hug Me
>Release:        10.0-RC3
>Organization:
>Environment:
FreeBSD db0.hug 10.0-RC3 FreeBSD 10.0-RC3 #0 r259778: Mon Dec 23 23:27:58 UTC 2013     root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
On installation I while installing ports the device will run out of swap
space. With the default 2G it happens 1 in every 4-6 times. I change it
to 3G and I've had it happen once in the last 25 installations (however
I had added src to the installation it failed on with 3G). I have had the
same error occur with RC2 and RC3

About my environment:

FreeBSD virtual device on Ubuntu/KVM
2 disks, 30 gig each.
Each iscsi disk is on a different virtual instance of FreeBSD running
istgt.

>How-To-Repeat:
freebsd cd rebuilt as following (I'm building on the ubuntu device but
it shouldn't matter where it's built):

mount -o loop FreeBSD-10.0-RC3-amd64-disc1.iso /mnt
mkdir /tmp/new-freebsd
cp -Rfp /mnt/* /tmp/new-freebsd/
sed -i '/^ttyu0/s/off/on/;/^ttyu0/s/dialup/vt100/' /tmp/new-freebsd/etc/ttys
echo "console=\"comconsole\"" >> /tmp/new-freebsd/boot/loader.conf
echo "virtio_load=\"YES\"" >> /tmp/new-freebsd/boot/loader.conf
echo "virtio_pci_load=\"YES\"" >> /tmp/new-freebsd/boot/loader.conf
echo "beastie_disable=\"YES\"" >> /tmp/new-freebsd/boot/loader.conf
echo "/dev/cd0 / cd9660 ro 0 0" > /tmp/new-freebsd/etc/fstab
mkisofs -v -b boot/cdboot -no-emul-boot -r -J -V "FreeBSD 9.2" -o /var/lib/libvirt/iso/FreeBSD-10.0-RC3-new.iso /tmp/new-freebsd/

now start an install with the command:
virt-install -n mail0 -r 2048 --vcpus=2 --os-variant=freebsd8 --accelerate -v --disk path=/dev/mapper/mail0-f0,bus=virtio,size=30 --disk path=/dev/mapper/mail0-f1,bus=virtio,size=30  -w bridge:br1,model=virtio -c /var/lib/libvirt/iso/FreeBSD-10-rc3-new.iso --connect=qemu:///system

*Note the two disk names in /dev/mapper. These are iscsi disks renamed with multipath

During the installation use the following options:
install
Continue with default keymap
mail1
defaults
zfs

pool type=mirror (choose both disks)
pool name (choose a name)

Part of the way through archive extract of ports (the final extract)
you 'might' receive an "out of swap space" error

 >>> Install          Proceed with Installation x x
 x x T Pool Type/Disks:   mirror: 2 disks           x x
 x x - Rescan Devices     *                         x x
 x x - Disk Info          *                         x x
 x x N Pool Name          mail1                     x x
 x x 4 Force 4K Sectors?  YES                       x x
 x x E Encrypt Disks?     NO                        x x
 x x P Partition Scheme   GPT                       x x
 x x S Swap Size          2g             
>Fix:
as temporary fix change default swap space to 3G or higher. Note if you
are installing with src (which I often do) you may want to set it to 4G
>Release-Note:
>Audit-Trail:
>Unformatted:
