From owner-freebsd-questions@FreeBSD.ORG Tue Aug 12 19:48:21 2014 Return-Path: Delivered-To: freebsd-questions@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 F11DB7F7 for ; Tue, 12 Aug 2014 19:48:20 +0000 (UTC) Received: from smtpy.mta.ca (smtpy.mta.ca [138.73.1.125]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C459726F2 for ; Tue, 12 Aug 2014 19:48:20 +0000 (UTC) Received: from qemg.mta.ca ([138.73.29.51]:49163 helo=qemg.org) by smtpy.mta.ca with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.82) (envelope-from ) id 1XHHya-0005tU-6M; Tue, 12 Aug 2014 16:43:20 -0300 Date: Tue, 12 Aug 2014 16:48:17 -0300 (ADT) From: Andrew Hamilton-Wright To: Roland Smith Subject: Re: Problems with dump and restore In-Reply-To: <20140812193419.GB7166@slackbox.erewhon.home> Message-ID: References: <20140812193419.GB7166@slackbox.erewhon.home> User-Agent: Alpine 2.11 (BSF 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=utf-8; format=flowed Content-Transfer-Encoding: 8BIT X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2014 19:48:21 -0000 Hi Roland -- thanks for the suggestions. On Tue, 12 Aug 2014, Roland Smith wrote: > On Tue, Aug 12, 2014 at 01:07:06PM -0300, Andrew Hamilton-Wright wrote: > [ ... condensed ... ] >> These were created using snapshots, so the level 0 was created via >> dump 0uLCf 32 - /usr >> and higher level dumps were created similarly. > > In 2011, a problem was found with snapshots in combination with soft > updates *and* journaling (SU+J) hanging the machine. At that time the > recommendation was to switch off journaling. > According to https://wiki.freebsd.org/NewFAQs: > > If you want to use snapshot (dump -L) then disable the soft updates > journal for that filesystem. > > This bug was fixed toward the end of 2011; > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=160662 > > Personally I make dumps *only* from filesystems that are unmounted or mounted > read-only, so never from a “live” filesystem, just to be on the safe side. I had forgotten about the soft update issue. I am not sure that that is related, as the machine is running 10.0 and the level 0 dump was created in July, but it is definitely worth lowering the complexity of the problem. I will ensure that soft updates are off before dumping in the future. > This is mentioned in the restore's manpage; > > expected next file , got > A file that was not listed in the directory showed up. This can > occur when using a dump created on an active file system. True, but my understanding of snapshots is that it is supposed to eliminate exactly this problem, no? >> Some questions then: >> - is anyone else using dump/restore as their main backup method? > > Yes, operating system filesystems like /, /usr and /var, which can contain > flags and hard links and such. These filesystem's aren't all that big, so > dumps are relatively quick. What options are you using? Are you using dumplevels? >> Are you using snapshots? > > No, because of the aforementioned bug that surfaced in 2011. > >> If so, have you seen anything like this when running restore? > > I've had hangs and corrupted dumps when dumping live filesystems. Good to know. >> - is there any means of validating the dump file, other than the -N >> option (which returns no warnings on any of these files)? > > Not that I know of. I generally make and verify checksums when copying dumps > to other machines or external harddrives. Yes -- I suppose I have gotten lazy in that regard. >> - does anyone have any advice that may help determine what may have >> gone wrong? > > Try using restore's “degraded” mode (using the ‘-D’ option) and use the ‘-y’ > option. I have started that running on a scratch device, and will report back with results. Andrew.