From owner-freebsd-stable@FreeBSD.ORG Mon Feb 9 21:29:13 2015 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 991AF4EE for ; Mon, 9 Feb 2015 21:29:13 +0000 (UTC) Received: from hydra.pix.net (hydra.pix.net [IPv6:2001:470:e254::4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.pix.net", Issuer "Pix.Com Technologies, LLC CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 5B02B157 for ; Mon, 9 Feb 2015 21:29:13 +0000 (UTC) Received: from torb.pix.net (verizon.pix.net [71.178.232.3]) (authenticated bits=0) by hydra.pix.net (8.15.1/8.15.1) with ESMTPA id t19LTBQK091550; Mon, 9 Feb 2015 16:29:11 -0500 (EST) (envelope-from lidl@pix.net) X-Authentication-Warning: hydra.pix.net: Host verizon.pix.net [71.178.232.3] claimed to be torb.pix.net Message-ID: <54D926A7.8060806@pix.net> Date: Mon, 09 Feb 2015 16:29:11 -0500 From: Kurt Lidl User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: freebsd-stable@freebsd.org Subject: Re: freebsd-update and hang during reboot References: <1423501720.16794.18.camel@freebsd.org> In-Reply-To: <1423501720.16794.18.camel@freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 21:29:13 -0000 Ian Lepore wrote: >> I ran into this problem in spades when upgrading a set of servers from >> FreeBSD 9.0 to 9.1. I happened consistently. Normal reboots worked, >> but when going from 9.0 to 9.1, it *ALWAYS* hung, and it always hung >> at the same place, after printing the "All buffers synced" message. >> >> I ultimately determined that if I did the following, rather than >> just a "reboot" or "shutdown -r now 'FreeBSD 9.1-RELEASE upgrade'", >> it would consistently AVOID the hang: >> >> sync ; sync ; sync ; shutdown -o -n -r now "FreeBSD 9.1 install" >> >> Your mileage may vary, but you don't have a lot to lose by trying it. >> >> -Kurt >> > > That is just bad advice. sync(1) does not g'tee that all data has been > written, no matter how many times you type it. shutdown -n tells the > system to abandon unwritten data. All in all, this is a recipe for > silent filesystem corruption. Using it after an update is just asking > to have a mix of old and new files on the system after the reboot. I didn't specify that I was using ZFS, but I was. And this comment in the ZFS code (zfs_vfsops.c, line 170): /* * Sync all ZFS filesystems. This is what happens when you * run sync(1M). Unlike other filesystems, ZFS honors the * request by waiting for all pools to commit all dirty data. */ spa_sync_allpools(); Says that sync() won't return until the dirty data is flushed. For my use case, I believe it was perfectly safe. -Kurt