Complete the code to create an Azure file share using Azure CLI.
az storage share create --name [1] --account-name mystorageaccountThe az storage share create command creates a file share. The --name parameter specifies the file share name, such as myfileshare.
Complete the code to mount an Azure file share on a Linux machine using SMB protocol.
sudo mount -t cifs //mystorageaccount.file.core.windows.net/[1] /mnt/myfileshare -o vers=3.0,username=mystorageaccount,password=mypassword,dir_mode=0777,file_mode=0777,serverino
The mount command requires the file share name after the storage account URL. Here, myfileshare is the correct file share name.
Fix the error in the Azure CLI command to upload a file to an Azure file share.
az storage file upload --share-name myfileshare --source ./localfile.txt --path [1] --account-name mystorageaccountThe --path parameter specifies the destination file name in the file share. It should be the file name like remoteFile.txt, not a share or container name.
Fill both blanks to create a file share and set its quota to 100 GB using Azure CLI.
az storage share create --name [1] --account-name mystorageaccount --quota [2]
The --name parameter is the file share name, here projectfiles. The --quota parameter sets the size limit in GB, here 100.
Fill all three blanks to upload a file, set metadata, and list files in an Azure file share using Azure CLI.
az storage file upload --share-name [1] --source ./data.txt --path data.txt --account-name mystorageaccount && az storage file metadata update --share-name [2] --path data.txt --metadata [3] --account-name mystorageaccount && az storage file list --share-name [1] --account-name mystorageaccount
The file share name is datashare for upload and metadata update. Metadata is set as key=value pairs like env=prod.