Locking, notify collisions using CTDB on non-clustered share?
Christopher R. Hertel
crh at samba.org
Sun Apr 15 01:10:48 UTC 2018
So...
The vfs_fileid module helps. I'm using the fsid algorithm and that has
resolved several of the errors that were being generated.
...but not all of them. I have found that I also need to change the share
path so that the non-clustered shares each have different paths.
For example:
Node | ShareName | Path
1 | EXT4-1 | /mnt/ext4/sambaShare
2 | EXT4-2 | /mnt/ext4/sambaShare
With that setup, when I run the smb2.notify torture test, I get errors like
this:
ERROR: nchanges=1 action=2 expectedAction=3 filter=0x00000020
and this:
(../source4/torture/smb2/notify.c:437) wrong value for
notify.smb2.out.num_changes 0x14 should be 0x9
These are generated when I run smbtorture against both shares _at the same
time_. There is a certain randomness involved, of course, but these or
similar errors are generated quite reliably with this configuration.
All I have to do is change the paths to:
Node | ShareName | Path
1 | Node-1 | /mnt/ext4/sambaShare-1
2 | Node-2 | /mnt/ext4/sambaShare-2
(...making sure, of course, that those directories exist). Now the errors
magically disappear. (Well, there are some "change_time not setup" but
these also occur on a non-clustered, single instance server so I assume that
they are "normal").
So it seems that the lookup key for Change Notify events is the full local
pathname, not dev/inode.
Some more example errors seen when the share paths are the same (3-node
cluster):
[172.31.47.126] (../source4/torture/smb2/notify.c:118) Incorrect status
NT_STATUS_INVALID_PARAMETER - should be NT_STATUS_OK
[172.31.47.126] (../source4/torture/smb2/notify.c:324) wrong value for
notify.smb2.out.num_changes 0xa should be 0x4
[172.31.47.126] (../source4/torture/smb2/notify.c:636) wrong value for
notify.smb2.out.num_changes 0xb should be 0x9
[172.31.47.194] (../source4/torture/smb2/notify.c:118) Incorrect status
NT_STATUS_INVALID_PARAMETER - should be NT_STATUS_OK
[172.31.47.194] (../source4/torture/smb2/notify.c:394) wrong value for
notify.smb2.out.num_changes 0xb should be 0xa
[172.31.47.194] (../source4/torture/smb2/notify.c:636) wrong value for
notify.smb2.out.num_changes 0xe should be 0x9
[172.31.39.200] (../source4/torture/smb2/notify.c:118) Incorrect status
NT_STATUS_INVALID_PARAMETER - should be NT_STATUS_OK
[172.31.39.200] (../source4/torture/smb2/notify.c:324) wrong value for
notify.smb2.out.num_changes 0xa should be 0x4
[172.31.39.200] (../source4/torture/smb2/notify.c:634) Incorrect status
STATUS_NOTIFY_ENUM_DIR - should be NT_STATUS_OK
Chris -)-----
More information about the samba-technical
mailing list