0

I have taken a dump of fsimage using OIV tool and NSQUOTA and DSQUOTA fields always have one of the following values

NSQUOTA

  • 1
  • null
  • -1
  • 0

DSQUOTA

  • -1
  • 0

What does NSQUOTA and DSQUOTA represent? How to interpret these values?

Aravind Yarram
  • 78,777
  • 46
  • 231
  • 327

1 Answers1

1

NSQUOTA is a name quota (similar to inodes) which limits how many files and directories are allowed under the specified directory.

DSQUOTA is a directory space quota which limits how many bytes are allowed under that directory.

Not sure about the other values but the -1 is the default value when you don't use quotas.

References

Community
  • 1
  • 1
tk421
  • 5,775
  • 6
  • 23
  • 34
  • For DSQUOTA the document says "A quota of zero still permits files to be created, but no blocks can be added to the files." any idea why a file can be created but no blocks can be added? – Aravind Yarram Nov 06 '18 at 19:43
  • I suppose you could use this if you wanted to allow a directory structure to be created. I think when Yahoo! designed this, they incorporated a lot of ideas from a shared UNIX/Linux environments running NFS which would be common 2007-2009. This same line is there in the earliest docs. https://hadoop.apache.org/docs/r0.23.11/hadoop-project-dist/hadoop-hdfs/HdfsQuotaAdminGuide.html – tk421 Nov 06 '18 at 20:18