[Samba] Samba block my usbkey umount operation

Chris Weiss cweiss at gmail.com
Thu Mar 24 12:43:12 MDT 2011


On Thu, Mar 24, 2011 at 11:52 AM, Anthony Viallard <avd at patatrac.info> wrote:
> Hi,
>
> I have an issue with samba (version 2.0.10) on my embedded platform.
>
> I have:
>  * created a hotplug script which mount usbkey;
>  * a webui page to  share usbkey directories with samba and another page for
> ejecting (sync and umount) usbkey.
>
> But, if i copy an file with samba to a share stored in my usbkey and do the
> eject function in my webui, the umount failed (device is busy). I must wait
> before the umount success. There a no dirty pages in my memory which must
> writeback to the usbkey, so, i think samba continues to handle the file
> copied and after XX seconds, release it ...
>

I think as long as a client is connected, samba will keep a lock on
the directory to monitor for file changes, though i could be wrong.

scripting an lsof to get the smbd pid that is using the mountpoint and
killing right before the umount should work.


More information about the samba mailing list