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

128 Views Asked by At

Up until recently when I log into the cloud console in portal.com I would have a folder under /home// 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

1

There are 1 best solutions below

2
RithwikBojja On

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