Install Subversion repository on a nfs share

This howto describes how to install subversion on debian with the repository on a mounted nfs share.

1. Installation

aptitude install subversion libapache2-svn

2. Create the repository

mkdir /mnt/nfsshare/svn/
svnadmin create --fs-type fsfs /mnt/nfsshare/svn/project1

The path /mnt/nfsshare is the mountpoint of the NFS share, please make sure you use the fsfs filesystem type for your repository. You need this type for NFS support.

3. Permissions

chown -R www-data:www-data /mnt/nfsshare/svn/*
chmod -R 770 /var/svn-repos/*

4. Enable WebDAV

a2enmod dav
a2enmod dav_svn

5. Access Controll

Create an htaccess password file:

htpasswd2 -c /etc/apache2/svn.passwd your_username

6. Configurate SVN

<location   /project1>
    DAV svn
    SVNPath /mnt/nfsshare/svn/project1
    AuthType Basic
    AuthName "Subversion Repository"
    AuthUserFile /etc/apache2/svn.passwd
    Require valid-user

Edit the file “/etc/apache2/mods-available/dav_svn.conf”:

7. Restart the Apache Webserver

/etc/init.d/apache2 restart

8. Connect to your subversion server

Now you can create a connection to your subversion server with your subversion client.

9. Problems

9.1 “svn: Can’t get exclusive lock on file ‘/mnt/nfsshare/svn/project1/db/txn-current-lock’: No locks available”

Check the logs on your NFS server:

tail /var/log/messages
kernel: lockd: cannot monitor nfs -Client-Name/IP

You get this error because there is a problem with the rpc.statd service.

Check if it is running:

ps -ef | grep stat

You can start this service per hand by running:


Now your subversion commit should work.

This service is part of “nfs-common” you start this service on system startup:

update-rc.d nfs-common defaults

Schreibe einen Kommentar

eMail-Benachrichtigung bei weiteren Kommentaren.
Auch möglich: Abo ohne Kommentar.

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.