# Unmounting NTFS slice fails



## Bunyan (May 7, 2013)

Hello, gentlemen!

Recently I've encountered a problem: whenever I try to `unmount` an NTFS filesystem, 
I get this message -


```
$ sudo umount /dev/ada0s4
umount: unmount of /Data failed: Device busy
```

On ttyv0 the kernel spits out 
	
	



```
ntfs_unmount: vflush failed: 16
```
What could be the solution to this nasty thing?

Thank you for your time.


----------



## Beastie (May 7, 2013)

Are you sure it's not something simple like a file browser with a directory still open or a terminal that hasn't cd-ed out of a directory?

Also, try unmounting the mount point instead of the device.


----------



## Bunyan (May 7, 2013)

1) What could be simpler than the system console? 
2) Why would I unmount a mount point which is not listed in fstab?

Still, the result is the same:

```
$ df
Filesystem   1K-blocks     Used     Avail Capacity  Mounted on
/dev/ada0s2a   1015324   329568    604532    35%    /
devfs                1        1         0   100%    /dev
/dev/ada0s2d   3044988   492416   2308976    18%    /var
/dev/ada0s2e   3044988  1015216   1786176    36%    /usr
/dev/ada0s2f  71085500 49214932  16183728    75%    /usr/local
/dev/ada0s2g  16999964 12320192   3319776    79%    /home
linprocfs            4        4         0   100%    /compat/linux/proc
linsysfs             4        4         0   100%    /compat/linux/sys
procfs               4        4         0   100%    /proc
/dev/md0       2237468       64   2237404     0%    /tmp
/dev/ada0s5  133427824 21567116 111860708    16%    /Data
 $ sudo umount /Data/
umount: unmount of /Data failed: Device busy
```


----------



## Beastie (May 7, 2013)

Bunyan said:
			
		

> 1) What could be simpler than the system console?


What I meant is this:
`mount /dev/device /mnt/mountpoint`
`cd /mnt/mountpoint`
`umount /mnt/mountpoint`
The above will result in a "device busy" error. You'd need to cd out of the directory first. Maybe another ttyv is still using it.



			
				Bunyan said:
			
		

> 2) Why would I unmount a mount point which is not listed in fstab?


It doesn't need to be in /etc/fstab. umount(8) can use any of these: "special device or remote node (rhostath), the path to the mount point node or by the file system ID fsid".




			
				Bunyan said:
			
		

> Still, the result is the same:
> [...]
> umount: unmount of /Data failed: Device busy


Okay, try `fstat -f /Data` or `fuser -cu /Data`. These will return the PIDs of all the processes that are currently using your device. It will give you hints on what to stop/kill.

If all else fails, force the unmount with the *-f* option. Let me stress the "if all else fails".


----------



## Bunyan (May 7, 2013)

> You'd need to cd out of the directory first.


Please be more considerate and do not treat old forum members like dummies.

There is one process (gam_server) that does not allow to unmount the NTFS partition.


----------



## wblock@ (May 7, 2013)

gamin can be told to ignore that directory.  You won't see updates to that device or directory unless you manually refresh, or at least that's what it does here.  See http://people.gnome.org/~veillard/gamin/config.html.


----------

