LLAPI_LAYO...L_NAME_GET(3)
π LLAPI_LAYOUT_POOL_NAME_GET, LLAPI_LAYOUT_POOL_NAME_SET β get or set the OST pool name of a Lustre file π
okay bestie, this is a page from the Lustre Library Functions collection, manual section 3, and it's literally just two little functions that let you peek at π«£ or poke at π the OST pool name of a Lustre file. tiny API, big vibes.
β¨ 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()
this one goes and grabs the name of the pool of OSTs that's associated with layout, and drops up to n characters of it into pool_name. that's it. that's the whole function. it's giving "just tell me where this file lives, bestie". π
π
llapi_layout_pool_name_set()
this one sets the OST pool name of layout to pool_name, maxing out at LOV_MAXPOOLNAME characters. no cap.
now here's the lil plot twist π β if your pool_name uses the "fsname.pool" notation to qualify the pool name with a filesystem name, that "fsname." portion gets silently discarded before the value is stored. like, gone. no warning, no drama, just yeeted into the void. π
llapi_layout_pool_name_set() will validate that:
pool_nameisn't longer than the maximum allowed name, and- it only contains valid characters (per
llapi_pool_name_validate(3)).
but it does NOT validate that pool_name actually names an existing, non-empty pool β because at this point it's genuinely not known a priori which filesystem layout is gonna get applied. so it can't check. it simply cannot.
β οΈ however!! the function llapi_layout_file_create() will fail if you hand it a layout with a pool that doesn't exist or that contains no OSTs. so like, be careful out there bestie. π«Ά
π₯ RETURN VALUES π₯
llapi_layout_pool_name_get()andllapi_layout_pool_name_set()return0on success β¨ β slay, we love a clean return.- or
-1if an error occurred π β and in that case,errnogets set appropriately, as it should. main character error handling.
π ERRORS π
errors coming out of llapi_pool_name_validate(3) will be returned on malformed pool names. so if you typed something weird, that's where the blame lands.
EINVALβ an invalid argument was specified. yeah. that one. the classic. π
π¦ NOTES π¦
so what even is a pool? π a pool defines a set of OSTs from which objects may be allocated to store a file in a Lustre filesystem. and who makes them? the filesystem administrator, using the lctl(1) command. not you. not me. the admin. π
this API lets an application do two (2) things:
- create a file within an existing pool, or
- query the name of a pool that a file was created in.
and that's the whole list. it does not give you any interface for creating or destroying pools. so don't come here looking for that, bestie, the door is that way. πͺβ¨
π refer to the Lustre Operations Manual for detailed background material about OST pools β that's where the lore lives.
π 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. so they've been around for a minute, lowkey iconic of them.
π SEE ALSO π
lctl(1)llapi_layout_alloc(3)llapi_layout_file_open(3)llapi_pool_name_validate(3)llapi_layout(7)lustreapi(7)
and that's the page, bestie!! π brought to you by the Lustre User API, dated 2026-08-23 β go forth and manage your pools responsibly, mwah πβ¨πΈπ¦
π¦ where this page comes from
- ubuntu stonking: lustre-client-utils 2.17.58+dfsg-0ubuntu2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms