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

**URL:** https://forum.tiledb.com/t/cannot-read-from-an-array-created-on-network-file-share-samba-smb/77
**Category:** Uncategorized
**Created:** [May 14, 2019, 10:27pm UTC](https://forum.tiledb.com/t/cannot-read-from-an-array-created-on-network-file-share-samba-smb/77 "2019-05-14T22:27:36Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![TileDbUser](https://avatars.discourse-cdn.com/v4/letter/t/a698b9/32.png) [@TileDbUser](https://forum.tiledb.com/u/TileDbUser)
#### Post date: [May 14, 2019, 10:27pm UTC](https://forum.tiledb.com/t/cannot-read-from-an-array-created-on-network-file-share-samba-smb/77/1 "2019-05-14T22:27:36Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![jakebolewski](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.tiledb.com/jakebolewski/32/28_2.png) [@jakebolewski](https://forum.tiledb.com/u/jakebolewski)
#### Post date: [May 14, 2019, 10:31pm UTC](https://forum.tiledb.com/t/cannot-read-from-an-array-created-on-network-file-share-samba-smb/77/2 "2019-05-14T22:31:42Z")

</div>

@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](https://docs.tiledb.io/en/stable/tutorials/concurrency-consistency.html?highlight=lustre#array-concurrency) and the warning below if that is the case.

---

<div class="post-metadata">

### Author: ![jakebolewski](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.tiledb.com/jakebolewski/32/28_2.png) [@jakebolewski](https://forum.tiledb.com/u/jakebolewski)
#### Post date: [May 14, 2019, 10:34pm UTC](https://forum.tiledb.com/t/cannot-read-from-an-array-created-on-network-file-share-samba-smb/77/3 "2019-05-14T22:34:32Z")

</div>

Also [https://github.com/TileDB-Inc/TileDB/issues/1260](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.

---

<div class="post-metadata">

### Author: ![TileDbUser](https://avatars.discourse-cdn.com/v4/letter/t/a698b9/32.png) [@TileDbUser](https://forum.tiledb.com/u/TileDbUser)
#### Post date: [May 14, 2019, 11:34pm UTC](https://forum.tiledb.com/t/cannot-read-from-an-array-created-on-network-file-share-samba-smb/77/4 "2019-05-14T23:34:22Z")

</div>

@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?

---

<div class="post-metadata">

### Author: ![jakebolewski](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.tiledb.com/jakebolewski/32/28_2.png) [@jakebolewski](https://forum.tiledb.com/u/jakebolewski)
#### Post date: [May 15, 2019, 12:20am UTC](https://forum.tiledb.com/t/cannot-read-from-an-array-created-on-network-file-share-samba-smb/77/5 "2019-05-15T00:20:06Z")

</div>

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](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](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.

---

<div class="post-metadata">

### Author: ![seth](https://avatars.discourse-cdn.com/v4/letter/s/f14d63/32.png) [@seth](https://forum.tiledb.com/u/seth)
#### Post date: [May 15, 2019, 12:43am UTC](https://forum.tiledb.com/t/cannot-read-from-an-array-created-on-network-file-share-samba-smb/77/6 "2019-05-15T00:43:10Z")

</div>

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](https://github.com/TileDB-Inc/TileDB/issues/1260) to have the ability to disable file locking on posix mounts.

---

<div class="post-metadata">

### Author: ![TileDbUser](https://avatars.discourse-cdn.com/v4/letter/t/a698b9/32.png) [@TileDbUser](https://forum.tiledb.com/u/TileDbUser)
#### Post date: [May 15, 2019, 5:56pm UTC](https://forum.tiledb.com/t/cannot-read-from-an-array-created-on-network-file-share-samba-smb/77/7 "2019-05-15T17:56:35Z")

</div>

Thank you. That was helpful.

---

<div class="post-metadata">

### Author: ![tyler](https://avatars.discourse-cdn.com/v4/letter/t/35a633/32.png) [@tyler](https://forum.tiledb.com/u/tyler)
#### Post date: [May 29, 2019, 6:22pm UTC](https://forum.tiledb.com/t/cannot-read-from-an-array-created-on-network-file-share-samba-smb/77/8 "2019-05-29T18:22:03Z")

</div>

Hi @TileDbUser, just letting you know that we’ve just merged a PR to close [https://github.com/TileDB-Inc/TileDB/issues/1260](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`.

---

<div class="post-metadata">

### Author: ![TileDbUser](https://avatars.discourse-cdn.com/v4/letter/t/a698b9/32.png) [@TileDbUser](https://forum.tiledb.com/u/TileDbUser)
#### Post date: [June 6, 2019, 5:01pm UTC](https://forum.tiledb.com/t/cannot-read-from-an-array-created-on-network-file-share-samba-smb/77/9 "2019-06-06T17:01:35Z")

</div>

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