From owner-freebsd-fs@FreeBSD.ORG Wed Mar 14 04:39:06 2007 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 67A4216A400 for ; Wed, 14 Mar 2007 04:39:06 +0000 (UTC) (envelope-from david.cecil@nokia.com) Received: from mgw-ext11.nokia.com (smtp.nokia.com [131.228.20.170]) by mx1.freebsd.org (Postfix) with ESMTP id EE5CC13C457 for ; Wed, 14 Mar 2007 04:39:05 +0000 (UTC) (envelope-from david.cecil@nokia.com) Received: from esebh105.NOE.Nokia.com (esebh105.ntc.nokia.com [172.21.138.211]) by mgw-ext11.nokia.com (Switch-3.2.5/Switch-3.2.5) with ESMTP id l2E4FVrl030474 for ; Wed, 14 Mar 2007 06:15:35 +0200 Received: from siebh101.NOE.Nokia.com ([172.30.195.27]) by esebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 14 Mar 2007 06:14:56 +0200 Received: from syebe101.NOE.Nokia.com ([172.30.128.65]) by siebh101.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 14 Mar 2007 12:14:41 +0800 Received: from [172.30.67.234] ([172.30.67.234]) by syebe101.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 14 Mar 2007 15:14:39 +1100 Message-ID: <45F776AE.8090702@nokia.com> Date: Wed, 14 Mar 2007 14:14:38 +1000 From: David Cecil User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: freebsd-fs@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 14 Mar 2007 04:14:39.0672 (UTC) FILETIME=[48D2EB80:01C765EF] X-eXpurgate-Category: 1/0 X-eXpurgate-ID: 149371::070314061535-75B50BB0-67772880/0-0/0-1 X-Nokia-AV: Clean Subject: FFS writes to read-only mount 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: Wed, 14 Mar 2007 04:39:06 -0000 Hi, I have seen the following message (or equivalent) occasionally on a FreeBSD 6.1 system: g_vfs_done():mirror/gm0s1a[WRITE(offset=1349091328, length=16384)]error = 1 The partition in question is the root partition, and it is mounted read-only. I have verified that the problem occurs due to the write request returning EPERM due to the check in g_io_check: case BIO_WRITE: case BIO_DELETE: if (cp->acw == 0) return (EPERM); I have been trying to determine what within FFS would be trying to write to the partition. The "bio_from" in the bio structure indicates (in the geom) that it's ffs.mirror/gm0s1a that's trying to write. The contents of the buffer looks somewhat like a directory (lots of files listed, but comparison to the actual directory that contians these files reveals it's somewhat different), followed by a binary (ELF header). However, I'm at a loss to understand who's actually doing the writing. Is it coming from within FFS or is there an application that's done the write? (I can't understand how an application would be permitted to do it though.) I have seen this sort of problem (same error number) reported on the Internet occasionally, but it doesn't seem it's been satisfactorily resolved in all instances. Any help you can provide would be much appreciated. Thanks, Dave