Move System Folders Away from Volume1
From SynologyWiki
Currently the Synology products can only work with system folders (web, music, photo, video, NetBackup) that are located on /volume1. However using symbolic links you can effectively move the folder(s) from /volume1/XXX to other directories, even if they are on other volumes on other hard disks. However this is not without some minor consequences which are described below.
In my case I had two disks in my NAS, one for my working data (containing the folders web, music, photo, video) but I wanted the NetBackup folder (which is used for rsync data from another NAS) on a seperate disk i.e. /volume2/NetBackup. As you will see below NetBackup is a reserved name so my data is now held in /volume2/NetBackup2.
The rest of this wiki is written around moving the system folder NetBackup but you could do the same for the others (web, music, video, photo, etc).
Contents |
Consequences of doing this
- Filestation for firmware v590 (and probably all other firmware versions) does not recognise symbolic links. So after this procedure you will see a Directory NetBackup and NetBackup2 in Filestation. Filestation will not show any data in NetBackup but it will show it in NetBackup2.
- The ftp service provided for firmware v598 (and all previous versions, but not fw 637 and presumably all latter versions) also does not recognise symbolic links. Hence after this procedure if you have fw 598 or earlier you will see in an ftp client such as windows file explorer network shares of NetBackup and NetBackup2. If you try to connect to NetBackup you will get the message "no such file or directory", however all your files will be found by connecting to NetBackup2.
- Although accessing the NAS with fw637 via ftp (e.g. using windows file explorer) does follow symbolic links, if you map the shared folder (NetBackup) in windows you will NOT be able to follow the symbolic link. However you can of course map the shared folder NetBackup2 and all your data wil be accessible there.
Assumptions
- You know how to login as Admin.
- You have 15 minutes spare to complete this procedure (could be longer if you have lots of data in the folder you want to move).
- You have already installed and commissioned the other disk, in this example we assume it is /volume2
Procedure
In this procedure we are going to create a symbolic link from "/volume1/NetBackup" to "/volume2/NetBackup2" so that all data read/written from/to "/volume1/Netbackup" is actually read/written from/to "/volume2/NetBackup2" not "/volume1/NetBackup". Hope that is clearer than mud.
- Login to the web management GUI as admin and create a shared folder on /volume2 called "NetBackup2". Note the name must be different to the system folder name. Also note that you must use the Web management GUI to create the folder. Don't create it in the Command Line Interface else you won't be able to browse the folder using filestation or an ftp client (e.g. windows file explorer)
- If you want to change the access privileges for NetBackup2 from the default, do so.
- Enable the Command Line Interface (Telnet or SSH)
- Login into the Command Line Interface as "root", the password is the same as the admin password.
- Copy all data from volume1/NetBackup to /volume2/NetBackup2, i.e. enter the command "cp -r -p /volume1/NetBackup /volume2/NetBackup2/"
- Then delete the system folder so we can replace it with a symbolic link, i.e. enter the command "rm -r /volume1/NetBackup"
- Now create the symbolic link using the command "ln -s /volume2/NetBackup2 /volume1/NetBackup"
- You have finished. If you enter the command "dir /volume1" you should see an entry "NetBackup -> /volume2/NetBackup2". The "->" shows the symbolic link is in place and what its destination is.
How to remove the symbolic link and revert back to using system folder(s)
To go back you will delete the symbolic link, recreate the system folder, copy the data back into it and then delete the linked folder.
- Enable the Command Line Interface (Telnet or SSH)
- Login into the Command Line Interface as "root", the password is the same as the admin password.
- Delete the symbolic link, i.e. enter the command "rm /volume1/NetBackup"
- Re-create the system folder, i.e. enter the command "mkdir /volume1/NetBackup"
- Copy the data from /volume2/NetBackup2 to /volume1/NetBackup, i.e. enter the command "cp -r -p /volume2/NetBackup2 /volume1/NetBackup"
- Exit the Command Line Interface by entering the command "exit"
- Delete the directory /volume2/NetBackup2 via the web management GUI. DO NOT delete it via the Command Line Interface.
- Finished
