From owner-freebsd-current@FreeBSD.ORG Sat Oct 10 21:49:09 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F27F1065676 for ; Sat, 10 Oct 2009 21:49:09 +0000 (UTC) (envelope-from ehrmann@gmail.com) Received: from mxout-07.mxes.net (mxout-07.mxes.net [216.86.168.182]) by mx1.freebsd.org (Postfix) with ESMTP id 655FA8FC08 for ; Sat, 10 Oct 2009 21:49:09 +0000 (UTC) Received: from [10.0.0.171] (unknown [64.9.236.71]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTPSA id 1B2B422DD6D for ; Sat, 10 Oct 2009 17:49:06 -0400 (EDT) Message-ID: <4AD10135.9050002@gmail.com> Date: Sat, 10 Oct 2009 14:48:37 -0700 From: David Ehrmann User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: freebsd-current@freebsd.org References: <4AD0E286.9030508@gmail.com> In-Reply-To: <4AD0E286.9030508@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Strange md/unionfs issue X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2009 21:49:09 -0000 David Ehrmann wrote: > I have a system running on a flash disk. To prevent it from wearing > out quickly, I don't run with a swap and mount /tmp and /var from > memory. Because /var needs some directories and contains files I > probably should save from time to time, I mount it from flash, mount > /var to /var_real so I can access the underlying files, and then I > mount an md device on top of /var as a unionfs. Initially, it seems > to work, but seconds later, the unionfs seems to fail. > > server# cd /var > server# ls > .snap crash heimdal preserve yp > account cron log run > at db mail rwho > audit empty msgs spool > backups games named tmp > server# mount > /dev/ad0s1a on / (ufs, NFS exported, local) > devfs on /dev (devfs, local, multilabel) > /dev/ad0s1f on /usr (ufs, local, soft-updates) > /dev/ad0s1e on /var (ufs, local, soft-updates) > /var on /var_real (nullfs, local, noatime) > /dev/md0 on /var (ufs, local, union, soft-updates) > /dev/md1 on /tmp (ufs, local, soft-updates) > server# cd /var_real/ > server# ls > .snap crash heimdal preserve yp > account cron log run > at db mail rwho > audit empty msgs spool > backups games named tmp > server# cd /var > server# ls > .snap > server# > > Removing /var_real from the fstab didn't help. Here's the full version: > > # Device Mountpoint FStype Options > Dump Pass# > /dev/ad0s1a / ufs rw 1 1 > /dev/ad0s1f /usr ufs rw 2 2 > > /dev/ad0s1e /var ufs rw 2 2 > /var /var_real nullfs rw,noatime > md /var mfs rw,union,-s128M > > md /tmp mfs rw,-s128M > > Ideas? > It looks like I don't have the problem if I mount the md on top of /var if /var is really on /, i.e. not a mount point.