McLean IT Consulting

WORRY FREE IT SUPPORT

Call Us: 250-412-5050
  • About
  • Services
    • IT Infrastructure Design
    • Remote & Onsite IT Support
    • Disaster Recovery
    • IT System Monitoring
    • IT Audit
    • Documentation
    • Medical IT Solutions
    • Wireless Networks
    • Cloud Computing
    • Virtualization
  • Partners
    • Lenovo
    • Ubiquiti Networks
    • Dragon Medical Practice Edition (Nuance)
    • Synology
    • Drobo
    • Adobe
    • Bitdefender
    • NAKIVO
  • Contact
  • Blog
  • Remote Support

Synology – Move Application Between Volumes

April 20, 2016 By Andrew McLean 22 Comments

DS1815+

When I set up my own Synology DS1815+, I created a large hard disk volume for most of my storage requirements. For the heck of it I had also created a RAID1 volume of a pair of 30 GB solid-state drives that I had lying around. I was curious to see whether installing applications to the solid-state drive would improve responsiveness or speed up the boot time. As it turns out, I’m not a demanding enough user to really notice a difference.

As my larger volume started filling up, the real estate taken up by those two small 30 GB solid-state drives became an obstacle. The problem was, I had already installed all of the applications to that volume. So I sought a way to move the applications without having to reinstall them, since I was afraid reinstalling AudioStation, PhotoStation or VideoStation might prompt a whole-volume index which I’m not eager to do – it takes ages.

As it turns out, this is relatively easy for most applications – even third-party ones. Apps like Snapshot Replication, CrashPlan and DownloadStation had to be uninstalled and reinstalled manually, but for the majority of apps this should work. Strictly speaking, DownloadStation didn’t need to be uninstalled manually but there were some remaining temp files in /volume3/@download that I didn’t want so I opted to just reinstall it manually.

I would not recommend this unless you know what you’re doing.

Moving an Application Between Volumes in DSM 5.x or DSM 6.x

Before doing the following, make sure all of the applications that are about to be moved have been stopped. You can do this by opening the Package Center, visiting each application entry under Installed and then clicking Action->Stop. I found it was easier to use my iPhone to login to the DSM console where there’s a handy “Stop” button for each application without having to tediously visit each entry.

You may also opt for the command-line method of stopping these services, since you’ll be digging around in there anyway.

sudo /var/packages/[app_name]/scripts/start-stop-status stop

So the process comes down to three basic commands. In the example below, it assumes that the current installation volume is volume1, and the desired one is volume3:

# Move the app files from the old volume to the desired one.
sudo mv /volume1/@appstore/[app_name] /volume3/@appstore/

# Delete the obsolete Symlink pointing at the old app path
sudo rm -fv /var/packages/[app_name]/target

# Create a new Sim link pointing at the new, correct app path.
sudo ln -s /volume3/@appstore/[app_name] /var/packages/[app_name]/target

Now you can either reboot or simply visit the Package Center and manually start the apps again. Each app entry should now show the correct new installation volume.

Filed Under: Tips

Comments

  1. bogd13 says

    July 23, 2016 at 3:59 am

    Thank you! This really helped me – I wanted to retire my first, smaller volume, and I didn’t want to have to reconfigure all my packages (I did try to uninstall/reinstall them on the other volume, but some actually need to be reconfigured from scratch when doing that – CloudStation ShareSync, for example!).

    One small note – you may need to escape the ‘@’ in the file names. In my case, the commands I had to use were:

    sudo mv /volume1/\@appstore/[app_name] /volume2/\@appstore/
    sudo rm -fv /var/packages/[app_name]/target
    sudo ln -s /volume2/\@appstore/[app_name] /var/packages/[app_name]/target

    Log in to Reply
    • Ogy says

      December 29, 2022 at 8:43 am

      source=”volume1″
      target=”volume2″

      echo “stopping apps/n”
      for entry in `ls /${source}/@appconf/`; do
      /var/packages/$entry/scripts/start-stop-status stop
      done

      echo “Moving appstore/n”
      for entry in `ls /${source}/@appstore/`; do
      mv /$source/@appstore/$entry /$target/@appstore/
      rm -vf /var/packages/$entry/target
      ln -s /$target/@appstore/$entry /var/packages/$entry/target
      done
      echo “Moving etc/n”
      for entry in `ls /${source}/@appconf/`; do
      mv /$source/@appconf/$entry /$target/@appconf/
      rm -vf /var/packages/$entry/etc
      ln -s /$target/@appconf/$entry /var/packages/$entry/etc
      done
      echo “Moving home/n”
      for entry in `ls /${source}/@apphome/`; do
      mv /$source/@apphome/$entry /$target/@apphome/
      rm -vf /var/packages/$entry/home
      ln -s /$target/@apphome/$entry /var/packages/$entry/home
      done
      echo “Moving temp/n”
      for entry in `ls /${source}/@apptemp/`; do
      mv /$source/@apptemp/$entry /$target/@apptemp/
      rm -vf /var/packages/$entry/tmp
      ln -s /$target/@apptemp/$entry /var/packages/$entry/tmp
      done
      echo “Moving data/n”
      for entry in `ls /${source}/@appdata/`; do
      mv /$source/@appdata/$entry /$target/@appdata/
      rm -vf /var/packages/$entry/var
      ln -s /$target/@appdata/$entry /var/packages/$entry/var
      done
      echo “starting apps/n”
      for entry in `ls /${source}/@appconf/`; do
      /var/packages/$entry/scripts/start-stop-status start
      done

      Log in to Reply
  2. Ruud says

    September 18, 2016 at 7:24 am

    Thanks for all your help Andrew and bogd13, worked for me with and without extra escape.
    Also I choose to run “sudo mv /volume1/@appstore/ /volume2/@appstore/”, so not mentioning alle package names.

    By mistake I had not changed Symlink pointing yet. But I looked in Package Center where “repair” and “repair all” was seen and before I thought all through my mouse point was on the “repair all” and choose it. It took some time but all had been repaired without any problems; if any should not be repaired you can remove package and reinstall but it will be for only some and is not time consuming any more

    Log in to Reply
  3. Ben Batschelet says

    September 21, 2016 at 11:54 am

    I also had to update a symbolic link under `/usr/local` to point to the new volume:

    “`
    sudo rm -fv /usr/local/[app_name]
    sudo ln -s /volume3/\@appstore/[app_name] /usr/local/[app_name]
    “`

    Log in to Reply
  4. Rob Tyler says

    January 23, 2017 at 2:11 am

    An excellent article, and worked first time – thank you!

    Log in to Reply
  5. Laszlo Boviz says

    January 29, 2017 at 8:27 am

    Thanks for sharing this. Saved me hours.

    Log in to Reply
  6. Fredrik Erlandsson says

    February 2, 2017 at 3:53 am

    This is what I did to automate the ln process..

    SAVEIFS=$IFS
    IFS=$(echo -en “\n\b”)

    cd /var/packages
    for F in *; do ls -l ${F}/target; sudo ln -sf /volume2/\@appstore/${F} /var/packages/${F}/target; ls -l ${F}/target; done

    cd /usr/local
    for F in *; do if [ -h ${F} ]; then ls -l ${F}; sudo ln -sf /volume2/\@appstore/${F} ${F}; ls -l ${F}; fi; done

    IFS=$SAVEIFS

    Log in to Reply
    • Fredrik Erlandsson says

      February 9, 2017 at 2:23 am

      Don’t forget to move the @img_bkp_cache too and change `/usr/syno/etc/synobackup.conf`

      i.e.

      vi /usr/syno/etc/synobackup.conf -c ‘:%s/volume1/volume2/g’ -c ‘:wq’

      Log in to Reply
  7. Acto says

    February 8, 2017 at 1:37 am

    Thanks, works great. Be aware that at least for Surveillance station there are different paths.
    It has an @surveillance directory in the root of volume1. Best to look at the symbolic links in the package directory.

    Log in to Reply
  8. Sebastian Ott says

    February 8, 2017 at 3:02 pm

    I wrote a small script for moving packages. If someone is interested, I put it on github: https://gist.github.com/nobodypb/fc3e70b535bcd95b5de7659d6fbda434

    Log in to Reply
    • blitzdesigner says

      March 27, 2017 at 2:45 pm

      @Sebastian Ott
      Thank you for your script, worked good so far.
      But I am not sure what to do with the message at the end:
      ###########
      If you want to remove /volume1 you should also move the following:

      System service symlink /var/services/download to /volume1/@download
      System service symlink /var/services/pgsql to /volume1/@database/pgsql
      System service symlink /var/services/printer to /volume1/@spool
      System service symlink /var/services/tmp to /volume1/@tmp
      ########

      I was moving from /volume1 to /volume2, so shouldnt be there /Volume2/ in the end?
      and, how do I move those symlinks?

      thank you for a little hint :-)

      Log in to Reply
      • PJThys says

        February 6, 2018 at 8:24 am

        Did you get an answer on your question? I need to remove the volume and recreate it as part of a switch from raid 1 to 2 basic volumes. All went smooth, but I can’t remove volume 1 from storage manager.

        Log in to Reply
  9. than0s says

    March 17, 2018 at 10:12 am

    My 2cents here:
    As Drive was not starting up, I had also to edit /var/packages/SynologyDrive/etc/db-path.conf in order to have db-vol=/volumeX.

    Log in to Reply
  10. Max says

    October 8, 2018 at 12:29 pm

    So does this still work on the newest DSM, 6.2? Trying to move surveillance station to Volume 1, already moved the shared folder in system settings, but not yet the package.

    Log in to Reply
  11. Jay Bee says

    April 8, 2019 at 2:05 pm

    Thank you very much for this. It saved me a lot of time.

    Log in to Reply
  12. Richard says

    April 22, 2020 at 1:40 am

    Looks like its worked for me. (will find out after a restart)
    Moved even my email server.
    You superstar.

    Log in to Reply
  13. John Walshaw says

    May 2, 2020 at 1:03 pm

    Very helpful method and thank you.

    Log in to Reply
  14. Jefferson says

    December 11, 2020 at 11:44 am

    Thank you so much! This helped much. I wrote a bash script that should make the process faster and easier. Here’s the link https://github.com/JeffersonDing/SynologyMerge
    Thanks!

    Log in to Reply
  15. Bob says

    November 21, 2021 at 5:08 am

    Will this also work to move VMM from e.g. volume1 to volume2? I like to move my virtual machine manager and the vm’s to an SSD on volume2.

    How do I proceed?
    TIA

    Log in to Reply

Trackbacks

  1. Moving packages / applications to another volume on Synology DSM – Baris Eris's Blog says:
    October 18, 2016 at 9:20 pm

    […] Synology – Move Application Between Volumes […]

    Log in to Reply
  2. Move a Synology Package from a volume to another | Beatifica Bytes says:
    October 1, 2017 at 12:54 pm

    […] It is inspired from this post. […]

    Log in to Reply
  3. Synology: Festplatte ohne RAID tauschen – Gerald Schneider says:
    February 11, 2023 at 3:15 am

    […] dass das genau die Platte war auf der alle zusätzlichen Pakete installiert waren. Ich hatte zwar einen Blogbeitrag gefunden, wie man Pakete auf eine andere Festplatte verschiebt, aber zum einen wird daraus nicht klar ob […]

    Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

Contact Us

McLean IT Consulting Inc.
Serving Greater Victoria

P: 250-412-5050
E: info@mcleanit.ca
C: 250-514-2639

Featured Article

What is DNS?

In the beginning, the earliest functional iteration of a large scale network was funded by Defense Advanced Research Projects Agency (DARPA) and it … Continue Reading

Blog Categories

Our Mission

We seek to enrich and improve small and medium businesses by delivering best-in-class technology solutions, and offering a premier customer service experience. Contact Us Now!

Quick Menu

  • About
  • Testimonials
  • Contact
  • Blog
  • Sitemap

Let’s Get Social

  • Email
  • Facebook
  • LinkedIn
  • Twitter
  • YouTube

Copyright © 2025