NetApp PowerShell Toolkit 101: Storage Virtual Machine Configuration

Storage Virtual Machines (SVM) are the entity in clustered Data ONTAP which the storage consumer actually interacts with. As the name implies, they are a virtual entity, however they are not a virtual machine like you would expect. There are no CPU, RAM, or other cache assignments that must be made. Instead, we assign storage resources to the SVM, such as aggregates and data LIF(s), which the SVM then uses to provision FlexVols and make them available via the desired protocol.

In this post we will look at how to configure an SVM using PowerShell.

  • Create an SVM
  • Aggregate Access
  • SVM DNS Service
  • Configuring Data LIF(s)
  • Configuring Protocols

Create an SVM

Destroying SVMs can be a complex task, as all of the resources it uses must be removed first. Vidad Cosonock has created a script here that will automate removing an SVM, I highly recommend using that to simplify removing the SVM.

Aggregate Access

Limiting the aggregates that the SVM has access to can be beneficial when in a multitenant environment so that you can dedicate disks to specific tasks/customers. However, it can also be useful regardless of your use of mutlitenancy by preventing volumes from being created on root aggregates.

Managing aggregate access is done by modifying the SVM properties. We can wrap that into functions to make it even easier:

Using these functions it’s now quite easy to modify the aggregates that an SVM has permission to use:

Finally, let’s add only non-root aggregates to the SVM:

SVM DNS Service

Configuring Data LIF(s)

Before we can enable data access protocols we need to have a way of accessing the data. NetApp uses logical network interfaces, known as LIFs, assigned to the SVM. Let’s look at creating LIFs for the different protocols:

  • NFS / CIFS / SMB
  • iSCSI
  • FC / FCoE

Configuring Procotols

A newly created SVM will not have any protocols assigned to it. Adding and configuring the protocols is a few simple commands.

  • NFS
  • SMB / CIFS
  • iSCSI
  • FC / FCoE

5 thoughts on “NetApp PowerShell Toolkit 101: Storage Virtual Machine Configuration

  1. Thank you for posting this. I think we need to get better at providing real world examples in the toolkit. I was scratching my head with my first NFS build on cDOT.

    • Hi Scott,

      Thank you for reading! If there are other examples you’d like to see, please let me know…I’m always looking for use cases.

      Andrew

  2. Hi, I just started out using powershell with netapp. and was wondering how i would go about extending a volume with powershell.

    • Hello Anindra,

      Yes, you can. One way is to simply loop over them like this:

      foreach ($vserver in Get-NcVserver) {
          # any command could go in here
          Write-Host $vserver.vserver
      }

      Hope that helps.

      Andrew

Leave a Reply

a110c823d82ca1eaac8eb246da445ffaaaaaaaaa