Tuesday, September 21, 2010

Tracking Quotas on NetApps

Mark is working on a Powershell script which will replace the vendor package, QFS from NTP Software.

I’ve now set a qtree tracking quota on every volume that has a qtree in it on itsnas01b – we will have to turn off quotas and back on again for the tracking quota to work so I will work through them all this week but going forward, if you need to add or change a quota on any of the qtree volumes, you can just hit resize and the changes should take effect immediately. Below are all the volumes I’m adding tracking quotas for:

* tree@/vol/shared1 - -

* tree@/vol/shared2 - -

* tree@/vol/shared3 - -

* tree@/vol/shared4 - -

* tree@/vol/shared5 - -

* tree@/vol/shared6 - -

* tree@/vol/IMFO - -

* tree@/vol/microbiology - -

* tree@/vol/library - -


The script goes as follows (9/10/2010) --

I’m putting together a howto in case we need to find a user who is using up too much space on their home directory:

below is how to do it in powershell using the netapp powershell toolkit – there is at least one caveat – the quota report is not available when the filer is initializing a new quota/volume/etc (this is true from within filerview as well). I’ve turned on the quotas on all but home1,3 and 5 so far – 3 is currently at 60% done. I will be turning on 5 when 3 is done and I will try to get to home1 tonight.

let me know if you have any questions

Download and install script are here:

http://communities.netapp.com/community/interfaces_and_tools/data_ontap_powershell_toolkit/data_ontap_powershell_toolkit_downloads?view=documents

once you have it installed:

PS E:\>connect-nacontroller itsnas01a

PS E:\>$q = get-naquotareport

PS E:\>$q | select-object quotausers,diskused,filesused,volume

PS E:\>$q | select-object quotausers,diskused,filesused,volume >> quotareport-09102010.txt

PS E:\> $q | ? {$_.quotausers[0].quotausername -eq "iowa\ltrapaneiii"}

Cannot index into a null array.

At line:1 char:23

+ $q | ? {$_.quotausers[ <<<<>

+ CategoryInfo : InvalidOperation: (0:Int32) [], RuntimeException

+ FullyQualifiedErrorId : NullArray

DiskLimit : -

DiskUsed : 0

FileLimit : -

FilesUsed : 1

Qtree :

QuotaTarget :

QuotaType : user

QuotaUsers : {IOWA\ltrapaneiii}

SoftDiskLimit : -

SoftFileLimit : -

Threshold : -

Vfiler :

Volume : home0

Cannot index into a null array.

At line:1 char:23

+ $q | ? {$_.quotausers[ <<<<>

+ CategoryInfo : InvalidOperation: (0:Int32) [], RuntimeException

+ FullyQualifiedErrorId : NullArray

No comments:

Post a Comment