From nobody@FreeBSD.org  Sun Jan 12 07:44:20 2014
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id ABAEAAF0
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 12 Jan 2014 07:44:20 +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 976701D4D
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 12 Jan 2014 07:44:20 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id s0C7iKQa074220
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 12 Jan 2014 07:44:20 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id s0C7iKWW074199;
	Sun, 12 Jan 2014 07:44:20 GMT
	(envelope-from nobody)
Message-Id: <201401120744.s0C7iKWW074199@oldred.freebsd.org>
Date: Sun, 12 Jan 2014 07:44:20 GMT
From: Matt Emmerton <matt@compar.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: freebsd-update claimed success even though install ran out of disk space
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         185676
>Category:       bin
>Synopsis:       freebsd-update(8) claimed success even though install ran out of disk space
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    cperciva
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 12 07:50:00 UTC 2014
>Closed-Date:    
>Last-Modified:  Sun Apr 13 23:29:27 UTC 2014
>Originator:     Matt Emmerton
>Release:        9.1-RELEASE-p7
>Organization:
Computer Partners
>Environment:
FreeBSD olympia.compar.com 9.1-RELEASE-p7 FreeBSD 9.1-RELEASE-p7 #0: Mon Sep  9 21:23:37 UTC 2013     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
I was using freebsd-update to move to 9.2:

# freebsd-update -r 9.2-RELEASE upgrade

Ran through all the merging no problem, and then went to install:

# freebsd-update install

Installing updates...
/: write failed, filesystem is full
install: ///boot/kernel/INS@bBbO: No space left on device

Kernel updates have been installed.  Please reboot and run
"/usr/sbin/freebsd-update install" again to finish installing updates.

OMG!  Rebooting would likely have been fatal at that point.  And yes, my root FS was full:

olympia# df -k
Filesystem  1024-blocks      Used    Avail Capacity  Mounted on
/dev/ad0s1a      507630    487372   -20352   104%    /
devfs                 1         1        0   100%    /dev
procfs                4         4        0   100%    /proc
/dev/ad0s1e      507630     18608   448412     4%    /tmp
/dev/ad0s1f    34443364   1377450 30310446     4%    /usr
/dev/ad0s1d     1469326   1057210   294570    78%    /var
/dev/ad4s1d   946031670 820026292 50322846    94%    /bigvol1

After cleaning up root (had some old kernels hanging around) and re-running the install everything was fine.

Since "freebsd-update install" knows how much space is needed for the new kernel, could it not check for adequate space up-front?  (Same holds true for most other files, too.)
>How-To-Repeat:
Fill up root filesystem.
Run freebsd-update install.
See failures yet claims of success.
>Fix:
Ensure adequate disk space prior to running freebsd-install.


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->cperciva 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sun Apr 13 23:27:34 UTC 2014 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=185676 
>Unformatted:
