OS Manuals

llapi_dir_create_pool(3)

llapi_dir_create_pool - create a striped directory with individual parameters

LLAPI_DIR_CREATE_POOL(3) Lustre Library Functions LLAPI_DIR_CREATE_POOL(3)

llapi_dir_create_pool - create a striped directory with individual parameters

#include <lustre/lustreapi.h>
int llapi_dir_create_pool(const char *name, int mode,
                          int stripe_offset, int stripe_count,
                          int stripe_pattern,
                          const char *pool_name)

llapi_dir_create_pool() is a convenience function that creates a new directory with the specified name and striping parameters on a Lustre filesystem. It constructs a struct llapi_stripe_param from the individual arguments and calls llapi_dir_create(3).

This function provides a simpler interface when only basic striping parameters are needed, without requiring the caller to populate the full stripe parameter structure.

The arguments are as follows:

The pathname of the directory to create. The parent directory must already exist and be on a Lustre filesystem.
The permission bits for the new directory, as described in open(2).
The MDT index where the directory should start, or -1 for round-robin selection across available MDTs.
The number of MDTs to stripe the directory across. A value of 0 uses the filesystem default.
The hash algorithm for distributing directory entries across MDTs. Valid values include LMV_HASH_TYPE_FNV_1A_64 (default, good distribution), LMV_HASH_TYPE_CRUSH (optimized for migration), and LMV_HASH_TYPE_ALL_CHARS (weak, for testing only).
Currently ignored, should be set as NULL.

llapi_dir_create_pool() returns 0 on success, or a negative errno value on failure.

Permission denied on parent directory.
Stripe already set on existing directory.
Directory already exists.
An invalid argument was specified.
Parent directory does not exist.
Not enough memory to allocate a resource.

llapi_dir_create_pool () is part of the lustre(7) user application interface library since release 2.4.0.

llapi_dir_create(3), llapi_dir_create_foreign(3), lustreapi(7)

2026-01-26 Lustre User API

lustre 2.17.60-r0 · enterprise-packages · ingested 2026-10-22