From owner-freebsd-small Sun Dec 23 22:22:19 2001 Delivered-To: freebsd-small@freebsd.org Received: from mail013.syd.optusnet.com.au (mail013.syd.optusnet.com.au [203.2.75.174]) by hub.freebsd.org (Postfix) with ESMTP id F2CB637B41A for ; Sun, 23 Dec 2001 22:22:15 -0800 (PST) Received: from w95 (wdcax13-020.dialup.optusnet.com.au [198.142.220.20]) by mail013.syd.optusnet.com.au (8.11.1/8.11.1) with SMTP id fBO6MDD20415 for ; Mon, 24 Dec 2001 17:22:14 +1100 Message-ID: <003d01c18c43$5446ad20$0104010a@famzon.com.au> Reply-To: "Andrew Hannam" From: "Andrew Hannam" To: Subject: Disk Writes Date: Mon, 24 Dec 2001 16:21:58 +1000 Organization: FamZon Systems MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Sender: owner-freebsd-small@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I have been doing some embedded work based on Free/PicoBSD based on a 4.2 kernel but have come across a problem that is showing it's head occasionally. We are currently in the process of rolling out 1000 devices (currently at 75) over the next 6 months. Fortunately I have the ability to upgrade the devices in the field over a GSM mobile modem. The device has a 128M read-only root file system, an MFS /tmp file-system (currently backed by hard-disk based swap), and a 64M /app read/write file system on hard-disk for storing transaction data. Transactions occur roughly 5->10 times a day. The application has been written to only append to files or to replace the file by creating a new file and then writing a single byte to redirect which file is in use. The problem is that in certain circumstances in power down (which can occur at any time), the /app file system is being corrupted beyond what an automatic fsck at boot can repair. Unfortunately it is not possible to mount and unmount the /app file-system around each write. My current kernel settings are: sysctl -w vfs.write_behind=0 kern.filedelay=2 kern.dirdelay=1 kern.metadelay=0 Can anyone please help with this write problem. I am also looking to move to compact flash in the next few months - how should the read/write file-system be mounted/options etc to work economically on the compact flash. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-small" in the body of the message