-1

Is there any way to create Azure File Share mounts on CentOS versions lower as 7?

Azure documentation recommends centos 7+ for it.

I have tried the same for CentOS 7 and Ubuntu 16.04.Its working fine. But for CentOS version under 7 it is not working.

2 Answers2

0

But for CentOS version under 7 it is not working.

It is a by design behavior, because Azure files share requires SMB 2 dialect which supported by newer CIFS module in RHEL 7.

Pasting the note from Redhat Support Forum:

"For RHEL when you use the mount command your are using the kernel driver for cifs. The features for cifs commections are tied to the kernel module providing this. You can see details for this with module "man mount.cifs" The RHEL6 kernel is only capabable of mounting older 1.0 smb protocol mounts. RHEL7 however can mount smb2 version of the protocal since the kernel is using a newer cifs module. On RHEL7 in "man mount.cifs" you will see the options to specify vers= 1.0, 2.0, 2.1, or 3.0."

If you want to mount Azure files share to Centos 6, as a workaround we can update your kernel to 3.1.0 or 4.6, install the last version of cifs-utils, but it is not recommended.

Jason Ye
  • 13,710
  • 2
  • 16
  • 25
  • thanks dude...Its a good explanation for me.Eventhugh kernel upgrade is not recommeneded whether it will work. –  Oct 11 '17 at 04:29
  • @arunmohan Does that work for you? please let me know if you need more help:) – Jason Ye Oct 11 '17 at 08:20
  • Yeah..presently iam working on another thing.if it become success i will post it.Thanks for the help dude –  Oct 12 '17 at 09:57
  • @arunmohan Have you test it? Does that work for you? please let me know if you need more help:) – Jason Ye Oct 17 '17 at 01:30
-1

As per my knowledge,you are missing the mount-point directory in the Linux VM to mount the SMB share to.

In Linux VM: You need to create a local directory at /mnt/mymountdirectory, use the following example to create a local directory:

sudo mkdir -p /mnt/mymountdirectory

Then Mount the SMB share to the local directory by providing your own storage account username and storage account key for the mount credentials as follows:

sudo mount -t cifs //myStorageAccount.file.core.windows.net/mystorageshare /mnt/mymountdirectory -o vers=3.0,username=mystorageaccount,password=mystorageaccountkey,dir_mode=0777,file_mode=0777

For more details, refer “Use Azure Files with Linux”.

And also, you may refer MSDN thread, which addressing your query.

CHEEKATLAPRADEEP
  • 12,191
  • 1
  • 19
  • 42
  • Note that the OP has no issues with file share mounts, but can only get it working in Centos 7+, not 6.x. Also note that the Azure [docs](https://learn.microsoft.com/en-us/azure/storage/files/storage-troubleshoot-linux-file-connection-problems) specifically call out using Centos 7+. – David Makogon Oct 10 '17 at 13:53
  • Nope i didnt missed anything like that.I think azure does not support it under 7. –  Oct 11 '17 at 04:17