Guides

Install NFS Storage

Used to install NFS storage in Kubernetes environment.

Before formal deployment, you need to ensure that your Kubernetes environment version is 1.17 and above, and it is a CentOS/Ubuntu/UOS system.

All the files required for this document can be downloaded from Baidu Netdisk: https://pan.baidu.com/s/1lWLyyT1jAbADGuxEG3m4gA
Extraction code: ge4d

Preparing the installation package

Prepare the offline installation package for NFS Server (download the offline installation package for NFS Server of the corresponding version according to the operating system used. If you use an existing NFS Server, skip this step)

  • Location in the network disk (CentOS 7.5 system, also applicable to CentOS 7.6 and 7.9 environment): iManager部署包/软件工具包/NFS Server离线安装包/nfs-server-offline-centos-7.5.zip
  • Location in the network disk(Ubuntu 18.04):iManager部署包/软件工具包/NFS Server离线安装包/nfs-server-offline-ubuntu-18.04.zip

NFS Server Installation Steps

Here we take CentOS system as an example. The installation method of Ubuntu system is similar. If you already have an NFS server, you can skip this step.

  • Unzip nfs-server-offline-centos-7.5.zip on your local computer to get the supermap-nfs-server folder;
  • Copy the supermap-nfs-server folder to any machine, and then follow the following commands:

    Enter the supermap-nfs-server folder:

    cd supermap-nfs-server

    Execute the installation script:

    sudo chmod +x install.sh && ./install.sh

    The installation is complete as shown in the figure below.

    installnfs_finished

    Storage location of nfs after installation: /opt/nfs_data

    You can verify whether the nfs installation is successful by:

    mkdir test
    mount -t nfs <ip>:/opt/nfs_data test
    
    Parameter Description:
    <ip> is the IP address of the machine where the NFS Server is located

    After executing the above command, you can enter the “test” directory and create a file. For example, use the following command: vim test.txt. You can enter any character to save and exit: press the keyboard Esc key, enter “:wq” in the command line and press Enter. Then enter the /opt/nfs_data directory and use the following command: ll or ls -l. If the following figure is displayed, it means that the NFS Server is successfully installed.

    installnfs_suc

    Non-root users can verify whether the nfs installation is successful by the following method:

    service nfs status

    The result is as follows: The installation is successful:

    nfs-status-active

    If NFS Server, Ceph and other storage environments cannot be used, you can also install Longhorn