Installing the Mount Helper utility
Install Mount Helper on your compute host to automate encrypted connections to File Storage for VPC. You can download the package from GitHub or build it from source code.
Before you begin
Before you install Mount Helper, review the requirements and limitations to ensure your environment is compatible.
You must connect to your compute host:
- Connect to your virtual server instance.
- Connect to your bare metal server.
- If you want to access the file shares from IBM Power Virtual Server instances, you must use a network path through a load balancer. For more information, see the following tutorial: Accessing File Storage for VPC shares from IBM Power Virtual Server instances.
If you want to mount a regional file share on an IBM Power VSI, download the installation package, and follow the steps of Installing the Mount Helper to mount regional file shares.
Downloading the installation package
-
Download the Mount Helper package from GitHub.
curl -LO https://github.com/IBM/vpc-file-storage-mount-helper/releases/download/latest/mount.ibmshare-latest.tar.gzTo establish an encrypted connection between a bare metal server and a file share, download Mount Helper version 0.2.1.
-
Extract the compressed file.
tar -xvf mount.ibmshare-latest.tar.gzThe file contains the following items: installation and uninstallation scripts,
rpmanddebpackages, root CA certificates, and the configuration file.Closed environments: To install Mount Helper on a virtual server instance without internet connection, create or update a local repository on the VSI based on the OS. Copy the Mount Helper package along with its dependencies to the local directory.
Installing the Mount Helper to mount zonal file shares
-
To install the Mount Helper and all the dependencies, use the following script and specify the region where the file share is going to be mounted.
./install.sh region=us-southThe
regionargument is used to copy region-specific root CA cert. If no region is specified, then the utility copies all the root CA certs. The following table shows the values that you can use to specify the region.Region values that the script accepts Location New value Previous Value Australia - Sydney au-sydsydBrazil - Sao Paulo br-saosaoCanada - Montreal ca-monCanada - Toronto ca-tortorGermany - Frankfurt eu-defraIndia - Chennai - Airtel in-cheIndia - Mumbai - Airtel in-mumJapan - Osaka jp-osaosaJapan - Tokyo jp-toktokSpain - Madrid eu-esmadUnited Kingdom - London eu-gblonUnited States - Washington, DC us-eastwdcUnited States - Dallas, TX us-southdal -
Optional - Every installation image is accompanied by a file that contains the checksum value for the image file. For example, the image file ibmshare-0.0.1.tar.gz is accompanied by the ibmshare-0.0.1.tar.gz.sha256 file that contains the checksum value. To verify the integrity of the downloaded package, use the following commands.
curl -LO https://github.com/IBM/vpc-file-storage-mount-helper/releases/download/latest/mount.ibmshare-latest.tar.gz.sha256sha256sum -c mount.ibmshare-latest.tar.gz.sha256A successful response shows "OK". The output looks like the following example.
# sha256sum -c mount.ibmshare-latest.tar.gz.sha256 ./mount.ibmshare-latest.tar.gz: OK -
Optional - By default, a certificate lasts 1 hour, and new certificates are fetched in every 45 minutes. However, you can modify the
certificate_duration_secondsoption in the configuration file/etc/ibmcloud/share.confto a different time interval. The new value must be between 5 minutes and 1 hour, and expressed in seconds.certificate_duration_seconds = 600The valid range for
certificate_duration_secondsvalue is 300 - 3600 seconds. The certificates are renewed when the current certs reach 70% of their lifetime. -
Optional - If you want to renew the certs immediately with the new expiration time, then run the following command.
/sbin/mount.ibmshare -RENEW_CERTIFICATE_NOW
Installing the Mount Helper to mount regional file shares
Standard installation with stunnel
- To install the Mount Helper and all the dependencies, use the following script and specify the
--stunneloption../install.sh --stunnel - Optional - Every installation image is accompanied by a file that contains the checksum value for the image file. For example, the image file ibmshare-0.0.1.tar.gz is accompanied by the ibmshare-0.0.1.tar.gz.sha256 file that contains the
checksum value. To verify the integrity of the downloaded package, use the following commands.
curl -LO https://github.com/IBM/vpc-file-storage-mount-helper/releases/download/latest/mount.ibmshare-latest.tar.gz.sha256
A successful response shows "OK". The output looks like the following example.sha256sum -c mount.ibmshare-latest.tar.gz.sha256# sha256sum -c mount.ibmshare-latest.tar.gz.sha256 ./mount.ibmshare-latest.tar.gz: OK
Installing without EPEL and StrongSwan dependencies
If you need to mount regional file shares with encryption in transit but want to avoid installing EPEL and StrongSwan packages, you can use the DO_NOT_INSTALL_IPSEC environment variable. This approach installs only the stunnel
components needed for regional file share mounting.
- Install the NFS utilities package.
dnf install nfs-utils - Download the Mount Helper package from GitHub.
curl -LO https://github.com/IBM/vpc-file-storage-mount-helper/releases/download/latest/mount.ibmshare-latest.tar.gz - Extract the compressed file.
tar -xvf mount.ibmshare-latest.tar.gz - Set the environment variable to skip IPsec installation.
export DO_NOT_INSTALL_IPSEC=true - Install the Mount Helper with the stunnel option.
./install.sh --stunnel - Verify that StrongSwan and EPEL were not installed.
A successful response shows that the packages are not installed:rpm -q strongswan epel-release && dnf repolist enabled | grep -i epelpackage strongswan is not installed package epel-release is not installed
After installation, you can mount regional file shares following the procedures in Mounting a regional file share. Traffic between the client and the file storage service is encrypted by using stunnel.
Building the Mount Helper utility from the source code
- On Debian-based instances, run the following commands:
apt-get update -y apt-get install git make python3 -y git clone https://github.com/IBM/vpc-file-storage-mount-helper.git cd vpc-file-storage-mount-helper make build-deb - On rpm-based instances, run the following commands:
yum update -y dnf install git make python3 rpm-build -y git clone https://github.com/IBM/vpc-file-storage-mount-helper.git cd vpc-file-storage-mount-helper make build-rpm
Updating the Mount Helper
To update the installation package, run the install.sh script again.
./install.sh
Use the --stunnel option when you want to upgrade the stunnel package, too.
Uninstalling the Mount Helper
The following command uninstalls the utility.
./uninstall.sh