LLAPI\_LAYOUT\_POOL\_NAME\_GET(3) Lustre Library Functions LLAPI\_LAYOUT\_POOL\_NAME\_GET(3)

# [NAME](#NAME)

llapi\_layout\_pool\_name\_get, llapi\_layout\_pool\_name\_set - get or set the OST pool name of a Lustre file

# [SYNOPSIS](#SYNOPSIS)

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

```
int llapi_layout_pool_name_get(const struct llapi_layout *layout,
                               char *pool_name, size_t n);
```

```
int llapi_layout_pool_name_set(struct llapi_layout *layout,
                               const char *pool_name);
```

# [DESCRIPTION](#DESCRIPTION)

**llapi\_layout\_pool\_name\_get()** stores into *pool\_name* up to *n* characters of the name of the pool of OSTs associated with *layout*.

**llapi\_layout\_pool\_name\_set()** sets the OST pool name of *layout* to *pool\_name*, up to **LOV\_MAXPOOLNAME** characters. If *pool\_name* uses "fsname.pool" notation to qualify the pool name with a filesystem name, the "fsname." portion will be silently discarded before storing the value.

**llapi\_layout\_pool\_name\_set()** will validate that the *pool\_name* is not longer than the maximum allowed name and only contains valid characters (per [**llapi\_pool\_name\_validate**(3)](/man/enterprise-packages/lustre/llapi_pool_name_validate.3)), but does not validate that *pool\_name* names an existing non-empty pool, since it is not known a priori which filesystem *layout* will be applied to. However, the function **llapi\_layout\_file\_create()** will fail if given a *layout* with a pool that does not exist or contains no OSTs.

# [RETURN VALUES](#RETURN_VALUES)

**llapi\_layout\_pool\_name\_get()** and **llapi\_layout\_pool\_name\_set()** return 0 on success, or -1 if an error occurred (in which case, errno is set appropriately).

# [ERRORS](#ERRORS)

Errors from [**llapi\_pool\_name\_validate**(3)](/man/enterprise-packages/lustre/llapi_pool_name_validate.3) will be returned on malformed pool names.

[**EINVAL**](#EINVAL)

An invalid argument was specified.

# [NOTES](#NOTES)

A pool defines a set of OSTs from which objects may be allocated to store a file in a Lustre filesystem. Pools are created by the filesystem administrator using the [**lctl**(1)](/man/enterprise-packages/lustre/lctl.1) command. This API allows an application to create a file within an existing pool, or to query the name of a pool that a file was created in. It does not provide an interface for creating or destroying pools. Refer to the Lustre Operations Manual for detailed background material about OST pools.

# [AVAILABILITY](#AVAILABILITY)

**llapi\_layout\_pool\_name\_get()** and **llapi\_layout\_pool\_name\_set()** are part of the [**lustre**(7)](/man/enterprise-packages/lustre/lustre.7) user application interface library since release 2.7.0

# [SEE ALSO](#SEE_ALSO)

[**lctl**(1)](/man/enterprise-packages/lustre/lctl.1), [**llapi\_layout\_alloc**(3)](/man/enterprise-packages/lustre/llapi_layout_alloc.3), [**llapi\_layout\_file\_open**(3)](/man/enterprise-packages/lustre/llapi_layout_file_open.3), [**llapi\_pool\_name\_validate**(3)](/man/enterprise-packages/lustre/llapi_pool_name_validate.3), [**llapi\_layout**(7)](/man/enterprise-packages/lustre/llapi_layout.7), [**lustreapi**(7)](/man/enterprise-packages/lustre/lustreapi.7)

2026-08-23 Lustre User API

---

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