System Administration
Posted By Luca

How to move applications from one volume to another on Synology


Today I want show you a solution to move Synology applications from one volume to another. In my case, I will move it from Volume 1 to Volume 2.

Preparation

First of all you need to stop all the applications manually (open the application manager in the DSM). After this connect to your synology over SSH (enable it if not done yet).

Migration

Now we move all the applications from Volume 1 to the new Volume (in my case Volume 2):

mv /volume1/@appstore/* /volume2/@appstore/

Then we need to find out which applications have a link to the old volume:

find /var/packages/ -type l -ls | grep volume1

The output, depending on which applications you have installed, should look like this:

4480 0 lrwxrwxrwx 1 root root 34 Nov 4 18:39 /var/packages/DownloadStation/target -> /volume1/@appstore/DownloadStation
18333 0 lrwxrwxrwx 1 root root 28 Nov 4 18:39 /var/packages/VPNCenter/target -> /volume1/@appstore/VPNCenter
23299 0 lrwxrwxrwx 1 root root 28 Nov 4 18:40 /var/packages/DNSServer/target -> /volume1/@appstore/DNSServer
7021 0 lrwxrwxrwx 1 root root 31 Nov 4 18:39 /var/packages/VideoStation/target -> /volume1/@appstore/VideoStation
18325 0 lrwxrwxrwx 1 root root 30 Nov 4 18:40 /var/packages/MediaServer/target -> /volume1/@appstore/MediaServer
23973 0 lrwxrwxrwx 1 root root 31 Nov 4 18:41 /var/packages/CloudStation/target -> /volume1/@appstore/CloudStation
19596 0 lrwxrwxrwx 1 root root 28 Nov 4 18:41 /var/packages/AntiVirus/target -> /volume1/@appstore/AntiVirus
23175 0 lrwxrwxrwx 1 root root 34 Nov 4 18:38 /var/packages/StorageAnalyzer/target -> /volume1/@appstore/StorageAnalyzer

For each application you need to create a new simbolic link replacing the old one:

ln -sfn /volume2/@appstore/DownloadStation /var/packages/DownloadStation/target
ln -sfn /volume2/@appstore/VPNCenter /var/packages/VPNCenter/target
ln -sfn /volume2/@appstore/DNSServer /var/packages/DNSServer/target
ln -sfn /volume2/@appstore/VideoStation /var/packages/VideoStation/target
ln -sfn /volume2/@appstore/MediaServer /var/packages/MediaServer/target
ln -sfn /volume2/@appstore/CloudStation /var/packages/CloudStation/target
ln -sfn /volume2/@appstore/AntiVirus /var/packages/AntiVirus/target
ln -sfn /volume2/@appstore/StorageAnalyzer /var/packages/StorageAnalyzer/target

To be sure check that now the symbolic links are pointing to the new volume:

find /var/packages/ -type l -ls | grep volume2
The result:
4480 0 lrwxrwxrwx 1 root root 34 Nov 5 13:59 /var/packages/DownloadStation/target -> /volume2/@appstore/DownloadStation
6171 0 lrwxrwxrwx 1 root root 28 Nov 5 14:01 /var/packages/VPNCenter/target -> /volume2/@appstore/VPNCenter
17675 0 lrwxrwxrwx 1 root root 28 Nov 5 14:01 /var/packages/DNSServer/target -> /volume2/@appstore/DNSServer
7021 0 lrwxrwxrwx 1 root root 31 Nov 5 14:01 /var/packages/VideoStation/target -> /volume2/@appstore/VideoStation
17850 0 lrwxrwxrwx 1 root root 30 Nov 5 14:01 /var/packages/MediaServer/target -> /volume2/@appstore/MediaServer
17857 0 lrwxrwxrwx 1 root root 31 Nov 5 14:01 /var/packages/CloudStation/target -> /volume2/@appstore/CloudStation
17986 0 lrwxrwxrwx 1 root root 28 Nov 5 14:01 /var/packages/AntiVirus/target -> /volume2/@appstore/AntiVirus
18102 0 lrwxrwxrwx 1 root root 34 Nov 5 14:01 /var/packages/StorageAnalyzer/target -> /volume2/@appstore/StorageAnalyzer

Conclusion

The migration is done and you can start the applications again. They should work as normal 😉

 


My name is Luca Costa, an enthusiastic system engineer. In this blog you will find articles about technolgy and more. Feel free to contact me!

View Comments

Leave a Reply to Frank Elcheroth
Cancel Reply