Cannot read from an array created on network file share (Samba / SMB)

I just created an array on a network location and it does create all the attribute fragments along with the __lock.tdb file all fine. However, when I try to read from it. It does throw following error.

libc++abi.dylib: terminating with uncaught exception of type tiledb::TileDBError: [TileDB::IO] Error: Cannot lock filelock ‘/path/to/file/tile-db/quickstart_dense_array/__lock.tdb’; Operation not supported
Abort trap: 6

I do have rwx permission on this file. I also tried running the executable as a sudo user but nothing seems to be helping on this one. Any ideas on what could be wrong?

@TileDbUser I am guessing that the “network location” is a distributed file system? What distributed file system are you using? If you are using Lustre you need to explicitly mount the filesystem with filelocking enabled, see https://docs.tiledb.io/en/stable/tutorials/concurrency-consistency.html?highlight=lustre#array-concurrency and the warning below if that is the case.

Also https://github.com/TileDB-Inc/TileDB/issues/1260 may help (in the future), but it would be good to know the exact system you are using to diagnose the problem and if the above is a relevant escape hatch.

@jakebolewski: Thanks for fast reply. It is a //smb drive mounted on my mac. I am not very sure about what filesystem it is underneath. It definitely is not HDFS or S3. I went ahead and found some internal doc and the docs have pointed out that these drives support following protocols/filesystem. Also, since Lustre is an AWS tech. it is definitely not that.

  • NFS
  • CIFS/SMB

Do you guys support locking on these protocols?

SMB signifies the Samba server / shared file system. Samba IIRC does support Posix file locking semantics (or best effort as they need to be translated to Windows Oplocks) but this is a configuration parameter, see https://www.oreilly.com/openbook/samba/book/ch05_05.html for more details.

Immediate steps would be to see if it’s easy to configure posix locking on your SMB file share, otherwise https://github.com/TileDB-Inc/TileDB/issues/1260 will most likely be helpful if your writes and reads do not overlap and any consolidation is offline (not during writes or reads). File locking is used to support consistent operations for intermixed reads / writes and consolidation.

If the underlying filesystem is a netapp or other shared storage, you might try mounting it via NFS also. As @jakebolewski pointed out depending on the configuration of the remote file system file locking may or may not be enabled. It also can be toggled on a per protocol level. If NFS mounting and samba mounting doesn’t work you’ll have to wait for the issue #1260 to have the ability to disable file locking on posix mounts.

Thank you. That was helpful.

Hi @TileDbUser, just letting you know that we’ve just merged a PR to close https://github.com/TileDB-Inc/TileDB/issues/1260.

If you rebuild TileDB from the most recent dev branch you can now disable file locking by setting the config parameter vfs.file.enable_filelocks to false.

Hi @tyler, thank you so much for your response. This is helpful information. I will go ahead and give it a shot.