NFS3 上的 SVN 服务器“数据库已锁定”
尽管有很多关于此错误的主题,但我在设置 av SVN 服务器时仍然遇到问题。服务器在 Scientific Linux 6 上运行,存储库应该通过 NFS3 存储在 SUNOS 存储服务器上。
我读到使用“nolocks”选项安装可以解决问题,但我不想这样做,因为很多用户同时在服务器上工作,我想删除锁会产生新问题。
SVN 已安装,正在处理本地文件,但是当我尝试在远程位置创建存储库时,会创建文件,但收到错误“数据库已锁定”并且无法使用该存储库。我使用 fsfs 系统,它应该可以与 NFS 一起正常工作。
有人可以为我提供其他选择吗?
Despite a lots of topics about this error, I'm still having trouble with setting up av SVN Server. Server is running on Scientific Linux 6 and repositories are supposed to be stored via NFS3 on a SUNOS Storage server.
I read that mounting with "nolocks" options would solve the problem but I don't want to do so as a lot of users are working at the same time on the server, I guess removing the locks would create new problems.
SVN is installed, working on local files, but when I try to create a repo on distant location, files are created but I get the error "database is locked" and cannot use the repo. I use the fsfs system which is supposed to work fine with NFS.
Would anyone have another option for me ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好的,我最终在 NFS 服务器上设置了一个新共享,只能由我的 SVN 服务器访问,并使用“nolock”安装在那里。然后它就可以工作了,但不是重点,我仍然不知道如何在不移除锁的情况下进行设置。
OK I eventually set up a new share on the NFS server, accessible by my SVN server only, mounted there with "nolock". Then it works, but not really the point, I still don't know how to set that up without removing the locks.
NFS 客户端通常会使用 NFS 锁定管理器 (NLM) 将 NFS 服务器上某些文件的锁定与访问/锁定相同文件的其他 NFS 客户端同步。 nolock 挂载选项告诉 NFS 客户端不要使用 NFS 锁定管理器,而是在 NFS 客户端计算机本身上本地管理锁定。如果您只有 1 个 NFS 客户端或多个 NFS 客户端(其中每个客户端在导出的文件系统的不同区域上工作,这样就不会出现锁争用),这会非常有用。
看起来您有以下内容:
(A) SVN_Client ==> (B) SVN_Server/NFS_Client ==> (C) NFS_Server
其中:服务器 (B) 是 Scientific linux 6,为客户端提供 SVN 服务并从服务器 (C)(SunOS)安装贮存服务器。。
假设您没有从 NFS 服务器安装其他计算机并提供相同的 SVN 服务,则 nolock 选项将正常工作,因为服务器 (B) 将在本地执行所有锁定管理。无需/要求在 NFS 服务器上集中锁定。
对于您在问题中提到的 NFSv3 来说也是如此。
An NFS client will normally use the NFS Lock Manager (NLM) to synchronize locking of certain files on the NFS server with other NFS client accessing/locking the same files. The nolock mount option tells the NFS client not to use the NFS Lock Manager but instead to manage the locks locally on the NFS client machine itself. This is useful if you only have 1 NFS client or several NFS clients where each client works on a different area of the exported file system so that there is no lock contention.
It looks like you have the following:
(A) SVN_Client ==> (B) SVN_Server/NFS_Client ==> (C) NFS_Server
Where: Server (B) is Scientific linux 6 providing SVN services to clients and mounting from Server (C), the SunOS Storage Server.
Assuming you have no other machine mounting from the NFS server and providing the same SVN services, the nolock option will work correctly as server(B) will do all the lock management locally. There is no need/requirement to lock centrally on the NFS server.
This is true for NFSv3 which you mentioned in your question.