From owner-freebsd-fs@FreeBSD.ORG Fri Mar 24 21:47:17 2006 Return-Path: X-Original-To: fs@freebsd.org Delivered-To: freebsd-fs@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6B46116A427 for ; Fri, 24 Mar 2006 21:47:17 +0000 (UTC) (envelope-from mi+mx@aldan.algebra.com) Received: from aldan.algebra.com (aldan.algebra.com [216.254.65.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id BCC2143D48 for ; Fri, 24 Mar 2006 21:47:16 +0000 (GMT) (envelope-from mi+mx@aldan.algebra.com) Received: from corbulon.video-collage.com (static-151-204-231-237.bos.east.verizon.net [151.204.231.237]) by aldan.algebra.com (8.13.6/8.13.6) with ESMTP id k2OLlC7D002903 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 24 Mar 2006 16:47:15 -0500 (EST) (envelope-from mi+mx@aldan.algebra.com) Received: from mteterin.us.murex.com (195-11.customer.cloud9.net [168.100.195.11]) by corbulon.video-collage.com (8.13.6/8.13.6) with ESMTP id k2OLl56B053727 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 24 Mar 2006 16:47:06 -0500 (EST) (envelope-from mi+mx@aldan.algebra.com) Received: from mteterin.us.murex.com (mteterin@localhost [127.0.0.1]) by mteterin.us.murex.com (8.13.4/8.13.4) with ESMTP id k2OLl0BO044648 for ; Fri, 24 Mar 2006 16:47:00 -0500 (EST) (envelope-from mi+mx@aldan.algebra.com) Received: from localhost (localhost [[UNIX: localhost]]) by mteterin.us.murex.com (8.13.4/8.13.4/Submit) id k2OLkwJV044647 for fs@freebsd.org; Fri, 24 Mar 2006 16:46:58 -0500 (EST) (envelope-from mi+mx@aldan.algebra.com) X-Authentication-Warning: mteterin.us.murex.com: mteterin set sender to mi+mx@aldan.algebra.com using -f From: Mikhail Teterin Organization: Virtual Estates, Inc. To: fs@freebsd.org Date: Fri, 24 Mar 2006 16:46:58 -0500 User-Agent: KMail/1.8.3 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200603241646.58415.mi+mx@aldan.algebra.com> X-Virus-Scanned: ClamAV devel-20050525/1356/Fri Mar 24 13:41:06 2006 on corbulon.video-collage.com X-Virus-Status: Clean X-Scanned-By: MIMEDefang 2.43 Cc: Subject: How 'honest' is fstat(1)? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Mar 2006 21:47:17 -0000 Hello! As a policy I try to keep my /, /usr, and other filesystems (except /var and /home) mounted readonly. (Not so much for security as for safety.) When I need to make a modification, I remount them: mount -orw -u / make the change, and remount back: mount -oro -u /usr/local This works for "small" changes, but sometimes, however, after a bigger on (such as rebuilding of some ports), the last step fails with "busy". At this time nothing should have a file open, and nothing does according to fstat. The command: fstat | awk '$5 == "/usr/local" && $NF != "r"' does not list anything. Yet, the fs (in this case -- /usr/local) will not remount readonly. My only guess is, the earlier versions of the just reinstalled executables are still running and that trigger's the rarely noticed bug. Any other guesses? Thanks! -mi