#Directory file size

1 messages · Page 1 of 1 (latest)

signal loom
#

I know there's a limit called "maxdirsize" but how do you check on current directories and how many megabytes has already been allocated?

I have a folder with 600k files and steadily growing, would be nice to see how close it is to the limit.

I was hoping to see this mentioned in the Filesystem analytics page in System manager but I think it just lists number of files.

tawny niche
#

If you know the path, you can look at the size of the directory via ls and compare that to maxdirsize.

signal loom
#

And how do I use "ls" in ONTAP 9.12 ?

calm cargo
#

You do it in the client afaik

blazing coral
#

ls doesn't show you the "size" of the directory. It shows you the files in it. The directory size in ONTAP is actually more, because ONTAP stores for example 2 or 3 different file names for each file, depending on volume language etc.

tawny niche
#

ls -lsd can show you the size of the directory entry, which corresponds with maxdirsize. Might need -k or -h depending on flavor of ls/unix to get more human readable output.

signal loom
#

And can someone provide a way to do this in the ONTAP node shell?

craggy cedar
#

you really don't want 600k in one "folder" ... it's just going to be very slow, fwiw

signal loom
#

Performance might not be a requirement, I still wish to know how to check the current directory file size from within ONTAP.

tiny finch
#

Just mount from NFS and do a ls -lah.

#

There might be some diag "inode" show command but I really don't know enough to say.

signal loom
#

Found it! So to answer my own question if someone is searching here:

node run -node <node>; priv set diag; ls -ld /vol/<volume>/<path>
(size is displayed in bytes, so divide by 1048576 to get MB)

tiny finch
#

Ah I wonder if that pulls "ls" in from the BSD underneath. Neat.

#

TMYK