General Discussion

Error again with this new version of Powershell Toolkit

PerhapsCloud
1,590 Views

Used to be able to expand a QTree quota with the following command without any problems:

 

set-NcQuota -path /vol/vol1/qtree1 -DiskLimit 150gb

 

Now with the new version it stopped working, keeps throwing an error of:

 

"Group parameter neither specified nor set"

 

Did anybody have that problem and knows a fix?? Thanks

1 ACCEPTED SOLUTION

mbeattie
1,342 Views

Hi,

 

No they don't have to match, just helps to troubleshoot. Sounds to me like a bug in the PSTK. Looking at the "Set-NcQuota" CmdLet it's using the following ZAPI:

 

 

<?xml version="1.0" encoding="UTF-8"?>
<netapp  xmlns="http://www.netapp.com/filer/admin" version="1.160">
  <quota-set-entry>
    <disk-limit></disk-limit>
    <file-limit></file-limit>
    <perform-user-mapping></perform-user-mapping>
    <policy></policy>
    <qtree></qtree>
    <quota-target></quota-target>
    <quota-type></quota-type>
    <soft-disk-limit></soft-disk-limit>
    <soft-file-limit></soft-file-limit>
    <threshold></threshold>
    <volume></volume>
  </quota-set-entry>
</netapp>

 

 As a workaround have you tried using the native REST API in a function rather than using the CmdLet in the PSTK? It looks like the equivalent REST API for the Set-NcQuota CmdLet is:

 

/storage/quota/rules

 

 

{
  "files": {
    "hard_limit": "100",
    "soft_limit": "80"
  },
  "qtree": {
    "id": "1",
    "name": "qt1"
  },
  "space": {
    "hard_limit": "1222800",
    "soft_limit": "51200"
  },
  "svm": {
    "name": "svm1"
  },
  "type": "user",
  "user_mapping": "on",
  "users": [
    {
      "name": "fred"
    }
  ],
  "uuid": "264a9e0b-2e03-11e9-a610-005056a7b72d",
  "volume": {
    "name": "fv"
  }
}

 

 

/Matt

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

View solution in original post

3 REPLIES 3

mbeattie
1,413 Views

Hi,

 

Which version of the PSTK are you running (See "Get-NaToolkitVersion") and which ONTAP version. If you are using the latest PSTK version have you tried using the "-ontapi" parameter when connecting to your cluster?

 

/Matt

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

PerhapsCloud
1,352 Views

Hi Matt,

 

I'm using 9.12.1 for the PSTK. My ontap however is 9.11.x, do they have to match?

I've already used the -ontapi parameter and still getting the same error.

mbeattie
1,343 Views

Hi,

 

No they don't have to match, just helps to troubleshoot. Sounds to me like a bug in the PSTK. Looking at the "Set-NcQuota" CmdLet it's using the following ZAPI:

 

 

<?xml version="1.0" encoding="UTF-8"?>
<netapp  xmlns="http://www.netapp.com/filer/admin" version="1.160">
  <quota-set-entry>
    <disk-limit></disk-limit>
    <file-limit></file-limit>
    <perform-user-mapping></perform-user-mapping>
    <policy></policy>
    <qtree></qtree>
    <quota-target></quota-target>
    <quota-type></quota-type>
    <soft-disk-limit></soft-disk-limit>
    <soft-file-limit></soft-file-limit>
    <threshold></threshold>
    <volume></volume>
  </quota-set-entry>
</netapp>

 

 As a workaround have you tried using the native REST API in a function rather than using the CmdLet in the PSTK? It looks like the equivalent REST API for the Set-NcQuota CmdLet is:

 

/storage/quota/rules

 

 

{
  "files": {
    "hard_limit": "100",
    "soft_limit": "80"
  },
  "qtree": {
    "id": "1",
    "name": "qt1"
  },
  "space": {
    "hard_limit": "1222800",
    "soft_limit": "51200"
  },
  "svm": {
    "name": "svm1"
  },
  "type": "user",
  "user_mapping": "on",
  "users": [
    {
      "name": "fred"
    }
  ],
  "uuid": "264a9e0b-2e03-11e9-a610-005056a7b72d",
  "volume": {
    "name": "fv"
  }
}

 

 

/Matt

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
Public