MultiCloud Classroom notes 21/Sep/2026

EFS access from windows

  • EFS directly not suppourt to Windows directly
  • WSL2 install and install ubuntu
choco install wsl2 -y
choco install wsl-ubuntu-2204 -y
  • required IAM role or cridentals need to configure.
  • aws cli is required
  • nfs-common for Debian and Ubuntu distributions
sudo apt update && sudo apt install -y nfs-common
sudo mkdir -p /efs
sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport fs-09e84447d97adf7a8.efs.us-east-1.amazonaws.com:/ /efs

AFS – Azure File share

  • Azure AFS is managed by azure (NFS version 3.1)
  • will suppourt both windows & linux
  • Cost per GB
  • NFS and SMB to connect windows and linux servers (inbount/outbound need open ports)
  • vm, vmss, acs,aks and functions.
  • service user or manage identity
  • Network secuirty group (allow/deny network)

steps to create azure fileshare

  • create resource group and storage account (must be enable fileshare suppourt)
  • crate a file share
    • name azure file share
    • provision size
      • Up to 256 TiBStandard
      • Pay-as-you-go (HDD): Up to 100 TiB (Legacy accounts predating large file shares may be capped at 5 TiB until enabled)
      • Provisioned v1 (SSD & HDD): Up to 100 TiB
      • min 32 GB
  • select IOPS (read/wirte operation per second)
  • powershell scrpit
$connectTestResult = Test-NetConnection -ComputerName azurefileshare2205.file.core.windows.net -Port 445
if ($connectTestResult.TcpTestSucceeded) {
    # Save the password so the drive will persist on reboot
    cmd.exe /C "cmdkey /add:`"azurefileshare2205.file.core.windows.net`" /user:`"localhost\azurefileshare2205`" /pass:`"HtseegmpwaSfz4b5RqC48RlnIm4vS2RcRnAsp2mtActR9CzA16KCosrSSmsJTNU1bDbontm90w42+AStReCwNA==`""
    # Mount the drive
    New-PSDrive -Name N -PSProvider FileSystem -Root "\\azurefileshare2205.file.core.windows.net\demo-afs" -Persist
} else {
    Write-Error -Message "Unable to reach the Azure storage account via port 445. Check to make sure your organization or ISP is not blocking port 445, or use Azure P2S VPN, Azure S2S VPN, or Express Route to tunnel SMB traffic over a different port."
}

Types of azurefileshare tier

  • premium – pay – SSD
  • standard Transtion optimize -HDD
  • standard-hot-HDD
  • standard-cold -HDD

TO mount in linux

sudo apt update
sudo apt install cifs-utils

Verify port 445 connectivity

Refer here Refre_here

sudo mkdir -p /media/demo-afs
if [ ! -d "/etc/smbcredentials" ]; then
sudo mkdir /etc/smbcredentials
fi
if [ ! -f "/etc/smbcredentials/azurefileshare2205.cred" ]; then
    sudo bash -c 'echo "username=azurefileshare2205" >> /etc/smbcredentials/azurefileshare2205.cred'
    sudo bash -c 'echo "password=HtseegmpwaSfz4b5RqC48RlnIm4vS2RcRnAsp2mtActR9CzA16KCosrSSmsJTNU1bDbontm90w42+AStReCwNA==" >> /etc/smbcredentials/azurefileshare2205.cred'
fi
sudo chmod 600 /etc/smbcredentials/azurefileshare2205.cred

sudo bash -c 'echo "//azurefileshare2205.file.core.windows.net/demo-afs /media/demo-afs cifs nofail,credentials=/etc/smbcredentials/azurefileshare2205.cred,dir_mode=0755,file_mode=0755,serverino,nosharesock,mfsymlinks,actimeo=30" >> /etc/fstab'
sudo mount -t cifs //azurefileshare2205.file.core.windows.net/demo-afs /media/demo-afs -o credentials=/etc/smbcredentials/azurefileshare2205.cred,dir_mode=0755,file_mode=0755,serverino,nosharesock,mfsymlinks,actimeo=30

sudo systemctl daemon-reload

Task

  1. crate storage account and enable fileshare
  2. create azurefileshare with 32 GB
  3. creat linux and windows servers and port 445 need open inbound rules
  4. mount Azurefile share both win & linux
  5. create some dumy files and folder and test files added in Azure fileshare

Leave a ReplyCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Animated Social Media Icons by Acurax Responsive Web Designing Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Exit mobile version
%%footer%%