Lewkir
Lewkir

Reputation: 103

Azure cloud console clouddrive folder has unmounted and can't seem to get it back

Up until recently when I log into the cloud console in portal.com I would have a folder under /home/<user>/ called clouddrive.

I'm confident this file share still exists because I can click on the upload/download files button and go to manage file share and all my files will still be there, however, when I ls in the folder it is apparently empty apart from a folder called Microsoft which I don't remember from previously but contains the following structure: "Microsoft/Windows/PowerShell/AzPredictor".

I have gone through the steps in https://learn.microsoft.com/en-us/azure/cloud-shell/persisting-shell-storage both to add a new storage and to attempt to re-mount the old one but although it doesn't throw any errors, in neither instance does the drive come back.

When I run (Get-CloudDrive | Get-AzStorageAccount).Location, I get the message the drive is not mounted.

I ran df and found the drive had been mounted on /usr/csuser/clouddrive according to https://edyoung.github.io/blog/cloud_shell_files/ this is normal, however, it should also be visible under home yet mine is not (even with restarting the shell).

Is this a bug?

Has anyone encountered and knows how to fix it? it's inconvenient to have to change drive every time I log in.

Upvotes: 0

Views: 491

Answers (2)

Michael Goodman
Michael Goodman

Reputation: 1

My issue was a security change on my file share. If you change the security setting to Maximum or Custom, AES-128-GCM could get deselected. This will prevententer image description here the clouddrive from mounting.

Upvotes: 0

RithwikBojja
RithwikBojja

Reputation: 11148

Firstly, you need to create a storage account and file share in it, I have created in Location Central India.

enter image description here

I get the message the drive is not mounted.

To mount the storage account to clouddrive, you need to use below command and followed Microsoft-Document:

clouddrive mount -s "mySubscription" -g "myresourcegroup" -n "storageAccountName" -f "fileShareName"

enter image description here

After mounting you can use below command:

(Get-CloudDrive | Get-AzStorageAccount).Location

enter image description here

Upvotes: 0

Related Questions