NetApp Command Line Example – Create a SVM with CIFS/NFS share

This is short post to document the command lines used to create a NetApp SVM and enable CIFS/NFS protocols.

In this example, a new SVM svmshare001 will be created with a LIF interface in VLAN 100, in addition, the CIFS and NFS protocols will be enabled with a root share and a data share (engineering).

# Create a new SVM in an existing aggregate 
vserver create -vserver svmshare001 -rootvolume svmshare001_root -aggregate storagectla_SSD_1 -language C.UTF-8 -rootvolume-security ntfs -snapshot-policy default

#Remove the un-used protocols
vserver show-protocols -vserver svmshare001
vserver remove-protocols -vserver svmshare001 -protocols fcp,iscsi,ndmp

#Create the network interfaces in NetApp storage in VLAN 100
network interface create -vserver svmshare001 -lif svmshare001_cifs_nfs_lif1 -role data -data-protocol nfs,cifs -home-node storagectla -home-port a0c-100 -firewall-policy mgmt-nfs -address -netmask

#Create the default gateway for the network interface created in the last step
network route create -vserver svmshare001-destination -gateway
network interface show -vserver svmshare001

#Configure DNS
vserver services dns show
vserver services dns create -vserver svmshare001 -name-servers, -domains

#Configure the CIFS protocol
vserver cifs show
vserver cifs create -vserver svmshare001 -cifs-server svmshare001 -domain

#Configure the NFS protocal
vserver nfs status -vserver svmshare001
vserver nfs create -vserver svmshare001 -v3 enabled -access true
vserver nfs show -vserver svmshare001

#Configure the export policy. (In this example, all the IP and user can access the CIFS and NFS SVM)
vserver export-policy show
vserver export-policy rule show
vserver export-policy rule create -vserver svmshare001 -policyname default -clientmatch -protocol cifs,nfs -rorule any -rwrule any -superuser any -anon 65534 -ruleindex 1
vserver export-policy rule show -policyname default -instance

#Create CIFS Root Share
vserver cifs share show
vserver cifs share create -vserver svmshare001 -share-name nsroot -path /

#Create volume engineering with junction path
volume create -vserver svmshare001 -volume engineering -aggregate storagectla_SSD_1 -size 10GB -percent-snapshot-space 5 -space-guarantee none -tiering-policy none -policy default -junction-path /engineering -autosize-mode grow_shrink -max-autosize 200GB
volume show -vserver svmshare001 -volume engineering -instance
volume show-footprint -volume engineering

#Create the data share (engineering share in this example)
vserver cifs share create -vserver svmshare001 -share-name engineering -path /engineering

1 thought on “NetApp Command Line Example – Create a SVM with CIFS/NFS share

  1. Pingback: Random Short Take #73 |

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s