Quota

Quota / Manage Quotas

This web service manipulates the quota system in the StorNext file system.

This web service runs the snquota command.

Parameters

Parameter

Req / Opt

Num

Description

CLI Option

mode

Optional 1 This option specifies if the job will be run synchronously or asynchronously. The valid values are sync and async. The default value is sync. None

jobtype

Optional 1 This parameter is used for async mode only and enables the user to run it as a fast or slow job. Valid values are fast and slow. The default value is fast. None

format

Optional

1

The output format requested. Valid values are xml, json and text. The default is text.

-o

fsname

Required

1

Specify FileSystemName as the file system to manipulate.

-F

path

Optional

1

Specify the file system containing Path as the file system to manipulate.

-P

action

Required

1

Specify the action. Valid values are create, delete, list, listall, mark, rebuild, and set.

create = -C

delete = -D

list = -G

listall = -L

mark = -M

rebuild = -R

set = -S

absolute

Optional

1

Specifies if the path is absolute. Default value is false.

-a

directory

Optional

1

This option specifies a DQNS on a StorNext file system to be used with the actions.

-d

exact

Optional

1

When used with the list or listall actions, numbers will be printed as exact values.

-e

files

Optional

1

This option is only useful with the list and set actions and the directory option. When this option is present, limits and values represent the number of regular files contained in the DQNS.

-f

groupname

Optional

1

This option specifies the name of a group to get or set with the list or set action.

-g

hostname

Optional

1

Use a hostname in a StorNext cluster that is different from the cluster the command is being run on. This option is rarely needed.

-H

hardlimit

Optional

1

This option specifies a hard limit to set when used with the set action.

-h

softlimit

Optional

1

This option specifies a soft limit to set when used with the set action.

-s

graceperiod

Optional

1

This option specifies a grace period to set when used with the set action.

-t

user

Optional

1

This option specifies the name of a user to get or set with the list or set action.

-u

Usage and Limits are printed in a human-readable form, suffixed with "K", "M", "G", "T", or "P" for kilobytes, megabytes, gigabytes, terabytes, or petabytes (respectively).

These are base-2 values (in other words, 1K = 1024). A value without a suffix is in bytes.

Example

https://<<SERVER>>/sws/v2/quota/snquota
?fsname=snfs1
&action=listall
&format=xml

Output

<?xml version="1.0" encoding="UTF-8" ?>

<snquota xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="snquota.xsd">

<userQuotas>

<quota>

<hardLimit>0</hardLimit>

<softLimit>0</softLimit>

<gracePeriod>0</gracePeriod>

<curSize>327M</curSize>

<status>NoLimit</status>

<type>user</type>

<name>root</name>

</quota>

</userQuotas>

<groupQuotas>

<quota>

<hardLimit>0</hardLimit>

<softLimit>0</softLimit>

<gracePeriod>0</gracePeriod>

<curSize>327M</curSize>

<status>NoLimit</status>

<type>group</type>

<name>root</name>

</quota>

</groupQuotas>

<directoryQuotas>

<quota>

<hardLimit>5.0T</hardLimit>

<softLimit>2.0T</softLimit>

<gracePeriod>2w</gracePeriod>

<curSize>0</curSize>

<status>Under</status>

<type>dir</type>

<name>/foobar</name>

</quota>

<quota>

<hardLimit>0</hardLimit>

<softLimit>0</softLimit>

<gracePeriod>0</gracePeriod>

<curSize>0</curSize>

<status>NoLimit</status>

<type>dirfiles</type>

<name>/foobar</name>

</quota>

</directoryQuotas>

<returnCode>0</returnCode>

</snquota>