[Samba] Can Samba lock files until copy is complete?

Michael Wood esiotrot at gmail.com
Sun Aug 22 07:27:54 MDT 2010


On 21 August 2010 15:12, Whit Blauvelt <whit+samba at transpect.com> wrote:
> On Sat, Aug 21, 2010 at 02:17:08PM +0200, Michael Wood wrote:
[...]
>> If you can't control the filenames, try using something like incron to
>> process the files only when they have been closed.  Or use lsof to
>> check if samba still has the files open.  I don't know how reliable
>> that will be, but perhaps it's another heuristic to add to your "not
>> changed size for a while" check.
>
> incron? Don't know/can't find it.

It's the first link I get when googling for it.  It's also available
in some Linux distributions.  e.g. in recent versions of Ubuntu (8.04
or later), just apt-get install incron.

Here's the homepage:
http://inotify.aiken.cz/?section=incron&page=about&lang=en

> Good suggestion on lsof. If it turns out
> that Samba doesn't do anything strange like close a file at an intermediate
> state, then reopen and resume copying that might work perfectly.

Yes, I have no idea if it's possible for Samba to close the file in
the middle and then re-open it.

-- 
Michael Wood <esiotrot at gmail.com>


More information about the samba mailing list