Mapping RStor to Linux with CIFS

By Ross Madden
Published on November 15, 2018 4:16 pm MT
Posted in General CNSIT, Knowledge Base, The Cloud, Tips and Tricks

This tutorial will describe how to map an RStor location to a Linux computer using CIFS (Common Internet File System).  CIFS is a dialect of SMB (Server Message Block) meaning that it can be thought of as an in place replacement for Microsoft’s SMB protocol.  In short, this is how you map the same drive in Linux as you would in Windows or MacOS through SMB.

If you are unsure what RStor is or how to request a space, check out the following first:

I am using CentOS 7 as the Linux distribution for creating this tutorial, although these should apply (possibly with slight modifications) to any other distribution of Linux.  I will be presenting commands that are to be applied to a terminal, many of which require root (sudo) access, so be sure the account in use has administrative permissions.

The method described below creates the following scenario.  We will be mounting a single RStor sharepoint using a single eID.  The eID credentials will be stored in a location where only users with root (sudo) access can view.  This is ideal for systems that would like to mount an RStor share where there is a single sudo enabled user that sets up the share.  All other users should not have sudo access, but can still take advantage of the mounted RStor share.

1.) First, we will be creating a directory to mount RStor on.  Essentially, all we are doing is making an empty directory where the mount command will attach the RStor CIFS.  In this example, I will create a directory in the root of the Linux installation called “rstor”.

sudo mkdir /rstor

2.) We will now create a credentials file where the user with access to the RStor location can save their login information.  We will store this file in the /root directory, and be sure to set the appropriate permissions so that only a user with root (sudo) access can view.  First, create and edit the file using the nano terminal file editor with the following command:

sudo nano /root/rstor_credentials.txt

You should populate this file with the following text.  Be sure to use your own information in YOUR_ENAME and YOUR_EID_PASSWORD


Now, you will need to update the permissions for this file with the following command:

sudo chmod 600 /root/rstor_credentials.txt

3.) Now that we have a place to attach the RStor share, we will edit a file that controls such things in /etc/fstab.  In this example I will again be using the nano terminal file editor to append the following line to the end of the /etc/fstab file.  The information for SHARE_NAME below for the following must be customized to match share name created in RStor for your use:

// /rstor cifs credentials=/root/rstor_credentials.txt,auto,_netdev 0 0

4.) That is it!  You can either restart your computer to test its automount capability, or force the mount using the following command:

sudo mount /rstor

With an understanding of this process, it should be clear how you can add more rstor mount points to the same system.  Enjoy!

Back to top of page