LLAPI\_DIR\_CREATE\_POOL(3) Lustre Library Functions LLAPI\_DIR\_CREATE\_POOL(3)

# [NAME](#NAME)

llapi\_dir\_create\_pool - create a striped directory with individual parameters

# [SYNOPSIS](#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](#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)](/man/enterprise-packages/lustre/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*](#name)

The pathname of the directory to create. The parent directory must already exist and be on a Lustre filesystem.

[*mode*](#mode)

The permission bits for the new directory, as described in [**open**(2)](/man/enterprise-packages/lustre/open.2).

[*stripe\_offset*](#stripe_offset)

The MDT index where the directory should start, or -1 for round-robin selection across available MDTs.

[*stripe\_count*](#stripe_count)

The number of MDTs to stripe the directory across. A value of 0 uses the filesystem default.

[*stripe\_pattern*](#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*](#pool_name)

Currently ignored, should be set as NULL.

# [RETURN VALUE](#RETURN_VALUE)

**llapi\_dir\_create\_pool**() returns 0 on success, or a negative errno value on failure.

# [ERRORS](#ERRORS)

[**-EACCES**](#EACCES)

Permission denied on parent directory.

[**-EALREADY**](#EALREADY)

Stripe already set on existing directory.

[**-EEXIST**](#EEXIST)

Directory already exists.

[**-EINVAL**](#EINVAL)

An invalid argument was specified.

[**-ENOENT**](#ENOENT)

Parent directory does not exist.

[**-ENOMEM**](#ENOMEM)

Not enough memory to allocate a resource.

# [AVAILABILITY](#AVAILABILITY)

**llapi\_dir\_create\_pool ()** is part of the [**lustre**(7)](/man/enterprise-packages/lustre/lustre.7) user application interface library since release 2.4.0.

# [SEE ALSO](#SEE_ALSO)

[**llapi\_dir\_create**(3)](/man/enterprise-packages/lustre/llapi_dir_create.3), [**llapi\_dir\_create\_foreign**(3)](/man/enterprise-packages/lustre/llapi_dir_create_foreign.3), [**lustreapi**(7)](/man/enterprise-packages/lustre/lustreapi.7)

2026-01-26 Lustre User API

---

Document: llapi_dir_create_pool(3) from lustre 2.17.60-r0 (Chainguard OS)
Source: https://github.com/lustre/lustre-release
