From owner-freebsd-fs@FreeBSD.ORG Wed Mar 8 18:29:21 2006 Return-Path: X-Original-To: freebsd-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 3AD1716A420 for ; Wed, 8 Mar 2006 18:29:21 +0000 (GMT) (envelope-from pm940@yahoo.com) Received: from web54007.mail.yahoo.com (web54007.mail.yahoo.com [206.190.36.231]) by mx1.FreeBSD.org (Postfix) with SMTP id 5B61043D69 for ; Wed, 8 Mar 2006 18:29:19 +0000 (GMT) (envelope-from pm940@yahoo.com) Received: (qmail 69868 invoked by uid 60001); 8 Mar 2006 18:29:18 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=bhyQiClToyFymYhJDu+OJcESSVrV+BJKG4ApRCjcvMYC4pzGFacFo2Q3lIUFzACgRdAWZd2PdJeGEtHCQl7+M2Vy8PB3aRrIuaquLlStdpgbSYg6B0EuJSrvBgPpi01pHhSUW3gXdL+U5fauAvtszzyj0ZoLl5RFAaF7cSjuUvY= ; Message-ID: <20060308182918.69866.qmail@web54007.mail.yahoo.com> Received: from [71.140.186.33] by web54007.mail.yahoo.com via HTTP; Wed, 08 Mar 2006 10:29:18 PST Date: Wed, 8 Mar 2006 10:29:18 -0800 (PST) From: Paul Marciano To: freebsd-fs@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: Getting EBUSY upon unmount ATA disk... 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, 08 Mar 2006 18:29:21 -0000 I am running FreeBSD-5.4 with root on md0. I am seeing the following problem: # df Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/md0 17370 15810 172 99% / devfs 1 1 0 100% /dev /dev/md1 3694 16 3384 0% /var /dev/md2 31470 8 28946 0% /tmp /dev/md3.uzipc 20808 18890 254 99% /usr # mount /dev/ad0s1a /flash # : > /flash/foobar # umount /flash umount: unmount of /flash failed: Device busy Waiting doesn't help. I can repeat the unmount command after a time and it still reports EBUSY. ad0 is a SanDisk Compact Flash card. So far I've traced the unmount op to ffs_flushfiles() in ffs_vfsops.c: /* * Flush all the files. */ if ((error = vflush(mp, 0, flags, td)) != 0) return (error); Still trying to track it down, but I'm not an fs guy and so I'm asking for a little help. Some more background: My system uses a Compact Flash card to store configuration information. It's seldom accessed and it would be nice to support controlled removing/replacing during operation. It looks like it is possible using atacontrol to detach the channel and then reattach when the card is inserted. I can: insert, attach, mount, read, umount, remove all day long without problems. But now as soon as I do one write the drive doesn't want to unmount. No processes are camping on the mount point. manually typing "sync" doesn't help. unmount -f succeeds. I hope someone can advise me. Thanks, Paul. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com