LLAPI_LAYOUT_POOL_NAME_GET(3)

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

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

EINVAL
    An invalid argument was specified.

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

SEE ALSO
lctl(1), llapi_layout_alloc(3), llapi_layout_file_open(3), llapi_layout(7), lustreapi(7)