database creation getting hung up on a NFS mount path
(1) By anonymous on 2021-10-27 15:03:47 [link] [source]
I am trying to create create database on a NFS mount point
I create a db connection using sqlite3_open call.. As per the documentation the default VFS using on unix OS is 'unix.'
The execution gets stuck at the function sqlite3_exec
Now, if I register any other VFS like unix-excl using sqlite3_open_v2 call.. then it works fine.
The NFS s/c version used is 3.
I have few questions around this:
- Why does VFS 'unix' not work for NFS? Is it version dependent?
- The process just gets hung up on the sqlite3_exec. Can there be a way to exit from this situation?
(2) By Simon Slavin (slavin) on 2021-10-27 15:35:07 in reply to 1 [link] [source]
I can't answer your specific question because I'm not familiar enough with NFS. However before considering using NFS for a SQLite database you should read this:
https://www.sqlite.org/howtocorrupt.html#_filesystems_with_broken_or_missing_lock_implementations
Having said that, there's now a lock-testing suite for NFS4:
https://sourceforge.net/projects/locktests/
which looks useful, but I don't know enough to understand the results.
(3) By Keith Medcalf (kmedcalf) on 2021-10-28 06:03:37 in reply to 1 [source]
Now, if I register any other VFS like unix-excl using sqlite3_open_v2 call.. then it works fine.
This would indicate that the POSIX locking used when using the normal VFS is not implemented sufficiently correctly when the database file is on a remote NFS filesystem.
This is documented and expected.