Azure file SMB3.0 files sharing Service (4)

Source: Internet
Author: User

Using the Azure file sharing service on Linux

Using SMB 3.0 to connect to Azure from the user's own data requires an encrypted connection, but the current Linux SMB client is temporarily unsupported, and the Linux open source community is working to add that functionality to the Linux distribution, so for now, Users cannot directly mount the Azure file sharing service in their data center using a Linux machine, nor can they use it across region.

This article is all about Linux virtual machines on Azure, using Azure's file sharing services, and with Azure in the same region. China area Linux versions of Azure File storage can be used as follows:

  • Ubuntu Server 14.04

  • Ubuntu Server. Ten

  • CentOS 7.1

  • CentOS 7.2

  • Open SUSE 13.2

  • SUSE Linux Enterprise Server 12

    Using the Azure file service on CentOS 7.X

  1. Install the relevant SMB tools and drivers on CentOS:

    $ sudo yum install samba-client Samba-common cifs-utils

    650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/845013/201605/845013-20160511111011218-1510561114. PNG "style=" border:0px; "/>

  2. After the installation is complete, create a mount directory, such as/mnt/myfileshare:

    650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/845013/201605/845013-20160511111013249-868191203. PNG "style=" border:0px; "/>

  3. Once the installation is complete, you can use the Mount command to mount the Azure File shared service, using the following command:

    sudo mount-t CIFS//Storage account name. File.core.chinacloudapi.cn/mysharename./mymountpoint-o vers=3.0,username=myaccountname,password= Storage Account Key,dir_ mode=0777,file_mode=0777

For example:

sudo mount-t cifs//mystorageacctfile.file.core.chinacloudapi.cn/myfileshare/mnt/fileshare-o vers=3.0,user= Mystorageacctfile,password= "XXXXX", dir_mode=0777,file_mode=0777

Once created, you can see the files that were previously uploaded in PowerShell:

650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/845013/201605/845013-20160511111015280-1131341921. PNG "style=" border:0px; "/>

Test the Mounted directory structure, create a directory, and create a file:

650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/845013/201605/845013-20160511111017499-786551441. PNG "style=" border:0px; "/>

Get the file updates in the shared files directory in PowerShell, and you can see the total newly created directories and files for the shared file system:

650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/845013/201605/845013-20160511111019687-685619431. PNG "style=" border:0px; "/>

4. In order to persist file mounts for the Azure file sharing service, you need to add mount points and services to the Fstab file, for example in the previous example:

Mystorageacctfile.file.core.chinacloudapi.cn/myfileshare/mnt/fileshare CIFS vers=3.0,username= mystorageacctfile,password=xxxx,dir_mode=0777,file_mode=0777

650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/845013/201605/845013-20160511111021359-1760525975. PNG "style=" border:0px; "/>

Your azure file share will still connect automatically after the reboot.

Using the Azure file service on Ubuntu 15.10

1. Install the CIFS driver, in fact in the latest Ubuntu 15.10, the default CIFS drivers and tools have been installed

650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/845013/201605/845013-20160511111022827-1363108466. PNG "style=" border:0px; "/>

2. Mount the Azure file store to the specified mount point, as in the CentOS command:

sudo mount-t cifs//mystorageacctfile.file.core.chinacloudapi.cn/myfileshare/mnt/fileshare-o vers=3.0,user= mystorageacctfile,password=xxxx,dir_mode=0777,file_mode=0777

3. Add Fstab Auto-start.

Using the Azure file service on SuSE

1. The general process is similar to the Linux process above and requires the installation of Samba-related services:

650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/845013/201605/845013-20160511111024687-279176940. PNG "style=" border:0px; "/>

2. Mount the Azure file store to the specified mount point:

sudo mount-t cifs//mystorageacctfile.file.core.chinacloudapi.cn/myfileshare/mnt/fileshare-o vers=3.0,user= mystorageacctfile,password=xxxx,dir_mode=0777,file_mode=0777

3. Add the configuration fstab so that shared storage can be loaded automatically.


Azure file SMB3.0 files sharing Service (4)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.