Bug 185370 - [install] zfs install swap space exhausted on default install
Summary: [install] zfs install swap space exhausted on default install
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-31 16:00 UTC by Hug Me
Modified: 2018-05-20 23:53 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hug Me 2013-12-31 16:00:00 UTC
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.

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
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
Comment 1 Ivan Klymenko 2014-11-04 08:39:25 UTC
When installing from a snapshot - I have a similar problem.
ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/ISO-IMAGES/10.1/FreeBSD-10.1-PRERELEASE-amd64-20141026-r273706-disc1.iso
Comment 2 foudfou 2014-11-25 20:34:17 UTC
Same here, trying to install 10.1-RELEASE on an old PC (1GB RAM) with ZFS root.
Does anyone know a workaround ?
Comment 3 Corban Johnson 2016-03-04 17:35:19 UTC
I am able to replicate this on 10.2-RELEASE-amd64: Default installation options, using single-desk striped ZFS-on-Root. Tested with Parallels, VM configurations of <= 1GB. 

Workaround seems to be using a bare (base and kernel only) install, and adding Ports and other packages after.
Comment 4 Eitan Adler freebsd_committer freebsd_triage 2018-05-20 23:53:55 UTC
For bugs matching the following conditions:
- Status == In Progress
- Assignee == "bugs@FreeBSD.org"
- Last Modified Year <= 2017

Do
- Set Status to "Open"