locked
Does file share preview support NFS for mounting in linux? RRS feed

  • Question

  • I've been experimenting with the file share preview and realized that cifs doesn't really support a true file share, allowing proper permissions.

    Is it possible to use the file share with NFS?

    thanks
    Ricardo

    Friday, March 6, 2015 10:26 PM

Answers

  • Hello Ricardo,

    My bad, I misunderstood your question and had told Malar that it possible to mount file share using NFS.

    CIFS and NFS are two different protocols used for filesharing and cannot be in each other's stead.

    Azure files is CIFS share on the server side and has to be mounted as a CIFS share on the client side.

    Thanks,
    Liju

    • Marked as answer by RicardoK Friday, March 13, 2015 4:52 PM
    Wednesday, March 11, 2015 12:42 PM
  • RicardoK,

    No, you can't mount an Azure file share via NFS. Azure file shares only support CIFS (SMB version 2.1). Although it doesn't support NFS you can still mount it to a Linux system via CIFS. Install the "cifs-utils" package ("apt-get install cifs-utils" on Ubuntu). You can then mount it manually like this:

    $ mount -t cifs \\\\mystorage.blob.core.windows.net\\mydata /mnt/mydata -o vers=2.1,dir_mode=0777,file_mode=0777,username=mystorageaccount,password=<apikeygoeshere>

    Or you can add it to your /etc/fstab to have it mounted automatically at boot. Add the following line to your /etc/fstab file:

    //mystorage.blob.core.windows.net/mydata /mnt/mydata cifs vers=2.1,dir_mode=0777,file_mode=0777,username=mystorageaccount,password=<apikeygoeshere>

    It's not as good as having a real NFS export, but it's as good as you can get using Azure Storage at the moment. If you truly want NFS storage in Azure, the best approach is to create a Linux VM that you configure as an NFS file server and create NFS exports that can be mounted on all of your Linux servers.

    -Robert  



    Friday, March 13, 2015 4:47 PM

All replies

  • Hello Ricardo

    I am currently researching to gather more information which might take some time and hence will get back to you shortly.

     Appreciate your time and patience.

    Thanks,
    Syed Irfan Hussain

    Saturday, March 7, 2015 10:45 AM
  • Hi Ricardo,

    Yes, it is possible to use File Share with NFS in Linux.

    However, if you face any roadblocks, please provide us a detail of the challenge and the Linux OS you are using.

    Regards,
    Malar.

    Monday, March 9, 2015 4:28 PM
  • Thank you for your feedback.

    I have a file share created, I was able to mount it via CIFS, but I would like to use NFS instead.

    I have an azure linux ubuntu VM and I'm trying to perform an nfs mount. However, I imagine that I need to somehow configure the file share server to accept a mount request? My attempt at mounting just sits there without a response... my guess is that the firewall for the NFS ports isn't setup so the mount request never gets there.

    This is what I'm attempting from the linux VM:

    sudo mount -t nfs4 fileshare000.file.core.windows.net:/shared-data /media

    sudo mount -t nfs fileshare000.file.core.windows.net:/shared-data /media

    Both attempts simply do not provide a response

    Monday, March 9, 2015 5:37 PM
  • Hi,

    could you please provide a follow-up response?

    thank you

    Wednesday, March 11, 2015 1:39 AM
  • Hello Ricardo,

    My bad, I misunderstood your question and had told Malar that it possible to mount file share using NFS.

    CIFS and NFS are two different protocols used for filesharing and cannot be in each other's stead.

    Azure files is CIFS share on the server side and has to be mounted as a CIFS share on the client side.

    Thanks,
    Liju

    • Marked as answer by RicardoK Friday, March 13, 2015 4:52 PM
    Wednesday, March 11, 2015 12:42 PM
  • RicardoK,

    No, you can't mount an Azure file share via NFS. Azure file shares only support CIFS (SMB version 2.1). Although it doesn't support NFS you can still mount it to a Linux system via CIFS. Install the "cifs-utils" package ("apt-get install cifs-utils" on Ubuntu). You can then mount it manually like this:

    $ mount -t cifs \\\\mystorage.blob.core.windows.net\\mydata /mnt/mydata -o vers=2.1,dir_mode=0777,file_mode=0777,username=mystorageaccount,password=<apikeygoeshere>

    Or you can add it to your /etc/fstab to have it mounted automatically at boot. Add the following line to your /etc/fstab file:

    //mystorage.blob.core.windows.net/mydata /mnt/mydata cifs vers=2.1,dir_mode=0777,file_mode=0777,username=mystorageaccount,password=<apikeygoeshere>

    It's not as good as having a real NFS export, but it's as good as you can get using Azure Storage at the moment. If you truly want NFS storage in Azure, the best approach is to create a Linux VM that you configure as an NFS file server and create NFS exports that can be mounted on all of your Linux servers.

    -Robert  



    Friday, March 13, 2015 4:47 PM
  • I understand. I did mount it as CIFS but that is unsuitable for my needs. I have already resorted to NFS server via linux VM, but I was hoping to leverage the file share service instead.
    Friday, March 13, 2015 4:51 PM
  • Hi,

    Were you able to make NFS work on Azure? which ports did you open?

    Thanks


    NinadK

    Friday, June 19, 2015 12:36 PM
  • Hi,

    Just a few pointers about this:

    Although mounting a SMB/CIFS works fine, it has some limitations, particularly around file/dir security. So you wouldn't be able to perform chmod and chown to files and directories located in the smb/cifs mount [*] so keep that in mind.

    ---

    [*] unless someone here knows something that I don't know :) 

    Wednesday, July 13, 2016 9:23 AM