How to move the svn server data to new partition?

4 views
Skip to first unread message

Bo Berglund

unread,
May 9, 2023, 1:08:39 PM5/9/23
to us...@subversion.apache.org
I am running a backup subversion server on an Ubuntu 20.04.6 LTS SERVER.
The subversion version is: 1.13.0 (r1867053)

The subversion data are located in /var/lib/svn and it has caused the root
file system to be all used up such that much don't work anymore like apt...

The root partition is 30 GB and the svn data is about 18 GB of that…

$ du -c -h -s /var/lib/svn/
18G /var/lib/svn/
18G total

I need to fix this urgently and therefore I want to know how to go about it.

Currently there is a spare partition on the disk which is currently mounted in the /home tree:
$ df -h
...
/dev/nvme0n1p7 79G 56M 75G 1% /home/bosse/data
...

In /etc/fstab it is mounted like this:

#So far unused data partition on main drive (will not be visible across NFS share...):
UUID=fb4a08b7-378e-42eb-9b7a-2c7b4f85cd06 /home/bosse/data ext4 nodev,nosuid 0 2


Can I use this data drive by this sequence of commands:
1) Stop the subversion service (how?)

2) Move /var/lib/svn to the root of the so far unused data drive
sudo mv /var/lib/svn /home/bosse/data
thus freeing up the 18GB of data used by svn

3) Edit the /etc/fstab entry such that it will mount the copied dir into /var/lib as svn

UUID=fb4a08b7-378e-42eb-9b7a-2c7b4f85cd06 /var/lib/svn ext4 nodev,nosuid 0 2
(Do I need to create the /var/lib/svn dir manually or will the mount make it work?)

4) Restart the subversion service

Will this be transparent to subversion (i.e. it will not notice) or do I have to do some extra configurations?
I am a bit confused about what happens for certain commands, like the mv above.
Will it create a svn dir on the target or will it just fill the target with the data?

Grateful for any help!
(I tried to post a question about this via Gmane but it seems not to reach the list so I post directly now.)

--
Bo Berglund
Developer in Sweden

Bo Berglund

unread,
May 9, 2023, 2:26:34 PM5/9/23
to us...@subversion.apache.org
I fixed it by using the steps above:
------------------------------------
1) sudo systemctl stop apache2
2) sudo mv /var/lib/svn/* /home/user/data
3) Fstab: UUID=fb4a08b7-378e-42eb-9b7a-2c7b4f85cd06 /var/lib/svn ext4
nodev,nosuid 0 2
4) sudo systemctl start apache2

Now the svn dir and below are on the other partition and the system behaves
normally with an 18GB margin for / being full.
Reply all
Reply to author
Forward
0 new messages