Move a package to another volume?

The discussion lounge for third-party packages.
Forum rules
1) This is a user forum for Synology users to share experience/help out each other: if you need direct assistance from the Synology technical support team, please use the following form:

https://account.synology.com/support/su ... p?lang=enu



2) To avoid putting users' DiskStation at risk, please don't paste links to any patches provided by our Support team as we will systematically remove them. Our Support team will provide the correct patch for your DiskStation model.
User avatar
vletroye
Experienced
Experienced
Posts: 105
Joined: Mon Nov 10, 2014 9:55 am

Re: Move a package to another volume?

Unread post by vletroye » Wed Dec 20, 2017 6:51 pm

I don't promise it will always be up and running, but here is my own Package Server: http://olympe.letroye.be/sspks/?arch=all
I am developping and testing stuff on my NAS, making it therefore often unstable.

Also, notice that I am deploying there each new version that I intend to install on my own NAS, for testing purpose => really far from always stable ;)

V.
DS1815+ - DSM 6.0

VinceS
I'm New!
I'm New!
Posts: 1
Joined: Thu Jan 04, 2018 11:58 pm

Re: Move a package to another volume?

Unread post by VinceS » Fri Jan 05, 2018 12:19 am

This was brilliantly helpful, thank you. Worked just fine. Needed to install init_3rdparty from https://www.cphub.net/?p=init3p first, I also changed Settings to Any Publisher (and back to Syn + TP when finished). Then this Package Manager installed and simply worked. I had stopped a bunch of stuff, basically by experimenting with Delete Volume and it gave a list, duly noted and stopped those ones and any reported dependencies, THEN did the Package Manager moves, including the various greyed out ones - all worked fine.

Two packages needed repair after, no drama, that worked fine too.

Why Synology doesn't have a drop-down volume as per Shared Folders is a bit of a mystery, and a pretty serious failure of what would be an obviously basic requirement for such a system. Hopefully others will take it up, although I note an earlier comment says it is on the promise list, maybe we'll see it...

My issue was that 2 years ago I set up a DS415+ with 2@6Tb HGST's as Raid 0 and wanted to add a third due to 91% full. Didn't know you couldn't do that, so set up new disk as Vol2 using JBOD and btrfs then used Shared Folders to move the ones I cared about most until the new drive was fairly full (takes a day to do this, one at a time but at least it runs overnight with PC off). Now I have the packages over I think I can just delete Vol 1 and then put those discs on Vol 2 JBOD and then put the deleted (backed up elsewhere) stuff back on. What a hassle when I originally had no clue I couldn't just add drives in plug and play mode, pretty sad as far as tech is concerned as this is my first "proper" NAS and shouldn't allow a newbie to walk into this one when the better strategy was well known but opaque to me.

But thanks again for giving the less programmatically inclined a way to dig ourselves out of ignorance created situations!

User avatar
vletroye
Experienced
Experienced
Posts: 105
Joined: Mon Nov 10, 2014 9:55 am

Re: Move a package to another volume?

Unread post by vletroye » Fri Jan 05, 2018 9:27 pm

You are welcome ;)

I guess it's not an easy work for Synology to provide a robust feature for this purpose.
Indeed, third party packages may install their own stuff a bit everywhere (in non standard folders) and everything has to be moved...

IMHO, each package should have installed it's own "move" script (in addition to stop-start/install/upgrade/uninstall scripts).
Then, in Package Center, one could have an option to move the packages in addition to stop/start them, etc...

V.
DS1815+ - DSM 6.0

arin
I'm New!
I'm New!
Posts: 5
Joined: Sun Apr 22, 2012 10:48 am

Re: Move a package to another volume?

Unread post by arin » Mon Jan 08, 2018 6:52 pm

Thanx a lot vletroye!
It worked like a charm for me too.

arin

User avatar
kmamelund
I'm New!
I'm New!
Posts: 1
Joined: Sun Feb 04, 2018 12:48 pm

Re: Move a package to another volume?

Unread post by kmamelund » Sun Feb 04, 2018 1:14 pm

Thank you, vletroye!

I've had a degraded Volume2 for about a year now (with only a few packages installed, no other data). I've been frequently checking for solutions like the one you have developed - and your effort saved my day today! :)

I wanted to remove this Volume, as it consisted of two old 1TB disks. My other Volume1 has two 4TB disks, and I will rather expand that volume with an extra 4TB spare, than "repairing" the old Volume2 by adding a new 1TB.

Cheers,
kmamelund.

vimes
I'm New!
I'm New!
Posts: 3
Joined: Sun Aug 12, 2012 8:24 am

Re: Move a package to another volume?

Unread post by vimes » Wed Mar 14, 2018 2:33 am

Thanx Vletroye! I am moving packages from a degraded volume as I type this.

So far everything looks good... except Apache 2.2
Do you have any advice getting this running after the move?
should I just remove and reinstall this package?

User avatar
vletroye
Experienced
Experienced
Posts: 105
Joined: Mon Nov 10, 2014 9:55 am

Re: Move a package to another volume?

Unread post by vletroye » Wed Mar 14, 2018 1:13 pm

I didn't find yet what needs to be reconfigured after moving apache, to make it runs :(

So: Yes, you will have to «disable» all packages with a dependency on apache, uninstall and reinstall apache and finally «reenable» the package.


V.
DS1815+ - DSM 6.0

waffles
I'm New!
I'm New!
Posts: 1
Joined: Sat May 19, 2018 6:29 pm

Re: Move a package to another volume?

Unread post by waffles » Sat May 19, 2018 6:36 pm

V,

Thank you for the SPK. I believe it has worked well for me.

I moved a number of packages and settings:

Mono
Git
Sonarr
Radarr
Plex
Python 3
PHP 5.6
Maria DB 10

Mono seemed to have hesitated, but I am not seeing any ill effects after reopening your MODS package manager.

I hope my package migration list is useful to others.

Thank you, again, V. It seems to have been very helpful! :D

User avatar
vletroye
Experienced
Experienced
Posts: 105
Joined: Mon Nov 10, 2014 9:55 am

Re: Move a package to another volume?

Unread post by vletroye » Sat May 19, 2018 11:04 pm

You are welcome. But I couldn't do it without all info found in this thread. So credits go to all members who shared here.

V.
DS1815+ - DSM 6.0

mgf909
I'm New!
I'm New!
Posts: 2
Joined: Sun Jun 03, 2018 10:45 pm

Re: Move a package to another volume?

Unread post by mgf909 » Sun Jun 03, 2018 10:49 pm

Great work on creating this tool!

I however cant get it working - when i select a pacakge and volume to move the package to in the "Package Movers feedback" it reports

Code: Select all

sh: mvpkg.sh: not found
Any ideas where to look?

User avatar
vletroye
Experienced
Experienced
Posts: 105
Joined: Mon Nov 10, 2014 9:55 am

Re: Move a package to another volume?

Unread post by vletroye » Sun Jun 03, 2018 11:24 pm

This file is part of the package. It looks like the installation of the package failed for some reasons.

If you know how to connect on your NAS via SSH (Ex.: using Putty), look into /var/packages/MODS_PackageManager/target/ui/

You should see

-rwxrwxrwx 1 root root 12408 Jan 6 21:42 mvpkg.php
-rwxrwxrwx 1 root root 3185 Oct 22 2017 mvpkg.sh
-rwxrwxrwx 1 root root 1379 Oct 16 2017 rmpkg.sh
-rwxrwxrwx 1 root root 4277 Oct 1 2017 spin.min.js

Be sure to use the latest version "MODS Package Manager" from http://olympe.letroye.be/sspks/?arch=all
DS1815+ - DSM 6.0

mgf909
I'm New!
I'm New!
Posts: 2
Joined: Sun Jun 03, 2018 10:45 pm

Re: Move a package to another volume?

Unread post by mgf909 » Mon Jun 04, 2018 10:41 am

Thanks for your reply:

Code: Select all

NAS2> ls -ltr
-rwxrwxrwx    1 root     root          4277 Oct  2  2017 spin.min.js
-rwxrwxrwx    1 root     root          1379 Oct 17  2017 rmpkg.sh
-rwxrwxrwx    1 root     root          3185 Oct 23  2017 mvpkg.sh
drwxrwxrwx    2 root     root          4096 Jan  7 07:34 images
-rwxrwxrwx    1 root     root           602 Jan  7 07:34 config
-rwxrwxrwx    1 root     root         12408 Jan  7 07:42 mvpkg.php
NAS2>

The file is there... any other ideas?

Edit:
From ssh shell,
if i try to execute the script and feed it the
TARGET=$1
PACKAGE=$2
its asking for it still replies "not found"
even without any args, it doesnt run...as above ls shows, it has the x set and im ssh'ed in as root?!?!?

Code: Select all

BusyBox v1.16.1 (2016-04-26 17:25:22 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

/volume1/@appstore/MODS_PackageManager/ui # mvpkg.sh
sh: mvpkg.sh: not found
/volume1/@appstore/MODS_PackageManager/ui #

User avatar
vletroye
Experienced
Experienced
Posts: 105
Joined: Mon Nov 10, 2014 9:55 am

Re: Move a package to another volume?

Unread post by vletroye » Mon Jun 04, 2018 6:30 pm

to run it from ssh, use :
  • either: sh mvpkg.sh
  • or: ./mvpkg.sh
otherwise, indeed, you get a command not found

Reason why it does not work when run by the package, possibly some security setting ?
Unfortunately, I cannot test my own package anymore because I only have one volume :(
I should setup a virtual DSM for testing purpose but... a bit short on free time right now :/

V.
DS1815+ - DSM 6.0

KissMyNAS
I'm New!
I'm New!
Posts: 2
Joined: Sat Apr 25, 2015 9:05 am

Re: Move a package to another volume?

Unread post by KissMyNAS » Wed Jun 06, 2018 7:13 pm

Hi,

Thanks V. for the great work ! 8)
I'm currently trying to move all my packages from volume1 to volume2 (I have Basic volumes, no RAID).
I already moved some "standalone" packages that I don't use anymore (Note Station for example), to test, and it works great.

Now I'm left with packages that I use, and that have dependencies between them : NodeJS, Perl, Synology Application Service and Spreadsheet (that's Synology's Office) : do you know if these can be moved without problem ?
Should I move them in a specific order, given their dependencies ?

Thanks a lot Image

User avatar
vletroye
Experienced
Experienced
Posts: 105
Joined: Mon Nov 10, 2014 9:55 am

Re: Move a package to another volume?

Unread post by vletroye » Wed Jun 06, 2018 8:02 pm

When I did move Node.JS on m NAS (and it was an older version than the most recent one), the packages appeared with a status "in error" in the Package Manager. But I simply clicked on "Repair" and the problem disappeared. Idem with FileBot-Node.

I had also troubles after moving Plex Media Server. As I couldn't repair it successfully, I did reinstall it with the manual package installation. This triggered actually an update which fixed the problem without loosing any setting/libraries.

I did move successfully AudioStation, CloudStation, DNSServer, NoteStation, PHP5.6, PHP7.0.

I failed to move Apache Http Server 2.2 and 2.4, the Unofficial Java Installer and WordPress.

I didn't try any other packages. I would highly recommend to do a backup and test moving the packages in a virtual DSM if possible...

V.

See here my "experience": http://www.beatificabytes.be/move-a-syn ... o-another/
DS1815+ - DSM 6.0

Post Reply

Return to “Third-party Packages”