locked
Can't delete a file in File System in the Azure Portal RRS feed

  • Question

  • I created a File System, mounted it in Ubuntu following these instructions. Everything worked great, I mounted the drive and copied some files to it to test. I could see those files in the Azure Portal.

    After that, I tried to delete the files from the Azure Portal and keep on getting this error: https://www.screencast.com/t/iVGB8WqiM

    The drive is not mounted anywhere (I unmounted it from Ubuntu). How can I delete this file? Is there a way to force-delete a file from the Azure Portal?

    We were actually testing File System to see if we were going to incorporate it in our cloud infrastructure, but it seems it broke within minutes of usage. If deleting a file brings errors, how can we trust this in a production environment?


    Learn Game Development, VR, Machine Learning, Web Development at ZENVA --> https://zenva.com

    Friday, October 12, 2018 3:25 AM

All replies

  • Hi @fariazz , the issue you are encountering is mainly caused by open handles from the SMB protocol (not necessarily a someone using the file). This article provides and explanation: "When an SMB client opens a file for delete, it marks the file as pending delete until all other SMB client open handles on that file are closed.
    So in that specific state, it mentions that handle is still open, which results in the error you are getting. 

    The workaround is to use the Delete File operation from the rest api, more info is available here . There is also a similar thread including a code sample to use the delete operation. Let me know if this helps.

    Thanks,

    Adam

    Friday, October 12, 2018 11:25 PM
  • Thanks for your help.

    At the end, I tried again many days later to delete the file from within the OS where I had mounted this on, and it worked.

    What this tells me is the lock on these files is somehow released after a few days.


    Learn Game Development, VR, Machine Learning, Web Development at ZENVA --> https://zenva.com

    Sunday, October 28, 2018 3:42 AM