Re: mount point busy, can't find process holding it [solved]
On Aug 12 02:59:38, frantisek holop wrote: hi there, it seems that i have found the sequence to reliably reproduce this problem. # mount /adata # cd /adata # vnconfig svnd0 install46.iso # mount /dev/svnd0c /mnt # umount /mnt # umount /adata umount: /adata: Device busy /adata is your working directory now, as fstat will show you. # vnconfig -u svnd0 # umount /adata I don't believe it; /adata is still your working directory. I reproduced the above (/media is /adata), and I got this: # mount /media # cd /media # vnconfig svnd0 image.iso # mount /dev/svnd0 /mnt # umount /mnt # umount /media umount: /media: Device busy # fstat -f /media USER CMD PID FD MOUNTINUM MODE R/WSZ|DV root fstat 16372 wd /media 2 drwxr-x--- r 4608 root ksh27271 wd /media 2 drwxr-x--- r 4608 # vnconfig -u svnd0 # umount /media umount: /media: Device busy # fstat -f /media USER CMD PID FD MOUNTINUM MODE R/WSZ|DV root fstat 26416 wd /media 2 drwxr-x--- r 4608 root ksh27271 wd /media 2 drwxr-x--- r 4608 # cd .. # fstat -f /media USER CMD PID FD MOUNTINUM MODE R/WSZ|DV # umount /media Before you can umount the mount point, you need to both vnconfig -u the iso image, and get out of the directory. In particular, I don't believe the above sequence is real. Jan
Re: mount point busy, can't find process holding it [solved]
hmm, on Wed, Aug 12, 2009 at 09:53:57AM +0200, Jan Stary said that On Aug 12 02:59:38, frantisek holop wrote: hi there, it seems that i have found the sequence to reliably reproduce this problem. # mount /adata # cd /adata # vnconfig svnd0 install46.iso # mount /dev/svnd0c /mnt # cd # umount /mnt # umount /adata umount: /adata: Device busy /adata is your working directory now, as fstat will show you. i forgot to put that step in the mail. otherwise the example is real. -f -- i'll mention you on my organ donor card.
Re: mount point busy, can't find process holding it [solved]
On Wed, Aug 12, 2009 at 1:17 AM, patrick keshishianpkesh...@gmail.com wrote: fstat reports on open files, not files in use. as you've discovered, there are ways for a file to be in use without being open by a process. This seems educational; could you please elaborate? The kernel keeps a list of all processes, and each process keeps a list of files it has open. So this is how fstat works. At a lower level, the files for filesystem objects are backed by vnodes in the kernel, which are reference counted. When you unmount a filesystem, the kernel checks the reference count and if it's still busy, it tells you so. But there's no global list of vnodes for fstat to walk; as long as they are refcounted, vnodes can be stashed anywhere. vnconfig, core dumps, acct, and ktrace come to mind as files that the kernel would be operating on via vnodes that don't have an open process.
Re: mount point busy, can't find process holding it [solved]
hi there, it seems that i have found the sequence to reliably reproduce this problem. # mount /adata # cd /adata # vnconfig svnd0 install46.iso # mount /dev/svnd0c /mnt # umount /mnt # umount /adata umount: /adata: Device busy # vnconfig -u svnd0 # umount /adata why wasn't fstat showing this information? even doing fstat -f /adata/install46.iso returned nothing. is there another way one could have diagnosed this, except directly running vnconfig -l? # vnconfig -l vnd0: covering install46.iso on sd0a, inode 467852 vnd1: not in use vnd2: not in use vnd3: not in use (and while here, i think the output of vnconfig -l would be more useful if it showed the covered file's absolute path.) -f -- good girls go to heaven. but bad girls go everywhere!
Re: mount point busy, can't find process holding it [solved]
On Tue, Aug 11, 2009 at 8:59 PM, frantisek holopmin...@obiit.org wrote: # vnconfig svnd0 install46.iso why wasn't fstat showing this information? even doing fstat -f /adata/install46.iso returned nothing. fstat reports on open files, not files in use. as you've discovered, there are ways for a file to be in use without being open by a process.
Re: mount point busy, can't find process holding it [solved]
On Tue, Aug 11, 2009 at 8:48 PM, Ted Unangstted.unan...@gmail.com wrote: On Tue, Aug 11, 2009 at 8:59 PM, frantisek holopmin...@obiit.org wrote: # vnconfig svnd0 install46.iso why wasn't fstat showing this information? even doing fstat -f /adata/install46.iso returned nothing. fstat reports on open files, not files in use. as you've discovered, there are ways for a file to be in use without being open by a process. This seems educational; could you please elaborate? --patrick
Re: mount point busy, can't find process holding it
On Wed, Jul 29, 2009 at 04:12:56PM +0200, frantisek holop wrote: hmm, on Wed, Jul 29, 2009 at 09:56:29AM -0400, Dan Harnett said that On Wed, Jul 29, 2009 at 06:06:16AM +0200, frantisek holop wrote: amaaq$ sudo fstat /adata USER CMD PID FD MOUNTINUM MODE R/WSZ|DV NAME You should use the '-f' option to fstat. $ sudo fstat -f /adata One possibility is shared libraries or objects. (ah, so happy to see my signature in almost every unix command :]) amaaq$ sudo fstat -f /adata USER CMD PID FD MOUNTINUM MODE R/WSZ|DV no luck Are you sure you haven't mounted anything else somewhere in the filesystem you're trying to unmount? You can't unmount a filesystem if a directory in that filesystem is used as a mount point for another filesystem. -- Jurjen Oskam Savage's Law of Expediency: You want it bad, you'll get it bad.
Re: mount point busy, can't find process holding it
hmm, on Thu, Jul 30, 2009 at 12:20:51PM +0200, Jurjen Oskam said that On Wed, Jul 29, 2009 at 04:12:56PM +0200, frantisek holop wrote: hmm, on Wed, Jul 29, 2009 at 09:56:29AM -0400, Dan Harnett said that On Wed, Jul 29, 2009 at 06:06:16AM +0200, frantisek holop wrote: amaaq$ sudo fstat /adata USER CMD PID FD MOUNTINUM MODE R/W SZ|DV NAME You should use the '-f' option to fstat. $ sudo fstat -f /adata One possibility is shared libraries or objects. (ah, so happy to see my signature in almost every unix command :]) amaaq$ sudo fstat -f /adata USER CMD PID FD MOUNTINUM MODE R/WSZ|DV no luck Are you sure you haven't mounted anything else somewhere in the filesystem you're trying to unmount? You can't unmount a filesystem if a directory in that filesystem is used as a mount point for another filesystem. amaaq$ mount /dev/wd0a on / type ffs (local, noatime) /dev/sd0a on /adata type ffs (local, noatime) -f -- i often quote myself. it adds spice to my conversation.
Re: mount point busy, can't find process holding it
hmm, on Wed, Jul 29, 2009 at 12:58:42AM -0400, Brynet said that I've never had this problem before.. but according to the man page, you can forcefully remove the mount using.. your signature.. '-f'. If this fails, unplug the USB cable or power down the drive.. detaching it from the system. this is definitely a possibility. i will try forcing umounting and if it doesn't work, i will just sync, sync, sync and remove the usb key -- openbsd will handle it well. but i hoped there is a way to see what is going on, that the kernel thinks some process is still accessing the device. i am not on windows after all, unix has superb diagnostic tools to peek under the cover. -f -- incipit vita nova.
Re: mount point busy, can't find process holding it
On Wed, Jul 29, 2009 at 06:06:16AM +0200, frantisek holop wrote: amaaq$ sudo fstat /adata USER CMD PID FD MOUNTINUM MODE R/WSZ|DV NAME You should use the '-f' option to fstat. $ sudo fstat -f /adata One possibility is shared libraries or objects.
Re: mount point busy, can't find process holding it
hmm, on Wed, Jul 29, 2009 at 09:56:29AM -0400, Dan Harnett said that On Wed, Jul 29, 2009 at 06:06:16AM +0200, frantisek holop wrote: amaaq$ sudo fstat /adata USER CMD PID FD MOUNTINUM MODE R/WSZ|DV NAME You should use the '-f' option to fstat. $ sudo fstat -f /adata One possibility is shared libraries or objects. (ah, so happy to see my signature in almost every unix command :]) amaaq$ sudo fstat -f /adata USER CMD PID FD MOUNTINUM MODE R/WSZ|DV no luck -f -- there's no second chance for a good first impression.
Re: mount point busy, can't find process holding it
On Tue, Jul 28, 2009 at 9:06 PM, frantisek holopmin...@obiit.org wrote: hi there, amaaq$ uname -a OpenBSD amaaq 4.6 GENERIC#29 i386 amaaq$ sudo fstat /adata USER CMD PID FD MOUNTINUM MODE R/WSZ|DV NAME amaaq$ sudo umount /adata/ umount: /adata: Device busy what are my other choices hunting down the process that makes the mount point busy? you are not sitting in that directory? pwd? --patrick
Re: mount point busy, can't find process holding it
Type pwd, make sure you're not in it. Do the same for any terminals you have accessing that machine. On 7/29/09, frantisek holop min...@obiit.org wrote: hi there, amaaq$ uname -a OpenBSD amaaq 4.6 GENERIC#29 i386 amaaq$ sudo fstat /adata USER CMD PID FD MOUNTINUM MODE R/WSZ|DV NAME amaaq$ sudo umount /adata/ umount: /adata: Device busy what are my other choices hunting down the process that makes the mount point busy? -f -- doubt is the beginning of wisdom -- Aaron Mason - Programmer, open source addict - Oh, why does everything I whip leave me?
Re: mount point busy, can't find process holding it
hmm, on Wed, Jul 29, 2009 at 02:18:56PM +1000, Aaron Mason said that Type pwd, make sure you're not in it. Do the same for any terminals you have accessing that machine. no, i am not there. i closed all the shells too. but that would show up in fstat anyway: amaaq$ cd /adata/ amaaq$ fstat /adata/ USER CMD PID FD MOUNTINUM MODE R/WSZ|DV NAME ffstat 3434 wd /adata 2 drwxr-xr-x r 512 /adata/ fksh31362 wd /adata 2 drwxr-xr-x r 512 /adata/ btw. /adata is a usb flash device: umass0 at uhub0 port 2 configuration 1 interface 0 USB 2.0 USB Flash Drive rev 2.00/1.00 addr 2 umass0: using SCSI over Bulk-Only scsibus0 at umass0: 2 targets, initiator 0 sd0 at scsibus0 targ 1 lun 0: USB 2.0, USB Flash Drive, 0.00 SCSI2 0/direct removable sd0: 15424MB, 512 bytes/sec, 31588352 sec total -f -- senility means never having to drink just to forget.
Re: mount point busy, can't find process holding it
Hi, I've never had this problem before.. but according to the man page, you can forcefully remove the mount using.. your signature.. '-f'. If this fails, unplug the USB cable or power down the drive.. detaching it from the system. HTH. -Brynet