From owner-freebsd-questions@FreeBSD.ORG Wed Mar 8 18:37:11 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 34C6D16A420 for ; Wed, 8 Mar 2006 18:37:11 +0000 (GMT) (envelope-from pm940@yahoo.com) Received: from web54009.mail.yahoo.com (web54009.mail.yahoo.com [206.190.36.233]) by mx1.FreeBSD.org (Postfix) with SMTP id B5A1143D70 for ; Wed, 8 Mar 2006 18:37:10 +0000 (GMT) (envelope-from pm940@yahoo.com) Received: (qmail 61402 invoked by uid 60001); 8 Mar 2006 18:37:10 -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=dtTMjZW77XyFS+sK37v9K1VBZo4l0lXBAofEhvXer+XdkEJBhEKdLDdXlMrgpbKYN5dqvoEKBK0SHpw2VQ62j05H++vYkZIkJH1XQcTrKg5yeXqRbr/5lfm+ALrGuZnLvbNVGWPQ8w4Mn6IkILwYisPnnY0n/1AviPuPdQTTXhs= ; Message-ID: <20060308183709.61400.qmail@web54009.mail.yahoo.com> Received: from [71.140.186.33] by web54009.mail.yahoo.com via HTTP; Wed, 08 Mar 2006 10:37:09 PST Date: Wed, 8 Mar 2006 10:37:09 -0800 (PST) From: Paul Marciano To: freebsd-questions@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-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Mar 2006 18:37:11 -0000 (originally sent to freebsd-fs, but that looks like a developer list). 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