[GRASS-user] Maximum number of GRASS files within a mapset?

Glynn Clements glynn at gclements.plus.com
Fri Mar 23 19:38:42 EDT 2007


Paul Kelly wrote:

> > I seem to be running into a GRASS limitation relating to the maximum number 
> > of rasters available within a single mapset location, which appears to be 
> > exactly 32000.  Attempting to create additional rasters generates the 
> > message:
> >
> > ERROR: can't make mapset element cell_misc/test00
                                     ^^^^^^^^^

Note: cell_misc contains subdirectories, not files ...

> > which seems to be coming from lib/gis/mapset_msc.c:
> >  if (access (path, 0) != 0)
> >  G_fatal_error (_("can't make mapset element %s (%s)"), p_element, path);
> >
> > Is there any way of circumventing this limitation, or is it a hardcoded C 
> > limitation?
> 
> I fear it may be a Unix limitation - the maximum number of files in one 
> directory.

Or possibly the maximum link count; cell_misc has a subdirectory for
each map, and each subdirectory adds to its parent's link count due to
the ".." entry.

I note that <linux/ext2_fs.h> has this:

	/*
	 * Maximal count of links to a file
	 */
	#define EXT2_LINK_MAX		32000

So I'm fairly sure that's the culprit.

Changing the directory layout is a proposal for 7.x; until then, the
only thing that I can suggest is to try a different filesystem, e.g. 
ReiserFS (ext3 has the same 32000-link limit).

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-user mailing list