Use the CLI to quickly determine the size of your Celerra checkpoint filesystems

Need to quickly figure out which checkpoint filesystems are taking up all of your precious savvol space?  Run the CLI command below.  Filling up the savvol storage pool can cause all kinds of problems besides failing checkpoints.  It can also cause filesystem replication jobs to fail.

To view it on the screen:

nas_fs -query:IsRoot==False:TypeNumeric==1 -format:’%s\n%q’ -fields:Name,Checkpoints -query:TypeNumeric==7 -format:’   %40s : %5d : %s\n’ -fields:Name,ID,Size

To save it in a file:

nas_fs -query:IsRoot==False:TypeNumeric==1 -format:’%s\n%q’ -fields:Name,Checkpoints -query:TypeNumeric==7 -format:’   %40s : %5d : %s\n’ -fields:Name,ID,Size > checkpoints.txt

vi checkpoints.txt   (to view the file)

Here’s a sample of the output:

ckpt_ckpt_UserFilesystem_01_monthly_001 :   836 : 220000
ckpt_ckpt_UserFilesystem_01_monthly_002 :   649 : 220000

ckpt_ckpt_UserFilesystem_02_monthly_001 :   836 : 80000
ckpt_ckpt_UserFilesystem_02_monthly_002 :   649 : 80000

The numbers are in MB.


7 thoughts on “Use the CLI to quickly determine the size of your Celerra checkpoint filesystems”

  1. I am trying to get the value of my nas filesystems in GB or really TB. One problem is that SizeValues shows too many values, when I only want Total Size and Used Size with Percentage.

    I am using Windows. Here is my command with output:

    S:\Storage\DailyScripts>”S:\Storage\DailyScripts\plink” nasadmin@ -pw %sitepassword% “export NAS_DB=/nas;/nas/bin/nas_fs -query:inuse=y:type=uxfs:IsRoot=False -Fields:Name,Id,StoragePoolName,Size,SizeValues -format:’%10s %10s %20s %25d %45d\n'”
    fs1 961 clar_r5_performance 1200000 1181689,501552,680137,57,1210049984
    fs2 54 clarata_r6 11000000 10832153,2944670,7887482,72,11092124984
    fs3 55 clarata_r6 5500000 5416076,4105054,1311021,24,5546061984

    1. There isn’t any way to change the number of values that ‘SizeValues’ outputs, it exports “Total MB, Available MB, Used MB, Percent Allocated, ?uknown?”. I do most of my heavy scripting with bash (using Cygwin on windows or directly on the linux-based Celerra/VNX DART OS). I can’t give you an easy answer off the top of my head what you’d do using windows. You’d likely have to make a single output file for each file system, use some windows equivalent of ‘awk’ to strip out only the numbers you want from each file that was just created, store each one in a variable, then do the math calculation on those variables to output the conversion to TB. I’m sure it’s possible but it would take me many hours of time to figure it out, and I still have my regular job to do during the day. 🙂 I can do some basic research in the next week or two and post again if I come up with something useful.

      Edit: I spent a little while doing some google searching and didn’t find an easy (or efficient) way to do it with a traditional windows batch file script. The easiest way to make the script would be to research options with Windows Powershell, install Cygwin on your windows server and create a unix type script, or create a unix script directly on the DART OS with the examples I’ve already posted on this blog to help out. I’m still planning on looking into it for you more in the coming weeks because I’m curious about it and it could help other admins out, but I don’t think a windows batch file is the best method to accomplish what you’re looking to do.

  2. wel my control station on my vnx doesnt take the line, too bad. I know there is an script somewhere within the box to retreive the size of all ckpoints in total, just cant find it anymore. 🙁 eitherway this is the error i get with you line
    Error 2101: Input must consist of ASCII or UTF-8 characters.

    1. little update in my search for this answer too, and found on a other site a post with this command

      expr `nas_fs -query:type==ckpt -format:”%s,%s\n” -Fields:BackupOf,sizevalues |sort -u -k 1,1|awk -F”,” ‘{a +=$2};END{print a}’` / 1024)

      tell’s you the total size of your Savvol, for all FSes ( change 2 to 4 for used amount, change 2 to 3 for reserved space).

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.