OS Manuals

llapi_layout_pool_name_set(3)

llapi_layout_pool_name_get, llapi_layout_pool_name_set - get or set the OST pool name of a Lustre file

LLAPI_LAYOUT_POOL_NAME_GET(3) Lustre Library Functions LLAPI_LAYOUT_POOL_NAME_GET(3)

llapi_layout_pool_name_get, llapi_layout_pool_name_set - get or set the OST pool name of a Lustre file

#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);

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)), 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.

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 from llapi_pool_name_validate(3) will be returned on malformed pool names.

An invalid argument was specified.

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) 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.

llapi_layout_pool_name_get() and llapi_layout_pool_name_set() are part of the lustre(7) user application interface library since release 2.7.0

lctl(1), llapi_layout_alloc(3), llapi_layout_file_open(3), llapi_pool_name_validate(3), llapi_layout(7), lustreapi(7)

2026-08-23 Lustre User API

lustre 2.17.59-r1 · enterprise-packages · ingested 2026-10-02