[Samba] CTDB and locking issues in 4.4.6 (Classic domain)
Martin Schwenke
martin at meltin.net
Mon Nov 7 05:42:14 UTC 2016
Hi Volker,
On Fri, 4 Nov 2016 08:12:02 +0100, Volker Lendecke via samba
<samba at lists.samba.org> wrote:
> On Thu, Nov 03, 2016 at 09:21:46PM +0000, Alex Crow via samba wrote:
> > [root at zalma ~]# stat testfile
> > ...
> > Size: 1286700 Blocks: 2514 IO Block: 65536 regular file
> > Device: 29h/41d Inode: 35820037 Links: 1
> > Access: (0774/-rwxrwxr--) Uid: ( 3535/ jh3) Gid: ( 513/Domain Users)
> > Access: 2016-11-03 19:51:46.000000000 +0000
> > Modify: 2016-11-01 13:06:04.000000000 +0000
> > Change: 2016-11-01 13:06:04.000000000 +0000
> > Birth: -
> > [root at zalma ~]# ssh zearing "stat testfile"
> > root at zearing's password:
> > ...
> > Size: 1286700 Blocks: 2514 IO Block: 65536 regular file
> > Device: 29h/41d Inode: 35820037 Links: 1
> > Access: (0774/-rwxrwxr--) Uid: ( 3535/ jh3) Gid: ( 513/Domain Users)
> > Access: 2016-11-03 19:51:46.000000000 +0000
> > Modify: 2016-11-01 13:06:04.000000000 +0000
> > Change: 2016-11-01 13:06:04.000000000 +0000
> > Birth: -
> > [root at zalma ~]# ssh metropolis "stat testfile"
> > root at metropolis's password:
> > ...
> > Size: 1286700 Blocks: 2514 IO Block: 65536 regular file
> > Device: 26h/38d Inode: 35820037 Links: 1
> > Access: (0774/-rwxrwxr--) Uid: ( 3535/ jh3) Gid: ( 513/Domain Users)
> > Access: 2016-11-03 19:51:46.000000000 +0000
> > Modify: 2016-11-01 13:06:04.000000000 +0000
> > Change: 2016-11-01 13:06:04.000000000 +0000
> > Birth: -
> >
> > NB this is a FUSE mounted FS.
> >
> > What does the Device: XXh/YYd mean?
>
> That's the so-called device number. Unix concept from the early days.
>
> You can use
>
> vfs objects = fileid
>
> and
>
> fileid:mapping = fsname
>
> to fix this issue.
I'm going to document this in the wiki (at current non-existent
https://wiki.samba.org/index.php?title=Setting_up_a_cluster_filesystem&action=edit&redlink=1).
It is already mentioned under OCFS2 section
(https://wiki.samba.org/index.php/CTDB_Setup#OCFS2) without explanation.
According to
https://www.samba.org/samba/docs/man/manpages/vfs_fileid.8.html
which I will point to from the wiki, the modern way seems to be to use
fileid:algorithm = fsname
instead of
fileid:mapping = fsname
Just a few quick questions:
* This is only done at connect time so there's no performance penalty?
That's my reading of the code but I didn't want to turn this into
a "let's learn all about the VFS" exercise. :-)
* If the device name is different across nodes then this doesn't help.
I was wondering why there isn't an choice to hash m->mnt_dir since
that will always be the same on each node (if you want a consistent
share definition across the cluster). Perhaps there's no cluster
filesystem so far that has needed this but has had inconsistent
device names?
* Is there anything similar for inconsistent/unstable inode numbers?
That would clearly come with a performance penalty... unless
caching, which is always an easy problem to solve... :-)
Thanks...
peace & happiness,
martin
More information about the samba
mailing list