From owner-freebsd-stable@FreeBSD.ORG Fri Feb 12 18:21:09 2010 Return-Path: Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACDA110656AC; Fri, 12 Feb 2010 18:21:09 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id 32A068FC2C; Fri, 12 Feb 2010 18:21:09 +0000 (UTC) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.3/8.14.3) with ESMTP id o1CIKowX019228; Fri, 12 Feb 2010 19:21:05 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.3/8.14.3/Submit) id o1CIKohU019226; Fri, 12 Feb 2010 19:20:50 +0100 (CET) (envelope-from olli) From: Oliver Fromme Message-Id: <201002121820.o1CIKohU019226@lurza.secnetix.de> To: amdmi3@amdmi3.ru (Dmitry Marakasov) Date: Fri, 12 Feb 2010 19:20:50 +0100 (CET) In-Reply-To: <20100212180032.GC94665@hades.panopticon> X-Mailer: ELM [version 2.5 PL8] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Fri, 12 Feb 2010 19:21:05 +0100 (CET) Cc: freebsd-hackers@FreeBSD.ORG, freebsd-stable@FreeBSD.ORG Subject: Re: NFS write corruption on 8.0-RELEASE X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Feb 2010 18:21:09 -0000 Dmitry Marakasov wrote: > * Oliver Fromme (olli@lurza.secnetix.de) wrote: > > This is an excerpt from Solaris' mount_nfs(1M) manpage: > > > > File systems that are mounted read-write or that con- > > tain executable files should always be mounted with > > the hard option. Applications using soft mounted file > > systems may incur unexpected I/O errors, file corrup- > > tion, and unexpected program core dumps. The soft > > option is not recommended. > > > > FreeBSD's manual page doesn't contain such a warning, but > > maybe it should. (It contains a warning not to use "soft" > > with NFSv4, though, for different reasons.) > > Interesting, I'll try disabling it. However now I really wonder why > is such dangerous option available (given it's the cause) at all, > especially without a notice. Silent data corruption is possibly the > worst thing to happen ever. I'm sorry for the confusion ... I do not think that it's the cause for your data corruption, in this particular case. I just mentioned the potential problems with "soft" mounts because it could cause additional problems for you. (And it's important to know anyhow.) > However, without soft option NFS would be a strange thing to use - > network problems is kinda inevitable thing, and having all processes > locked in a unkillable state (with hard mounts) when it dies is not > fun. Or am I wrong? Well, this is what happens if the network hangs: 1. With "hard" mounts (the default), processes that access NFS shares are locked for as long as the network is down. 2. With "soft" mounts, binaries can coredump, and many programs won't notice that write access just failed which leads to file corruption. Personally I definitely prefer the first. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "I have stopped reading Stephen King novels. Now I just read C code instead." -- Richard A. O'Keefe