I am trying to script the creation of SAN volume and then a LUN underneath using the CLI. The first problem is that there is no Storage Type option from the CLI that I can find. So creating the SAN volume with one command and then creating the LUN with a second command does not seem to be an option.
The second issue is if I try to just create the LUN and the volume at the same time using lun create, there is no option to select the aggregate that I want to use. I want the script to select a particular aggregate for this process.
Is there a way to do this without using WFA? Does Powershell have this capability? I am running CDOT 8.3.2P4.
After doing a little testing it looks like the NFS Storage Type option in System Manager only adds a mount point. Other than that, the volumes are exactly the same. I guess I could run the unmount command to remove the mount to make it a "SAN" volume but that seems a bit clunky.
Still working on trying to do this using the lun create command...
It is a two-step process with some prep up front. My ultimate goal is to be able to provision LUNs using a third-party tool to be used as quick, temporary lab environments. Here are the steps I went through.
1. Create a separate SVM with vsadmin enabled. I don't want my script hitting anything but this SVM and I don't want it having system-wide admin privileges.
2. The hosts on the other end will have static WWPNs so I created the igroups ahead of time in the new SVM.
3. Assign the appropriate aggregates to the SVM using vserver modify command: