fcntl() file locking is implemented on NFS Share

marnog

Cadet
Joined
Nov 2, 2020
Messages
5
Dear Communities, Truenas developers.

fcntl() file locking is implemented on NFS Share in Truenas Scale.
I need to run sqlite3 need fcntl() file locking to run without make corructions of database.

Thank you

Kind Regards.
 

marnog

Cadet
Joined
Nov 2, 2020
Messages
5
Dear jgreco. I need running a apps conected to nfs running truenas scale and want to be shure the fcntl() file locking is implemented on NFS Share in Truenas Scale ?
is implemented ?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
C'mon master grinch. Probably English is not their native language. Let me make a bold guess from the very first post.

They want to run SQLite on an NFS share and ask IF fcntl() style locking is provided by TrueNAS.

Unfortunately I cannot answer that question because I have been running NFS long enough to have learned that one does not simply put anything that requires any locking on an NFS share. No mail spools, no databases, just don't. I lost interest and have no idea if NFSv4 provides a proper locking mechanism. Mainly because running concurrent "database" accesses over file sharing protocols is a bad idea to begin with and real database servers exist.

@marnog I would try to avoid putting any effort into a setup like this and research if e.g. MariaDB or PostgreSQL can be used instead of SQLite.
 

marnog

Cadet
Joined
Nov 2, 2020
Messages
5
C'mon master grinch. Probably English is not their native language. Let me make a bold guess from the very first post.

They want to run SQLite on an NFS share and ask IF fcntl() style locking is provided by TrueNAS.

Unfortunately I cannot answer that question because I have been running NFS long enough to have learned that one does not simply put anything that requires any locking on an NFS share. No mail spools, no databases, just don't. I lost interest and have no idea if NFSv4 provides a proper locking mechanism. Mainly because running concurrent "database" accesses over file sharing protocols is a bad idea to begin with and real database servers exist.

@marnog I would try to avoid putting any effort into a setup like this and research if e.g. MariaDB or PostgreSQL can be used instead of SQLite.
Hello Patrick
Thank you for the answers.
Yes i am not English native speakers.

Truenas scale is full compliance on the rfc7530 ?

On the next days i will try and share my experience.

Thank you

Kind regards.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
@marnog As I wrote I do not know and I would strongly discourage running a database over NFS. Can the product in question not make use of a real database server?
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,553
@marnog As I wrote I do not know and I would strongly discourage running a database over NFS. Can the product in question not make use of a real database server?
Indeed.

Locking was part of NFS4 protocol (RFC3530) from the beginning (it was implemented for v3 servers via NLM sideband protocol -- rpc.lockd). But generally people have had such a poor experience over time with locking over NFS that most clients have an option to do "local locking", which I'm sure will not result in fun times while trying to implement multi-client access to an sqlite database.

Relying on an sqlite database on an NFS share just seems like bad design.
 
Top