| LLAPI_DIR_CREATE_POOL(3) | Lustre Library Functions | LLAPI_DIR_CREATE_POOL(3) |
NAME
llapi_dir_create_pool - create a striped directory with individual parameters
SYNOPSIS
#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)
DESCRIPTION
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:
- name
- The pathname of the directory to create. The parent directory must already exist and be on a Lustre filesystem.
- mode
- The permission bits for the new directory, as described in open(2).
- stripe_offset
- The MDT index where the directory should start, or -1 for round-robin selection across available MDTs.
- stripe_count
- The number of MDTs to stripe the directory across. A value of 0 uses the filesystem default.
- stripe_pattern
- 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).
- pool_name
- Currently ignored, should be set as NULL.
RETURN VALUE
llapi_dir_create_pool() returns 0 on success, or a negative errno value on failure.
ERRORS
AVAILABILITY
llapi_dir_create_pool () is part of the lustre(7) user application interface library since release 2.4.0.
SEE ALSO
llapi_dir_create(3), llapi_dir_create_foreign(3), lustreapi(7)
| 2026-01-26 | Lustre User API |