locked
File saved to VM mount not visible in Portal or File Explorer; file uploaded with Portal or File Explorer not visible in VM RRS feed

  • Question

  • I did the following without issue in Azure:

    Created storage account.

    Created File Share.

    Mounted file share on Ubuntu VM

    Copy files to the mounted file share.

    Now, when I attempt to view the files with the Portal or Azure File Explorer, no files are visible. Conversely, when I upload files with Portal for File Explorer, the files are not visible in the VM. I changed permissions on uploaded files (from VM) to 777, still neither Portal nor File Explorer could see them.

    Thanks for your help.

    Wednesday, April 17, 2019 7:09 PM

All replies

  • There could be a lag the system, I just tried on an instance in WEST US 2, and mounted a file share, was able to quickly get updates, in portal though I had to click on the refresh button on top. Same when uploading via portal, if i click on refresh All on top within Storage explorer , I get the updates. 
    Same on the VM as well when testing. Could you check if port 445 is not locked on the VM's Firewall ?
    Wednesday, April 17, 2019 10:28 PM
  • No luck.

    Went into portal, created both an inbound and outbound security rule to open Port 445. Both rules are enabled.

    Checked the VM. There is no firewall active; presumably it is protected by the network security group.

    There still appears to be an utter disconnect between how the VM reads and writes files to the file share and how the Portal and Azure Storage Explorer reads and writes files. e.g. I ssh into the VM and issue a command: cp test.txt <folder mount>/test.txt neither the Portal nor Explorer can see test.txt. Yet, ls <folder mount> succeeds with test.txt and many other files I have written. Conversely when I upload with Portal, the command ls <folder mount>/ does not return the uploaded file, it only returns files I copied with the VM. Notwithstanding that we are dealing with the same file share, it appears to have a completely different set of files when accessing with Portal/Explorer than with the VM.

    Is there some obvious permission issue that I am missing? I have spent several hours tweaking role definitions and the like to no avail.

    Thanks for your help.

    Thursday, April 18, 2019 12:00 AM
  • Additional investigation shows that the mount scripts provided by the portal, when run on the Ubuntu 18.04 VM do not mount the file share. They create a directory into which the file share may be mounted, the file share does not mount. To ascertain whether or not the file share is mounted, run the 'mount' command and see if the mount is listed.

    The copy and paste scripts provided by the portal do not work. It is necessary to use other scripts. The following scripts were tested and found to work.

    For Linux: sudo mount -t cifs //<storage-account-name>.file.core.windows.net/<share-name> <mount-point> -o vers=<smb-version>,username=<storage-account-name>,password=<storage-account-key>,dir_mode=0777,file_mode=0777,serverino
    Reference on this command is provided at https://docs.microsoft.com/en-us/azure/storage/files/storage-how-to-use-files-linux. Running this command will spontaneously mount the file share at the desired mount point.

    For Mac: mount_smbfs //<storage-account-name>@<storage-account-name>.file.core.windows.net/<share-name> <desired-mount-point>

    Running this command will cause a prompt for a password. Use the storage-account-key as embedded in the Linux command above. Obtain the key from the portal, one of the properties of the virtual machine.

    • Edited by elewis54 Friday, April 19, 2019 2:38 PM
    Thursday, April 18, 2019 9:37 PM
  • @elewis54 I confirm this is bug on our side. I notified the Service team after reading the script generated in portal. A fix will be rolled out today. 

    for now, could you run  the following to mount the drive: 

    sudo mount -t cifs //<storage-account-name>.file.core.windows.net/<share-name> <mount-point> -o vers=<smb-version>,username=<storage-account-name>,password=<storage-account-key>,dir_mode=0777,file_mode=0777,serverino


    Let me know if this helps. 


    Thanks,

    Adam


    Friday, April 26, 2019 6:17 PM