works fine
but if i serve the same dir contents out of a nfs mounted directory (vers=3), it hangs on startup
these are strace's last words:
fstat(3, {st_mode=S_IFREG|0644, st_size=56111104, ...}) = 0
newfstatat(AT_FDCWD, "/home/user/dev/server/data.db", {st_mode=S_IFREG|0644, st_size=56111104, ...}, 0) = 0
pread64(3, "SQLite format 3\0\20\0\2\2\f@ \0\0\22n\0\0005\203"..., 100, 0) = 100
fcntl(3, F_SETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1073741824, l_len=1}
data.db is sqlite
any clue?
what are the flags used to open the database?
While the NLM protocol has fields in its lock requests to uniquely identify the process on the client that locked the file, the NFS protocol has no fields to identify the processes that are doing writes or reads. The file is advisory locked, and it has the mandatory lock permissions set, yet the NFS server has no way of knowing if the process that sent the write request is the same one that obtained the lock. Thus, the NFS server cannot lock the file on behalf of the NFS client. For this reason, some NFS servers, including Solaris servers, refuse any read or write to a file with the mandatory lock permissions set. docstore.mik.ua/orelly/networking_2ndEd/nfs/ch11_02.htm
https://datatracker.ietf.org/doc/rfc3530/ for reference
I mean SQLite + NFS sounds pretty cursed already
yea i don't do that eventually ill keep the db on the machine, storage on nfs
Обсуждают сегодня