LLAPI\_POOL\_NAME\_VALIDATE(3) Lustre Library Functions LLAPI\_POOL\_NAME\_VALIDATE(3)

# [NAME](#NAME)

llapi\_pool\_name\_validate() - check pool name contains only valid characters

# [SYNOPSIS](#SYNOPSIS)

```
#include <lustre/lustreapi.h>
```

```
int llapi_pool_name_validate(const char **pool_name);
```

# [DESCRIPTION](#DESCRIPTION)

**llapi\_pool\_name\_validate()** verifies that the characters in *pool\_name* contain only alphanumeric characters, '-', and '\_', and is not longer than *LOV\_MAXPOOLNAME* (15) bytes in length (excluding NUL terminator). If *pool\_name* is of the form *fsname*.*pool\_name* then the leading *fsname.* part of the pool name is removed and the *pool\_name* pointer will only point at the pool name upon return. This ensures that *pool\_name* is suitable for use in filesystem pool identifiers. If the removal of the leading *fsname.* component of the pool name is undesirable, then [**llapi\_name\_validate**(3)](/man/enterprise-packages/lustre/llapi_name_validate.3) should be used to verify the pool name.

# [RETURN VALUE](#RETURN_VALUE)

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

# [ERRORS](#ERRORS)

EINVAL

The supplied **name** contained an illegal character.

ENAMETOOLONG

The supplied **name** exceeded **LOV\_MAXPOOLNAME** characters without a NUL terminator.

ENXIO

The **name** was NULL or empty.

# [EXAMPLES](#EXAMPLES)

Check if **pool\_name** can be used as a pool identifier.

```
#include <string.h>
#include <lustre/lustreapi.h>
int main(int argc, char *argv[])
{


        char pool_name[] = "newfs123.testpool";


        rc = llapi_pool_name_validate(&pool_name);


        if (rc < 0) {


                fprintf(stderr, "%s: pool name '%s' invalid: %s\n",


                        argv[1], pool_name, strerror(errno));


                return rc;


        }
}
```

# [AVAILABILITY](#AVAILABILITY)

**llapi\_pool\_name\_validate** is part of the [**lustre**(7)](/man/enterprise-packages/lustre/lustre.7) filesystem package since release 2.18.0.

# [SEE ALSO](#SEE_ALSO)

[**llapi\_name\_validate**(3)](/man/enterprise-packages/lustre/llapi_name_validate.3), [**lustreapi**(7)](/man/enterprise-packages/lustre/lustreapi.7)

2026-08-23 Lustre User API

---

Document: llapi_pool_name_validate(3) from lustre 2.17.59-r2 (Chainguard OS)
Source: https://github.com/lustre/lustre-release
