opportunistic locking??

ThomasVdB
Posts: 9
Joined: Wed Jan 07, 2009 3:02 am

opportunistic locking??

Postby ThomasVdB » Wed Jan 07, 2009 3:05 am

Hey all, I have the following problem...

I used to use Amahi with fedora 8, and my syncronisation worked, I did what it had to do, perfectly.

I recently installed fedora 9 and amahi, because that version of amahi is more updated. but now the following problem states:
I can't synchronize anymore because the function that allows opportunistic locking isn't enabled... does anyone know how to enable it on my fedora?

(opportunistic locking is necessary for sync. The sync software temp. blocks the files so that nobody can change them will syncronizing)

Thanks!

User avatar
cpg
Administrator
Posts: 2618
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: opportunistic locking??

Postby cpg » Wed Jan 07, 2009 3:28 am

well, i am not sure what may have changed, since it's been a while and versions of samba have changed, etc.

oplocks are set by default, though.

one thing you can do is this:

Code: Select all

bash$ testparm -s -v > /tmp/full-smb.conf
this will give you a full dump of your samba settings. here is what i get for locks, which should be identical to yours (except i am running the Fedora 8 version of Amahi, if you can believe it -- with amahi fully updated, of course :) ):

Code: Select all

bash$ grep -i lock /tmp/full-smb.conf kernel oplocks = Yes lock spin time = 200 oplock break wait time = 0 lock directory = /var/lib/samba block size = 1024 veto oplock files = blocking locks = Yes fake oplocks = No locking = Yes oplocks = Yes level2 oplocks = Yes oplock contention limit = 2 posix locking = Yes strict locking = Auto bash$
it does look like all the settings are there for locking, including oplocks, which is what i think you need.

maybe you can try tweaking your settings until it works and report back?

soon we will be able to add settings for global options in samba, so perhaps if you find a solution we can turn it into an option ...
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

ThomasVdB
Posts: 9
Joined: Wed Jan 07, 2009 3:02 am

Re: opportunistic locking??

Postby ThomasVdB » Wed Jan 07, 2009 4:32 am

I have the exact same settings as you...

however...

Synchronizing with the default amahi shares (books, music, movies, ...) works perfectly, but with my own added shares it doesn't work :o

Maybe that's the difference... in fedora 8 I added my shares manually in Samba, now I sued the amahi file sharing (I know that it alsy workes with samba, but maybe that adds different settings to a share?)
any ideas?
Last edited by ThomasVdB on Wed Jan 07, 2009 5:48 am, edited 1 time in total.

User avatar
cpg
Administrator
Posts: 2618
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: opportunistic locking??

Postby cpg » Wed Jan 07, 2009 5:48 am

hmm. the clue is to look as to how your share is different than the default ones.

does your share use a different file system? (say, ntfs?)
that could affect things, i imagine.

any simple way i can reproduce it?
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

ThomasVdB
Posts: 9
Joined: Wed Jan 07, 2009 3:02 am

Re: opportunistic locking??

Postby ThomasVdB » Wed Jan 07, 2009 10:05 am

Yep, the directory that I share is a different partition, and indeed, ntfs...
well if you can tell me where I have to look I can compare hehe...

euhm I Think the easy way to reproduce it is to add a ntfs hd into your amahi and add it as a share using the amahi webinterface...

ThomasVdB
Posts: 9
Joined: Wed Jan 07, 2009 3:02 am

Re: opportunistic locking??

Postby ThomasVdB » Mon Jan 12, 2009 7:46 am

help ??

User avatar
cpg
Administrator
Posts: 2618
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: opportunistic locking??

Postby cpg » Mon Jan 12, 2009 1:06 pm

sorry. been sidetracked.

not that easy to reproduce (more so if one doesn't usually run XP, or have ntfs drives around ;) ).

you have to tell us what you run to see the effect of the bug too.

we have access to a samba developer in the IRC channel, and we'll ask him.

however, it would seem that perhaps the kernel driver for the file system in the OS is the part that does not support the locking.

have you tried fake oplocks?
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

obnox
Posts: 6
Joined: Mon Jan 12, 2009 4:29 pm

Re: opportunistic locking??

Postby obnox » Mon Jan 12, 2009 4:32 pm

Hi,

I suspect that NTFS is the problem here:
NTFS support under linux is rather experimental.
And I am not sure to what exent oplocks are supported here.

What is the exact problem you are seeing?
What kind of sync app are you using?

Did the same NTFS partition work with your previous Fedora8
installation? Or is the NTFS partition new?

I suggest you try setting "kernel oplocks = no" and see if
your application starts working again.

Cheers - Michael

ThomasVdB
Posts: 9
Joined: Wed Jan 07, 2009 3:02 am

Re: opportunistic locking??

Postby ThomasVdB » Tue Jan 13, 2009 3:36 am

I tried both solutions, doesn't work...

I was also wrong about a previous statement, it doesn't sync with the default amahi shares... same error...
I'm using Vista with the built-in sync centrum, wich always worked with fedora 8 (and yes, stille using the same ntfs hd...)
I'm now going to try to delete all shares in the hda setup, and add them manually in the samba menu (wich I did on fedora 8)...

ThomasVdB
Posts: 9
Joined: Wed Jan 07, 2009 3:02 am

Re: opportunistic locking??

Postby ThomasVdB » Tue Jan 13, 2009 3:59 am

hmm and that didn't even work :(
I guesse it's best for me to go back to fedora 8... so it is perfectly possible to have fedora 8 with amahi fulle updated? I'll check tis know cause this sync problem is driving me crazy...

Who is online

Users browsing this forum: No registered users and 70 guests