From owner-freebsd-questions@FreeBSD.ORG Sun Jun 3 16:07:28 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F06091065747 for ; Sun, 3 Jun 2012 16:07:28 +0000 (UTC) (envelope-from bonomi@mail.r-bonomi.com) Received: from mail.r-bonomi.com (mx-out.r-bonomi.com [204.87.227.120]) by mx1.freebsd.org (Postfix) with ESMTP id AE70C8FC17 for ; Sun, 3 Jun 2012 16:07:28 +0000 (UTC) Received: (from bonomi@localhost) by mail.r-bonomi.com (8.14.4/rdb1) id q53G7fZG077132 for freebsd-questions@freebsd.org; Sun, 3 Jun 2012 11:07:41 -0500 (CDT) Date: Sun, 3 Jun 2012 11:07:41 -0500 (CDT) From: Robert Bonomi Message-Id: <201206031607.q53G7fZG077132@mail.r-bonomi.com> To: freebsd-questions@freebsd.org In-Reply-To: <4FCB7BBF.7090603@dreamchaser.org> Subject: Re: umount device busy 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: Sun, 03 Jun 2012 16:07:29 -0000 Gary Aitken wrote: > > Something I'm overlooking here and a lot of questions I can't seem to find the answers to... > > I mounted a usb drive > mount -t ntfs /dev/da0s1 /mnt/goflex > > Then, as nearly as I can remember... > I then poked around a bit using the xfce4 browser. > I tried to mkdir from the mount point as a normal user: > cd /mnt/goflex > %mkdir breakaway > mkdir: .: No such file or directory > After checking write premissions, which I didn't have, > I did an su -l and tried again, with the same results. > > Questions: > > 1. What does the "No such file or directory" mean from mkdir? > It's a relative dir name, and I'm sitting at a valid dir. The specific complaint was concerning '.' this indicates a filesystem error. Note: it is (or, at least 'used to be') documented that _writing_ to NTFS filesystems was likely to have problems. > > 2. How do I find out how the file-system was mounted? > mount (noargs) does not show read/write status Yes, it does. :) 'readonly' means just that. 'readonly' NOT shown means read/write. > 6. And finally, any idea why umount says the device is busy? ABSOLUTELY! *GRIN* You did a cd to a directory located on that device. you started a 'su' process. Maybe you did a cd to 'somewhere else', or maybe not. Then you tried to umount the device. The current process may have the 'working directory' open on that drive. The _PARENT_ of the su process *DOES* have the 'working directory' open there. The O/S rightly refuses to unmount the device in such a situation. :)