Microsoft Virtualization Discussions

set-ncquota -target

scheckel
4,721 Views

Hi,

i want to know, why the parmeter -target has to have the volume /vol/VOLNAME/qtree path in it:

PS C:\Users\c5103331> set-ncquota -Volume myfirstvol -target quota -type tree -disklimit 1g -Vservercontext derotvs0002

Set-NcQuota : Invalid target quota specified for tree quota rule.  Target for explicit tree quota rule for volume myfir

stvol must be in "/vol/myfirstvol/<qtree-name>" format.

At line:1 char:12

+ set-ncquota <<<<  -Volume myfirstvol -target quota -type tree -disklimit 1g -Vservercontext derotvs0002

    + CategoryInfo          : InvalidOperation: (NetApp.Ontapi.Filer.C.NcController[]:NcController[]) [Set-NcQuota], E

   QUOTAINVALID

    + FullyQualifiedErrorId : ApiException,DataONTAP.C.PowerShell.SDK.Cmdlets.Quota.SetNcQuota

set-ncquota -Volume myfirstvol -target /vol/myfirstvol/quota -type tree -disklimit 1g -Vservercontext derotvs0002

On the the cli

volume quota rule create -vserver derotvs0002 -policy-name default -volume myfirstvol -type tree -target quota -disk-limit 1g

volume quota> rule show -vserver derotvs0002 -policy-name default -volume myfirstvol

  (volume quota policy rule show)

Vserver: derotvs0002       Policy: default           Volume: myfirstvol

                                               Soft             Soft

                         User         Disk     Disk   Files    Files

Type   Target    Qtree   Mapping     Limit    Limit   Limit    Limit  Threshold

-----  --------  ------- -------  --------  -------  ------  -------  ---------

tree   q_first   ""      -            10GB        -       -        -          -

tree   quota     ""      -             1GB        -       -        -          -

2 entries were displayed.

Best wishes,

Markus.

3 REPLIES 3

bsti
4,721 Views

Quotes only exist on qtrees (not volumes) and to date, I've always had  to refer to LUNs and QTrees by their paths.  In this case, since you are setting a quota on a qtree, you have to specify the path to the QT.  I imagine the reason why is you can have more than one LUN or qtree in a volume, so specifying the volume name is not specific enough.

scheckel
4,721 Views

I named the qtree "quota" but its strange the i have to enter in the target also the volumen name. I would expect, that i only enter the name of the qtree.

Best wishes,

Markus.

bsti
4,721 Views

I think any API that interacts with either a LUN or Qtree expects a path, not just a name.  I'm willing to bet there aren't many (if any) exceptions.  Get-NaLun for instance expects a LUN path, not a LUN name.  Get-NaQtree is the same way.

Public