Thursday, June 5, 2014

Using the Azure File Service on Linux

The Microsoft Azure File Service is a new SMB shared-storage service offered on the Microsoft Azure public cloud.

The service allows for the instant provisioning of file shares for private access by cloud provisioned VMs using the SMB 2.1 protocol, and additionally supports public access via a new REST interface.

Update 2015-05-25: File shares can now also be provisioned from Linux using Elasto.



Linux VMs deployed on Azure can make use of this service using the Linux Kernel CIFS client. The kernel client must be configured to support and use the SMB 2.1 protocol dialect:
  • CONFIG_CIFS_SMB2 must be enabled in the kernel configuration at build time
    • Use
      # zcat /proc/config.gz | grep CONFIG_CIFS_SMB2
      to check this on a running system.
  • The vers=2.1 mount.cifs parameter must be provided at mount time.
  • Furthermore, the Azure storage account and access key must be provided as username and password.

# mount.cifs -o vers=2.1,user=smb //smb.file.core.windows.net/share /share/
Password for smb@//smb.file.core.windows.net/share:  ******...
# df -h /share/
Filesystem                         Size  Used Avail Use% Mounted on
//smb.file.core.windows.net/share  5.0T     0  5.0T   0% /share

This feature will be supported with the upcoming release of SUSE Linux Enterprise Server 12, and future openSUSE releases.

Disclaimer: I work in the Labs department at SUSE.

3 comments:

  1. Hi ddis, do you if there are any plans to have SMB v 3.0 helper supported on SLES 12 for mount.cifs tool, or is there any tool/way to get automatically mounted an azure file share @boot?
    Tnx
    Regrds
    LnxNwb

    ReplyDelete
  2. Hi LnxNwb,

    I don't speak for SUSE, views on this blog are my own, yada yada yada :-).
    Steve French recently added SMB 3+ client support to the mainline Linux kernel, so there's a good chance that Linux distributions will include this functionality in future.

    Regarding on-boot mounts: fstab can be used to configure a Azure File Share mount at boot time - http://initrd.org/wiki/CIFS_Client_Setup#Client_Configuration seems to offer a good guide for this.

    ReplyDelete
  3. Didn't even knew that Using the Azure File Service on Linux is possible, thanks!

    ReplyDelete

Comments are moderated due to spammer abuse.