ShareFile – Howto migrate an on-premise Storage Zone

In this blog post I will show you the migration process for your on-premise ShareFile Storage Zone controller including the move of the file share to a new server. There will a downtime of the ShareFile service during the migration of the files to the new share.  The downtime will depend on the size of your ShareFile data repository.

This environment consists of the following servers:

ShareFile-01.lab.local –> Windows Server 2008 R2 (Productive)
ShareFile-02.lab.local –> Windows Server 2016 (New Storage Zone)

Prerequisites

  • Fresh Windows Server with installed  “Web Server (IIS)” role. Add the features “ASP.NET 4.5”,  “Basic Authentication” and “Windows Authentication”.
  • Installed SSL certificate , which is matching the FQDN of your external ShareFile address
  • Setup for the Citrix Storage Zone Controller – Download
  • Credentials for the ShareFile service user account
  • ShareFile Passphrase

Prepare the Firewall

  1. Edit the firewall rule that the NetScaler SNIP can communicate with the new Storage Zone controller (HTTPS – 443)

fw1

Prepare the Citrix NetScaler

  1. Add the new Storage Zone Controller to your ShareFile Service Group
  2. Verify that  the “Effective State” is UP for both services of the service group.

ns1

Upgrade the productive Storage Zone Controller

Before we can start joining the new storage zone controller  (ShareFile-02.lab.local) to the exisiting zone we need to update the current server (ShareFile-01.lab.local) to the newest version.

  1. Take a Snapshot of the VM.
  2. Backup the file “SCKeys.txt”, which is located in the root directory of your ShareFile data share. If you loose this file you can not edit the configuration of the current storage zone or even join new contollers. Keep it safe 🙂
  3. Run the downloaded “StorageCenter_5.x.x.xxxx.msi” and follow the wizard.
  4. Reboot the server.
  5. Verify in the external ShareFile panel that the Storage Zone is still working properly and upload a test file just to be sure the upgrade went well.

Move the ShareFile data to a new FileShare

Before we start moving the ShareFile data to the new file share we are going to disable the ShareFile LB vServers on the Citrix NetScaler. Here starts the official downtime.

1. Disable the ShareFile LB vServers on Citrix NetScaler.
2. Create an UNC-Share for the ShareFile data.

Important: The share will get overwritten with a default folder structure while changing the network share location. Make sure you don’t loose any data!

unc1

3. Edit the NTFS permissions (Full Control) for the ShareFile service account.

unc2

4 . Login to the ShareFile Control Panel on “ShareFile-01.lab.local” and modify the “Network Share Location”.

unc3

unc4

4. Now open the new UNC-Share in Windows Explorer and you should see the default file structure.

unc5

5. Open a command line and copy the production files to your new StorageZone share.

robocopy \\ShareFile-01.lab.local\ShareFile$  \\ShareFile-02.lab.local\ShareFile$ /MIR /r:3 /V

6. Enable the ShareFile LB vServers on Citrix NetScaler

7. Verify in the external ShareFile panel that the Storage Zone is working properly. In addition login with a test user and check if the migration was succesfull.

Join the Storage Controller to the Zone

Now its time to join the new server to the storage zone.

1. Run the downloaded “StorageCenter_5.x.x.xxxx.msi” and follow the wizard to install the Storage Zone components on ShareFile-02.lab.local.
2. Reboot the server.
3. Login to the ShareFile Control Panel and join the server to the exisiting zone. You will need to enter the passphrase you configured during the initial deployment.

unc3

join1

4. Verify in the external ShareFile panel that both Storage Zone Controllers are working properly and upload a test file.

Demote the old Storage Zone Controller

At this stage both Storage Zone Controllers are running in the zone and its time to demote the old server “ShareFile-01.lab.local”.

1. Open the registry editor on “ShareFile-01.lab.local”.

2. Goto “HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Citrix\StorageCenter”

3. Set the REG_SZ “isPrimaryConfigServer” to “false”.

4. Change the “PrimaryConfigServiceUrl” to –> http://ShareFile-02.lab.local/ConfigService/

5. Restart the IIS service.

6. Open the registry editor on “ShareFile-02.lab.local”.

7. Goto “HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Citrix\StorageCenter”

8. Set the REG_SZ “isPrimaryConfigServer” to “true”.

9. Change the “PrimaryConfigServiceUrl” to –> http://localhost/ConfigService/

10. Restart the IIS service.

11. Verify in the external ShareFile panel that both Storage Zone Controllers are working properly and upload a test file.

 

Delete the old Storage Zone from the Share File Panel

1. In the ShareFile panel click on “Admin” and select your StorageZone.

sc1

2. Select the Storage Zone controller you want to remove –> “ShareFile-01.lab.local”

sc2

3. Delete the Storage Zone “ShareFile-01.lab.local”.

sc3

 

4. Shutdown the VM “ShareFile-01.lab.local”.

5. Remove the Server “ShareFile-01.lab.local” from the ShareFile Service Group on the NetScaler.

 

11 comments

  1. Hi, thanks for the how to.
    I tride to migrate my sharefile Installation.
    but i get the followring error, when i tried to add the new storage Zone Controller to my existing Zone.

    Unable to get the config settings from the Primary Zone Controller, Please check the Primary Zone Controller Address( https://klraszc01/configservice/ ) and Passphrase

    In my internal Network the both Servers can talk via ping and Telnet on the ssl port.
    and it is possible to open the Adresse in my browser.

  2. Hi, yes the new storage Zone Controller can reach the external sharefile panel. On the new storage Zone Controller i created a new Zone and move the user online from the old zto the new zone.
    THat works for me,

    1. Hi,

      Thanks a lot for your post !

      I need to migrate the shared folder of my premise Storage Zone and I want some advise.

      First I tried the Robocopy method but it’s not worked because I have more than 2 000 000 of files in the root of the persistentstorage folder.

      I developped a Posh script to copy the data but (during the testing phase) I notice that it takes more than 3 days !

      I want, if it’s possible, to test the method of create a new zone dans move the data from the old zone to the new zone but I ask my self how to do this, can we keep the same URL ? Do we need to shange settings on sharefile client ?

      A lot of questions 🙂

      Could you develop this point ?

      Regards

      1. Hi Julien,
        I have never done it before but I think in your case it is the best is to create an additional storage zone (new URL) and move the data step by step for specific user groups. With this procedure you can keep the production url (company.sharefile.com) because the ShareFile clients will get redirected to the new storage zone where the data is hosted (storagezone2.corp.com)

        1. Hi,

          The Citrix support give me a tool named Storage Disagnostic Tool. I ran the tool in diagnotic mode and you will see below the result:
          2019-04-08 17:41:52,987 INFO InformCounts: Processed: 2924350 files. Error Count: 1 & Orphaned Count: 2825615
          2019-04-08 17:41:52,987 INFO InformSizes: Current SF Usage: 89,943 GB & Retention Size: 5,947 GB & Orphaned Size: 255,112 GB
          2019-04-08 17:41:52,987 INFO Main: Process DONE.

          I have a lot of orphaned files ! This is caused by a bug on Sharefile Controller 5.2 🙂

          I will run a clean and use the robocopy after.

          Thank you for the time you take to answer me !

  3. Hi. We have SZC 5.8 on old Windows 2008 server and we need to replace ti with 2016 server. The issue is that it was setup in 2014 and PassPhrase was used, which is not documented by former colleagues. As I found the Encryption is not selected so it seems the PassPhrase is not needed, even if it’s saved. The SCKeys.txt is present in network share (created in 2014) but I believe it’s not used becase the mentioned Encryption is not enabled. I am not sure if I can build a paralel 2016 server with same configuration but without PassPhrase. Could this saved passphrase prevent me to add a second SZC? Please advise. Thanx P.

    1. Guess you have to try and find out. If it is not working please contact Citrix Support. I have heard there is way to recover the passphrase.

  4. Hi,
    I have recently upgraded and also created a new server2106, to replace a 2008 storage zone controller. each step I tested and everything working. the last step was to demote primary on a 2012 server, and create the primary on the new 2016. after doing this everything still working, getting heartbeats. green checkmark. I also tested download, upload. However, both servers would not give info when going to https://localhost/configservice/login.aspx. Now when I go to it, it has the normal login screen. however, when I login. it takes me to a screen where nothing is showing in the boxes. so I click on modify to be able to input the info, which I do, then hit enter, but instead of saving it, it comes back with a screen stating ” A zone must have at least one service enabled ” Citrix Support cant even figure out what that means. I hope you have an idea. the screen looks the same as before I hit enter, but it has that error message

Leave a Reply

Your email address will not be published. Required fields are marked *