From owner-freebsd-questions@freebsd.org Sat Jul 25 13:31:25 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E73B79AA7D7 for ; Sat, 25 Jul 2015 13:31:25 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB8E41DF0; Sat, 25 Jul 2015 13:31:25 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de (port-92-195-110-127.dynamic.qsc.de [92.195.110.127]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx02.qsc.de (Postfix) with ESMTPS id B04E924A0E; Sat, 25 Jul 2015 15:31:23 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id t6PDVMKe001985; Sat, 25 Jul 2015 15:31:23 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Sat, 25 Jul 2015 15:31:22 +0200 From: Polytropon To: Matthew Seaman Cc: freebsd-questions@freebsd.org, "CK" Subject: Re: Endless Data Loss Message-Id: <20150725153122.19a57c15.freebsd@edvax.de> In-Reply-To: <55B34B09.3010106@FreeBSD.org> References: <0MRCCJ-1ZUCcr1rAt-00UeQk@mail.gmx.com> <55B34B09.3010106@FreeBSD.org> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Jul 2015 13:31:26 -0000 On Sat, 25 Jul 2015 09:38:33 +0100, Matthew Seaman wrote: > On 25/07/2015 08:33, CK wrote: > > In the last 2 years, I have upgraded from 4.11 to 9.2 then 9.3 > > releases, and since upgrading to the 9 series, I have experienced > > endless data loss - every time I reboot my computer, massive numbers > > of files vanish - 20 - 50 - a lot. And it's driving me crazy. > > I don't expect to get any fixes here, but something is wrong > > with the code - it's happening on ATA drives, USB flash drives, > > a few of each kind. So, it's definitely not a hardware problem. > > This is all on the same machine? If it's been in service since 4.11 > days, then it is ancient in computing terms. Don't disregard hardware > problems so quickly. It's not just hard drives that can have problems: > disk controllers, disk cabling, even failing power supplies can result > in these sort of symptoms. Still software problems aren't out of scope as well. In case the problem originates from damaged file systems - maybe when the system continues to run background_fsck and starts to work in an "unclean state" -, so running fsck _at least two times_ on all (!) involved media (unmounted!) should be a step taken, if possible from a live system (CD or DVD). I'm mentioning this because I've had encountered this strange behaviour in the past, too. Additionally, using smartctl to examine SMART-capable disks is important. But as you said: Checking cables, power supply, heat, RAM is important here. The observed loss of files could be a result from either (or many at once). However, the loss of files should be "covered" by some kind of message, usually from fsck "salvaging" inodes. If this is not the case, I assume background_fsck trying (and failing!) to repair a damaged file system could be the reason. This is because background_fsck cannot do all of the things that a regular fsck can do. Idea for solution: Add background_fsck="NO" to /etc/rc.conf and reboot. Let it do its work. Having to wait some minutes vs. losing files... well, the choice is easy. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...