JSCAPE MFT Servers can provide high availability file transfer services if you deploy two or more servers and set them up for clustering on JSCAPE MFT Gateway. But to achieve best results, your servers should be connected to a shared storage system. In this post, we'll talk about the advantages of using shared storage and how to set one up using FreeNAS.
Advantages of having shared storage
To achieve high availability, some of our clients have been setting up their managed file transfer servers in a clustered configuration similar to this:
Basically, what will happen is that if the production server (say JSCAPE MFT Server 1) goes down, the failover server (JSCAPE MFT Server 2) automatically takes over. As a result, clients using the file transfer service won't experience any downtime.
Here, the production server and the failover server each have their own dedicated storage, e.g. hard disks installed in the servers themselves. While this configuration may already look pretty good, it has a few but nevertheless significant limitations.
Once Server 1 goes down and Server 2 takes over, users won't be able to see files they own that aren't stored on Server 2.
The solution to this problem is to deploy a single storage system that both managed file transfer servers can share.
So, regardless which server a user connects to, the user will see exactly the same set of files and folders.
Another advantage of using shared storage is cost savings. When you apply dedicated storage, the production servers, which will likely experience heavy usage, can quickly reach their maximum storage capacity, while the storage resources of the failover servers will remain underutilized. Thus, you'll be forced to purchase more storage for the production server even if the failover server still has lots of free space.
With a shared storage system, you can be sure all your storage resources are fully utilized.
Now that you know the benefits of deploying a shared storage system, I'll now proceed to show you how to set one up using FreeNAS.
JSCAPE MFT Server and FreeNAS
FreeNAS is a free network-attached storage (NAS) that supports a wide range of network/file system protocols such as NFS (Network File System), CIFS (Common Internet File System), AFP (Apple Filing Protocol), iSCSI, and others. That means it can receive connections from servers running on different platforms (e.g. Linux, Windows, and Mac). This capability makes FreeNAS well-suited for platform-independent managed file transfer servers like JSCAPE MFT Server.
Therefore, it's possible to have one JSCAPE MFT Server running on Linux, another server running on Windows, and yet another running on Mac, all sharing storage via FreeNAS.
I will be focusing on JSCAPE MFT Servers running on Ubuntu Server 12.10 Linux in this post. Since I want to show you how to set up shared storage, then you will need two (2) such MFT servers. I will assume you already have both FreeNAS and JSCAPE MFT Server installed on their respective machines and that the machines can ping one another.
If you need more references, we have a video showing how to install JSCAPE MFT Server on a Debian-based Linux. We also have a blog post that will help you set up a Linux FTP server, so just take your pick.
Settings on FreeNAS
Before we proceed, please take note that what we're going to perform is just a very basic configuration. It is only meant to give you a firsthand experience of the major benefits shared storage can offer to file transfer services. It is by no means secure. We strongly urge you to study more about securing FreeNAS before deploying it in a production environment.
That said, I'm sure you're now eager to proceed. We are too so let's.
Launch your browser and login to FreeNAS. The first step is to create a volume. To do that, expand the Volumes node and click the Volume Manager.
Once the Volume Manager pops-up, enter a name for your volume (e.g. vol1). Next, highlight one or more disks you want to comprise the volume. In our example, there's only one (ada1). Choose a Filesystem type. ZFS has more features but for now, just choose UFS. Lastly, click the "Add volume" button.
It will take several seconds to prepare the volume since the selected disks will be formatted. As soon as the process completes, you should see your newly added volume under the Volumes node.
Our next task is to share this volume. To do that, we add what is known as a 'share'. Since our clients are Linux machines (our MFT servers function as clients to our shared storage service), we'll want to add an NFS (Network File System) share. Expand the Unix (NFS) Shares node and click the Add Unix (NFS) Share.
In the Authorized networks field, enter the address of the network you want to grant access to this share (e.g. 10.0.0.0). Also specify its corresponding CIDR mask (e.g. 24).
Scroll down to the Mapall User drop down list box and select root. Yes, we know allowing root access is not the most secure thing to do but we want to keep things simple for now. You can change this later on.
Scroll down some more and click the Browse button beside the Path field.
Expand the folders until you're able to select the one bearing the name of the volume you created earlier. Click OK.
We want the service to be enabled immediately, so click Yes.
If you're successful, you should see the NFS service marked as ON.
That should be all you need to configure at your FreeNAS. You can now proceed to access this shared volume from your Linux machines.
Settings in your Linux terminal
To access an NFS shared volume from a Linux machine, you have to mount the share on an existing directory in that Linux machine. That way, the share will appear just like any local directory on that machine.
Go to the first JSCAPE MFT Server (the one you intend to use as the production server), navigate to the JSCAPE MFT Server installation directory (most likely /opt/JSCAPE_MFT_Server) and then create a subdirectory on which the share will be mounted. For now, let's just call this directory 'freenasdirs'. Execute the mkdir command as shown:
Mount the NFS share you created earlier onto this directory using the command:
mount -t nfs 10.0.0.20:/mnt/vol1 /opt/JSCAPE_MFT_Server/freenasdirs
Just substitute 10.0.0.20 with the IP address of your FreeNAS and /mnt/vol1 with your shared volume.
If you encounter a problem, you probably just lack the 'nfs-common' package. To install nfs-common' on Ubuntu, execute the command:
apt-get install nfs-common
After that, you can proceed with the mount command as shown earlier. Assuming everything goes smoothly, this directory will now serve as a representation of the shared volume found on your FreeNAS. All the actions you perform (e.g. create, save, or delete) on files and folders under this directory won't be carried out locally. Rather, it will be carried out on the shared volume in your FreeNAS.
That's all you need to do on your Linux terminal. Perform the same steps outlined in this section on your second server. It's important that you do this before proceeding to the next section.
The last set of steps will be performed in the JSCAPE MFT Server environment, so launch your JSCAPE MFT Server Manager now and connect to the first server.
Settings on JSCAPE MFT Server Manager
The next step is to set the path of your users' files and folders to the directory you mounted in the previous section. To make sure all users you create from this point onward will be able to save their files into that mounted directory, make changes to your Users Default Template.
Navigate to Users > Templates and then select Default. Next, click the Edit button.
Go to the Paths tab, select the path you want to change, and then click Edit.
Now, in the Real path field, insert the name of your mounted directory (in our case, that would be '/freenasdirs') between %installdir% and /users.
Therefore, the complete path of your Default User Template should be similar to this:
%installdir%, %domain%, and %username% are just variables that represent your JSCAPE installation directory, the domain the user is connected to, and the user's registered username, respectively.
When you're done, click the OK buttons until you're back to the Templates tab.
All users created using the Default User Template will use the path shown above.
So, for example, if a user (created using the Default User Template) with username peterpan connects to domain mftserver1, all the files he uploads and all the folders he creates will be saved in /opt/JSCAPE_MFT_Server/freenasdirs/users/mftserver1/peterpan. Note that the subdirectories: /users, /mftserver1, and /peterpan are actually located in your FreeNAS.
The next step is to set up your failover server. Your failover server and your production server should have the same services, configurations, users, and user settings - including the user's paths - in order for failover to work as expected. Doing this normally requires a tedious process. But with JSCAPE MFT Server, you can set everything up with just a few clicks.
We already have an article featuring a thorough discussion on how to set up a failover server. Make sure your second server is up and running and can be accessed from the first server and then follow the instructions on that article.
When you're done, you should already be able to see the effects of shared storage.
Whenever a user logs in to any of the two servers using the same user account, he'll be granted access to exactly the same directory in the shared storage system. He'll see exactly the same files and folders regardless which server he connects to.
Bonus: Clustering using JSCAPE MFT Gateway
Everything you needed to know about setting up shared storage for you file transfer servers has already been discussed. However, I'd like to include one more tip that can significantly enhance what we've been able to set up so far.
So far, what you have is a file transfer system with a simple failover mechanism. During normal conditions, users connect to the production server. Whenever the production server goes down, the users connect to the failover server. Since the second server is connected to the same storage system as the first server, users won't have to do anything differently - except for one thing: they'll have to enter a different IP address (the IP address of the second server) into their file transfer clients.
That's actually very inconvenient. Users who don't know the IP address of the second server won't be able to connect whenever the production server goes down.
The solution to this problem is to deploy a reverse proxy like JSCAPE MFT Gateway and implement clustering. In fact, this is the configuration shown in the first figure of this post.
To learn how to set up clustering in JSCAPE MFT Gateway, click that link.
After reading this post (and following the relevant links) you would have gained enough knowledge to set up a system that would enable your users to experience all of the following:
- Very little or even zero downtime;
- Enter the same IP address every session ; and
- Gain access to exactly the same files and folders at every login.
You need JSCAPE MFT Server and JSCAPE MFT Gateway to implement this on your network. Both solutions have fully-functional evaluation editions which you can download right now.
Download JSCAPE MFT Server Trial
Download JSCAPE MFT Gateway