This post has been republished via RSS; it originally appeared at: Azure Global articles.
Introduction
The Azure Netapp Files service has become very popular storage solution, satisfying the I/O requirements for many customer workloads (e.g. Oil and Gas, Manufacturing and Financial). Procedures for deploying Azure Netapp Files using the NFS and SMB protocols and accessing it from a Linux client and Windows client respectively will be discussed. The AzureCAT HPC azurehpc and Azure azure-quickstart-templates repositories will be used for the deployment.
Procedure to deploy Azure Netapp Files using the NFS protocol
-
Use the azurehpc repository to deploy the network, Linux client, Windows client, ANF account, ANF pool and ANF volume (NFS). First get the azurehpc repository.
-
git clone git@github.com:Azure/azurehpc.git
- Create a config.json file for the deployment. The config.json deploys a Linux client and windows client. ANF/NFS is mounted on the Linux client (See the appendix for the complete config.json file.)
-
-
- Deploy infrastructure (Make sure you are in the same directory as your config.json)
-
azure-build
-
- Deploy infrastructure (Make sure you are in the same directory as your config.json)
-
Log-in to Linux headnode
-
azhpc-connect headnode
-
-
Check that anf is mount correctly
-
df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 30G 4.4G 26G 15% /
devtmpfs 32G 0 32G 0% /dev
tmpfs 32G 0 32G 0% /dev/shm
tmpfs 32G 9.1M 32G 1% /run
tmpfs 32G 0 32G 0% /sys/fs/cgroup
/dev/sda1 497M 65M 433M 13% /boot
/dev/sdb1 126G 61M 120G 1% /mnt/resource
10.2.3.4:/anfvol1 100T 256K 100T 1% /netapps
tmpfs 6.3G 0 6.3G 0% /run/user/1000
-
Procedure to deploy Azure Netapp Files using the SMB protocol
- Deploy an Active directory server using active-directory-new-domain from the azure-quickstart-templates.
- First get the repository and go to the active-directory-new-domain directory
-
git clone git@github.com:Azure/azure-quickstart-templates.git
-
- Edit azuredeploy.json to allow it to be deployed via az cli and use the existing azurehpc infrastructure. The detailed edits are documented in the appendix.
- Edit azuredeploy.parameters.json
-
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/
deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"adminUsername": {
"value": "hpcadmin"
},
"adminPassword": {
"value": "hpcadmin.123"
},
"domainName": {
"value": "anf.local"
},
"dnsPrefix": {
"value": "anf"
}
}
}
-
-
Deploy AD server, note: deploy AD in its own resource group.
-
az group deployment create -g anf-smb-ad-wus2 --template-file
azuredeploy.json --parameters @azuredeploy.parameters.json
-
- Using the ANF pools, create ANF volume using the SMB protocol, set volume size and SMB share name.
- Log-in to windows client using the user/password defined in the azurehpc deployment.
- Change Windows client DNS server (set it to the private IP of the AD server)
- First find the Interfaceindex
-
PS C:\Users\azureuser> Get-NetIPConfiguration
InterfaceAlias : Ethernet
InterfaceIndex : 6
InterfaceDescription : Microsoft Hyper-V Network Adapter
NetProfile.Name : Network
IPv4Address : 10.2.4.5
IPv6DefaultGateway :
IPv4DefaultGateway : 10.2.4.1
DNSServer : 168.63.129.16 - Change DNS server
-
Set-DnsClientServerAddress -InterfaceIndex 6 -ServerAddresses 10.2.1.4
-
- Check the DNS server is working.
-
PS C:\Users\hpcadmin> nslookup anf.local
Server: UnKnown
Address: 10.2.1.4
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
Name: anf.local
Address: 10.2.1.4
-
-
- First find the Interfaceindex
- Join the Windows client to AD (you will be prompted for a password)
-
PS C:\Users\azureuser> Add-Computer -DomainName anf.local -Credential anf\hpcadmin
-
Restart the Windows client.
-
- Map network drive, go to the Azure portal to the ANF SMB volume you created and take note of the SMB mounting instructions (e.g \\testing-2e7d.anf.local\anfvol2).
-
File explorer --> network --> map network drive
-
Specify drive (e.g Z:) and file share location (e.g \\testing-2e7d.anf.local\anfvol2)
-
- Check that the ANF/SMB file share is mounted and available on the Windows client.
- Click on "This PC", should see the mounted ANF/SMB drive, click on properties to see more details about the file share.
- First get the repository and go to the active-directory-new-domain directory
Testing Azure Netapp Files
The azurehpc repository contains scripts for running IOR and FIO throughput and IOPS storage benchmarks, see azurehpc/apps/ior and azurehpc/apps/fio.
Appendix
Azurehpc config.json file used to deploy, ANF/NFS, headnode and Windows client.
{
"location": "variables.location",
"resource_group": "variables.resource_group",
"install_from": "headnode",
"admin_user": "hpcadmin",
"variables": {
"hpc_image": "OpenLogic:CentOS-HPC:7.6:latest",
"win_image": "MicrosoftWindowsDesktop:Windows-10:rs5-pron:latest",
"win_password": "",
"location": "",
"resource_group": "",
"vm_type": "Standard_D16s_v3",
"win_vm_type": "Standard_D16s_v3",
"vnet_resource_group": "variables.resource_group"
},
"vnet": {
"resource_group": "variables.vnet_resource_group",
"name": "hpcvnet",
"address_prefix": "10.2.0.0/20",
"subnets": {
"admin": "10.2.1.0/24",
"viz": "10.2.2.0/24",
"storage": "10.2.3.0/24",
"compute": "10.2.4.0/22"
}
},
"storage": {
"hpcnetapp": {
"type": "anf",
"subnet": "storage",
"pools": {
"anfpool" : {
"size": 8,
"service_level": "Premium",
"volumes": {
"anfvol1" : {
"size": 4,
"mount": "/netapps"
} } }} } },
"resources": {
"headnode": {
"type": "vm",
"vm_type": "variables.vm_type",
"public_ip": true,
"image": "variables.hpc_image",
"accelerated_networking": true,
"subnet": "compute",
"tags": [
"cndefault",
"nfsserver",
"loginnode",
"localuser",
"disable-selinux",
"mount-anfpool"
]
},
"winnode": {
"type": "vm",
"vm_type": "variables.win_vm_type",
"accelerated_networking": true,
"password": "variables.win_password",
"public_ip": true,
"image": "variables.win_image",
"subnet": "compute",
"tags": [
]
}
},
"install": [
{
"script": "disable-selinux.sh",
"tag": "disable-selinux",
"sudo": true
},
{
"script": "cndefault.sh",
"tag": "cndefault",
"sudo": true
},
{
"script": "nfsserver.sh",
"tag": "nfsserver",
"sudo": true
},
{
"script": "auto_netappfiles_mount_anfpool.sh",
"tag": "mount-anfpool",
"sudo": true
},
{
"script": "nfsclient.sh",
"args": [
"$(<hostlists/tags/nfsserver)"
],
"tag": "nfsclient", "sudo": true
},
{
"script": "localuser.sh",
"args": [
"$(<hostlists/tags/nfsserver)"
],
"tag": "localuser",
"sudo": true
}
]
}
Edits required to the active-directory-new-domain azuredeploy.json arm template to allow it to use the azurehpc deployed infrastructure
- Set the AD subnet address range, use admin subnet address range that was used in the azurehpc deployment.
-
"adSubnetName": "admin",
"adSubnetAddressPrefix": "10.2.1.0/24"
-
- Change virtualNetworkName, use same vnet deployed by azurehpc
-
"virtualNetworkName": "hpcvnet",
-
- Change virtualNetworkAddressRange, use same address range that was deployed by azurehpc.
-
"virtualNetworkAddressRange": "10.2.0.0/20",
-
-
Set IP for AD server (pick any unused IP from the admin subnet)
-
"adNicIPAddress": "10.2.1.4",
-
-
Set vnetRg, to be the resource group containing the vnet.
-
"vnetRg": ""
-
-
Set location of raw git files.
-
"_artifactsLocation": {
"type": "string",
"metadata": {
"description": "The location of resources, such as templates and
DSC modules, that the template depends on"
},
"defaultValue": "https://raw.githubusercontent.com/Azure/
azure-quickstart-templates/master/active-directory-new-domain"
-
-
Modify templateLink locations for files.
-
"templateLink": {
"uri": "[concat(parameters('_artifactsLocation'), '/nestedtemplates/vnet.json',
parameters('_artifactsLocationSasToken'))]",
"templateLink":
{"uri": "[concat(parameters('_artifactsLocation'), '/nestedtemplates/vnet-with-dns-server.json',
parameters('_artifactsLocationSasToken'))]",
-
-
Remove deployment of VNet, will use azurehpc vnet instead. Also remove all references to VNet.
-
Modify path to CreateADPDC.zip
-
"ModulesUrl": "[concat(parameters('_artifactsLocation'), '/DSC/CreateADPDC..zip',
parameters('_artifactsLocationSasToken'))]",
-